From 9f858a9073b6a181903328e73fc13fc86ee46b2d Mon Sep 17 00:00:00 2001 From: Johannes Meyer Date: Fri, 28 Jun 2019 15:51:07 +0200 Subject: [PATCH] ui.js: Trigger event `layout-change` when the layout changes --- public/js/icinga/ui.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/public/js/icinga/ui.js b/public/js/icinga/ui.js index c29121bd3..670a353a3 100644 --- a/public/js/icinga/ui.js +++ b/public/js/icinga/ui.js @@ -268,6 +268,9 @@ this.currentLayout = matched[1]; if (this.currentLayout === 'poor' || this.currentLayout === 'minimal') { this.layout1col(); + } else { + // layout1col() also triggers this, that's why an else is required + $('#layout').trigger('layout-change'); } return true; } @@ -293,6 +296,7 @@ this.icinga.logger.debug('Switching to single col'); $('#layout').removeClass('twocols'); this.closeContainer($('#col2')); + $('#layout').trigger('layout-change'); // one-column layouts never have any selection active $('#col1').removeData('icinga-actiontable-former-href'); this.icinga.behaviors.actiontable.clearAll(); @@ -315,6 +319,7 @@ this.icinga.logger.debug('Switching to double col'); $('#layout').addClass('twocols'); this.fixControls(); + $('#layout').trigger('layout-change'); }, getAvailableColumnSpace: function () {