diff --git a/public/js/icinga/loader.js b/public/js/icinga/loader.js index d5e747e4c..771bf6b0e 100644 --- a/public/js/icinga/loader.js +++ b/public/js/icinga/loader.js @@ -1061,7 +1061,6 @@ if (req.addToHistory && ! req.autorefresh) { req.$target.data('icingaRefresh', 0); req.$target.data('icingaUrl', url); - icinga.history.pushCurrentState(); } if (typeof req.progressTimer !== 'undefined') { @@ -1090,8 +1089,9 @@ req.$target ); - // Aborted requests should not be added to browser history - req.addToHistory = false; + if (req.scripted) { + req.addToHistory = false; + } } else { if (this.failureNotice === null) { var now = new Date(); diff --git a/public/js/icinga/ui.js b/public/js/icinga/ui.js index 5dc2919f6..0e6ee82ce 100644 --- a/public/js/icinga/ui.js +++ b/public/js/icinga/ui.js @@ -342,6 +342,7 @@ }, closeContainer: function($c) { + this.icinga.loader.stopPendingRequestsFor($c); $c.removeData('icingaUrl'); $c.removeData('icingaTitle'); $c.removeData('icingaRefresh'); @@ -349,8 +350,8 @@ $c.removeData('icingaModule'); delete $c[0].dataset.icingaContainerId; $c.removeAttr('class').attr('class', 'container'); - this.icinga.loader.stopPendingRequestsFor($c); $c.trigger('close-column'); + this.icinga.history.pushCurrentState(); $c.html(''); },