ui.js: Trigger event `layout-change` when the layout changes

This commit is contained in:
Johannes Meyer 2019-06-28 15:51:07 +02:00
parent a99f653a63
commit 9f858a9073
1 changed files with 5 additions and 0 deletions

View File

@ -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 () {