JS/ui: separate closeContainer logic
This commit is contained in:
parent
371b66bd8b
commit
68a90b8de8
|
@ -214,15 +214,18 @@
|
||||||
|
|
||||||
layout1col: function () {
|
layout1col: function () {
|
||||||
if (! $('#layout').hasClass('twocols')) { return; }
|
if (! $('#layout').hasClass('twocols')) { return; }
|
||||||
var $col2 = $('#col2');
|
|
||||||
this.icinga.logger.debug('Switching to single col');
|
this.icinga.logger.debug('Switching to single col');
|
||||||
$('#layout').removeClass('twocols');
|
$('#layout').removeClass('twocols');
|
||||||
$col2.removeData('icingaUrl');
|
this.closeContainer($('#col2'));
|
||||||
$col2.removeData('icingaRefresh');
|
},
|
||||||
$col2.removeData('lastUpdate');
|
|
||||||
$col2.removeData('icingaModule');
|
closeContainer: function($c) {
|
||||||
this.icinga.loader.stopPendingRequestsFor($col2);
|
$c.removeData('icingaUrl');
|
||||||
$col2.html('');
|
$c.removeData('icingaRefresh');
|
||||||
|
$c.removeData('lastUpdate');
|
||||||
|
$c.removeData('icingaModule');
|
||||||
|
this.icinga.loader.stopPendingRequestsFor($c);
|
||||||
|
$c.html('');
|
||||||
this.fixControls();
|
this.fixControls();
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue