From 8364cd83b087ff11eed6731d5d72a5a2795dffc3 Mon Sep 17 00:00:00 2001 From: Yonas Habteab Date: Tue, 14 Sep 2021 17:25:59 +0200 Subject: [PATCH] JS: Fix don't close the right column when submitting a form if not requested --- public/js/icinga/loader.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/public/js/icinga/loader.js b/public/js/icinga/loader.js index 79ebcf00f..02597f3df 100644 --- a/public/js/icinga/loader.js +++ b/public/js/icinga/loader.js @@ -599,10 +599,12 @@ rerenderLayout, autoRefreshInterval, forceFocus, - origin; + origin, + shiftRightColumn; if (typeof referrer !== 'undefined') { rerenderLayout = referrer.getResponseHeader('X-Icinga-Rerender-Layout'); + shiftRightColumn = referrer.getResponseHeader('X-Icinga-Shift-RightColumn'); autoRefreshInterval = referrer.autoRefreshInterval; forceFocus = referrer.forceFocus; origin = referrer.url; @@ -643,7 +645,7 @@ this.loadUrl(parts.shift(), $('#col2')); } else { if ($target.attr('id') === 'col2') { // TODO: multicol - if ($('#col1').data('icingaUrl').split('?')[0] === url.split('?')[0]) { + if ($('#col1').data('icingaUrl').split('?')[0] === url.split('?')[0] && shiftRightColumn !== 'false') { icinga.ui.layout1col(); $target = $('#col1'); delete(this.requests['col2']);