[icinga-checkins] icinga.org: icingaweb2/master: Don' t hide the filter editor from the view if the view is compact

git at icinga.org git at icinga.org
Sat Feb 27 22:50:03 CET 2016


Module: icingaweb2
Branch: master
Commit: 8433bf1fc157db0a2ed431fba28215957f4e8821
URL:    https://git.icinga.org/?p=icingaweb2.git;a=commit;h=8433bf1fc157db0a2ed431fba28215957f4e8821

Author: Eric Lippmann <eric.lippmann at netways.de>
Date:   Sat Feb 27 15:57:00 2016 +0100

Don't hide the filter editor from the view if the view is compact

refs #10778

---

 library/Icinga/Web/Controller.php |    7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/library/Icinga/Web/Controller.php b/library/Icinga/Web/Controller.php
index b31b4fb..f15e491 100644
--- a/library/Icinga/Web/Controller.php
+++ b/library/Icinga/Web/Controller.php
@@ -209,6 +209,7 @@ class Controller extends ModuleActionController
         );
 
         $editor = Widget::create('filterEditor');
+        /** @var \Icinga\Web\Widget\FilterEditor $editor */
         call_user_func_array(
             array($editor, 'preserveParams'),
             array_merge($defaultPreservedParams, $preserveParams ?: array())
@@ -221,10 +222,12 @@ class Controller extends ModuleActionController
             ->setSearchColumns($searchColumns)
             ->handleRequest($this->getRequest());
 
-        if (! $this->view->compact) {
-            $this->view->filterEditor = $editor;
+        if ($this->view->compact) {
+            $editor->setVisible(false);
         }
 
+        $this->view->filterEditor = $editor;
+
         return $this;
     }
 }



More information about the icinga-checkins mailing list