From cf857c42571071ca760f8e66598dc5910de3b991 Mon Sep 17 00:00:00 2001 From: Johannes Meyer Date: Wed, 28 Jan 2015 14:15:16 +0100 Subject: [PATCH 1/2] Close forms when switching between the main app's configuration tabs refs #6436 --- application/views/scripts/config/authentication/reorder.phtml | 2 +- application/views/scripts/config/index.phtml | 2 +- application/views/scripts/config/resource.phtml | 2 +- application/views/scripts/roles/index.phtml | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/application/views/scripts/config/authentication/reorder.phtml b/application/views/scripts/config/authentication/reorder.phtml index 688d99f88..807f80efe 100644 --- a/application/views/scripts/config/authentication/reorder.phtml +++ b/application/views/scripts/config/authentication/reorder.phtml @@ -1,4 +1,4 @@ -
+
diff --git a/application/views/scripts/config/index.phtml b/application/views/scripts/config/index.phtml index dab0acc4f..1ffd120b4 100644 --- a/application/views/scripts/config/index.phtml +++ b/application/views/scripts/config/index.phtml @@ -1,4 +1,4 @@ -
+
tabs->render($this); ?>
diff --git a/application/views/scripts/config/resource.phtml b/application/views/scripts/config/resource.phtml index c5d4ca0fc..f93b2af82 100644 --- a/application/views/scripts/config/resource.phtml +++ b/application/views/scripts/config/resource.phtml @@ -1,4 +1,4 @@ -
+
diff --git a/application/views/scripts/roles/index.phtml b/application/views/scripts/roles/index.phtml index 79eda5dac..925cdfa4e 100644 --- a/application/views/scripts/roles/index.phtml +++ b/application/views/scripts/roles/index.phtml @@ -1,4 +1,4 @@ -
+

translate('Roles') ?>

From 618ab4f4b9cdc3975cc096eaabfe04da70244fb0 Mon Sep 17 00:00:00 2001 From: Johannes Meyer Date: Wed, 28 Jan 2015 14:21:06 +0100 Subject: [PATCH 2/2] Introduce link target "_right" to keep a column with tabs rightmost I'd have liked to get it to work that in case the tab control is not in the rightmost column a "go back" in the history is being simulated causing the preceding leftmost column(s) to be restored and the rightmost one set to the one containing the tab control. But the history api does not seem to support any read operations except for the current state.. refs #6436 --- application/views/scripts/config/module.phtml | 2 +- .../application/views/scripts/config/index.phtml | 2 +- .../application/views/scripts/config/security.phtml | 2 +- public/js/icinga/events.js | 10 ++++++++++ 4 files changed, 13 insertions(+), 3 deletions(-) diff --git a/application/views/scripts/config/module.phtml b/application/views/scripts/config/module.phtml index cd6ad5af8..e26ade195 100644 --- a/application/views/scripts/config/module.phtml +++ b/application/views/scripts/config/module.phtml @@ -1,4 +1,4 @@ -
+
tabs ?>

escape($module->getTitle()) ?>

diff --git a/modules/monitoring/application/views/scripts/config/index.phtml b/modules/monitoring/application/views/scripts/config/index.phtml index b1729f9b1..deca8d468 100644 --- a/modules/monitoring/application/views/scripts/config/index.phtml +++ b/modules/monitoring/application/views/scripts/config/index.phtml @@ -1,4 +1,4 @@ -
+

translate('Monitoring Backends') ?>

diff --git a/modules/monitoring/application/views/scripts/config/security.phtml b/modules/monitoring/application/views/scripts/config/security.phtml index 71f2a341a..2a84b2469 100644 --- a/modules/monitoring/application/views/scripts/config/security.phtml +++ b/modules/monitoring/application/views/scripts/config/security.phtml @@ -1,4 +1,4 @@ -
+
tabs ?>
diff --git a/public/js/icinga/events.js b/public/js/icinga/events.js index e7ac3e3f1..b7f2f5cee 100644 --- a/public/js/icinga/events.js +++ b/public/js/icinga/events.js @@ -482,6 +482,16 @@ targetId = 'col1'; $target = $('#' + targetId); self.icinga.ui.layout1col(); + } else if (targetId === '_right') { + // Ensure that the content is displayed in the rightmost column + $target = $el.closest('.container'); + if ($target.attr('id') === 'col1') { + // As it's not possible to detect what's preceding the current state in the + // history stack this just simulates _main in case the respective element + // is not part of the rightmost column + $target = $('#col1'); + self.icinga.ui.layout1col(); + } } else { $target = $('#' + targetId); }