diff --git a/src/Model/Introduction.php b/src/Model/Introduction.php index e6cd4f852..68d598e34 100644 --- a/src/Model/Introduction.php +++ b/src/Model/Introduction.php @@ -22,7 +22,7 @@ use Psr\Log\LoggerInterface; * @property string hash * @property string datetime * @property bool blocked - * @property bool ignored + * @property bool ignore */ final class Introduction extends BaseModel { @@ -116,7 +116,7 @@ final class Introduction extends BaseModel */ public function ignore() { - $this->ignored = true; + $this->ignore = true; return $this->intro->update($this); } diff --git a/view/js/main.js b/view/js/main.js index 37975dd33..a5aa6d434 100644 --- a/view/js/main.js +++ b/view/js/main.js @@ -33,6 +33,41 @@ function _resizeIframe(obj, desth) { setTimeout(_resizeIframe, 100, obj, ch); } +function initWidget(inflated, deflated) { + var elInf = document.getElementById(inflated); + var elDef = document.getElementById(deflated); + + if (!elInf || !elDef) { + return; + } + if (localStorage.getItem(window.location.pathname + ":" + inflated) != "none") { + elInf.style.display = "block"; + elDef.style.display = "none"; + } else { + elInf.style.display = "none"; + elDef.style.display = "block"; + } +} + +function openCloseWidget(inflated, deflated) { + var elInf = document.getElementById(inflated); + var elDef = document.getElementById(deflated); + + if (!elInf || !elDef) { + return; + } + + if (window.getComputedStyle(elInf).display === "none") { + elInf.style.display = "block"; + elDef.style.display = "none"; + localStorage.setItem(window.location.pathname + ":" + inflated, "block"); + } else { + elInf.style.display = "none"; + elDef.style.display = "block"; + localStorage.setItem(window.location.pathname + ":" + inflated, "none"); + } +} + function openClose(theID) { var el = document.getElementById(theID); if (el) { diff --git a/view/templates/group_side.tpl b/view/templates/group_side.tpl index 31b9287ba..2aca4cdf4 100644 --- a/view/templates/group_side.tpl +++ b/view/templates/group_side.tpl @@ -1,5 +1,10 @@ -
+

{{$title}}

+
+
+ +

{{$title}}

+
- - + diff --git a/view/templates/widget/filter.tpl b/view/templates/widget/filter.tpl index acb95ea23..557b8794b 100644 --- a/view/templates/widget/filter.tpl +++ b/view/templates/widget/filter.tpl @@ -1,8 +1,8 @@ - +

{{$title}}

-