Skip to content

Commit

Permalink
js: Explicitly update history when col2 is closed
Browse files Browse the repository at this point in the history
Instead of doing this by default. There are too many
cases where this isn't necessary at all.

fixes #5178
  • Loading branch information
nilmerg committed Aug 7, 2024
1 parent ff0fc55 commit 8ec42b0
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions public/js/icinga/behavior/actiontable.js
Original file line number Diff line number Diff line change
Expand Up @@ -416,6 +416,7 @@
} else {
if (_this.icinga.loader.getLinkTargetFor($tr).attr('id') === 'col2') {
_this.icinga.ui.layout1col();
_this.icinga.history.pushCurrentState();
}
}

Expand Down
2 changes: 1 addition & 1 deletion public/js/icinga/ui.js
Original file line number Diff line number Diff line change
Expand Up @@ -303,6 +303,7 @@
this.currentLayout = matched[1];
if (this.currentLayout === 'poor' || this.currentLayout === 'minimal') {
this.layout1col();
this.icinga.history.replaceCurrentState();
} else if (this.icinga.initialized) {
// layout1col() also triggers this, that's why an else is required
$('#layout').trigger('layout-change');
Expand Down Expand Up @@ -351,7 +352,6 @@
delete $c[0].dataset.icingaContainerId;
$c.removeAttr('class').attr('class', 'container');
$c.trigger('close-column');
this.icinga.history.pushCurrentState();
$c.html('');
},

Expand Down

0 comments on commit 8ec42b0

Please sign in to comment.