[icinga-checkins] icinga.org: icingaweb2/master: Prepare close-container for behavior implementation

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


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

Author: Florian Strohmaier <hello at florianstrohmaier.com>
Date:   Wed Feb 17 16:42:11 2016 +0100

Prepare close-container for behavior implementation

refs #8590

---

 public/js/icinga/events.js |    6 ------
 public/js/icinga/ui.js     |   12 +-----------
 2 files changed, 1 insertion(+), 17 deletions(-)

diff --git a/public/js/icinga/events.js b/public/js/icinga/events.js
index dd38f30..fc2fb8e 100644
--- a/public/js/icinga/events.js
+++ b/public/js/icinga/events.js
@@ -89,12 +89,6 @@
             if ($searchField.length && $searchField.val().length) {
                 self.searchValue = $searchField.val();
             }
-
-            if (icinga.ui.isOneColLayout()) {
-                icinga.ui.disableCloseButtons();
-            } else {
-                icinga.ui.enableCloseButtons();
-            }
         },
 
         /**
diff --git a/public/js/icinga/ui.js b/public/js/icinga/ui.js
index a20cd9b..a797aab 100644
--- a/public/js/icinga/ui.js
+++ b/public/js/icinga/ui.js
@@ -269,8 +269,6 @@
             this.icinga.logger.debug('Switching to single col');
             $('#layout').removeClass('twocols');
             this.closeContainer($('#col2'));
-            this.disableCloseButtons();
-
             // one-column layouts never have any selection active
             this.icinga.behaviors.actiontable.clearAll();
         },
@@ -281,6 +279,7 @@
             $c.removeData('lastUpdate');
             $c.removeData('icingaModule');
             this.icinga.loader.stopPendingRequestsFor($c);
+            $c.trigger('close-column');
             $c.html('');
             this.fixControls();
         },
@@ -290,7 +289,6 @@
             this.icinga.logger.debug('Switching to double col');
             $('#layout').addClass('twocols');
             this.fixControls();
-            this.enableCloseButtons();
         },
 
         getAvailableColumnSpace: function () {
@@ -508,14 +506,6 @@
             }
         },
 
-        disableCloseButtons: function () {
-            $('a.close-container-control').hide();
-        },
-
-        enableCloseButtons: function () {
-            $('a.close-close-container-control').show();
-        },
-
         /**
          * Toggle mobile menu
          *



More information about the icinga-checkins mailing list