Module: check_mk
Branch: master
Commit: afa0d7c737cc44985458060103649b738b39d46f
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=afa0d7c737cc44…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Mon Dec 16 13:16:13 2013 +0100
FIX Fixed too long page title during performing several actions
The page title reflects the current page. A bug caused this page title
to be appended to the current title instead of being replaced. This resulted
in too long page titles when performing e.g. actions in WATO
---
.werks/333 | 12 ++++++++++++
ChangeLog | 1 +
web/htdocs/js/sidebar.js | 9 ++++-----
3 files changed, 17 insertions(+), 5 deletions(-)
diff --git a/.werks/333 b/.werks/333
new file mode 100644
index 0000000..ac66414
--- /dev/null
+++ b/.werks/333
@@ -0,0 +1,12 @@
+Title: Fixed too long page title during performing several actions
+Level: 1
+Component: multisite
+Class: fix
+State: unknown
+Version: 1.2.5i1
+Date: 1387196080
+Targetversion: future
+
+The page title reflects the current page. A bug caused this page title
+to be appended to the current title instead of being replaced. This resulted
+in too long page titles when performing e.g. actions in WATO
diff --git a/ChangeLog b/ChangeLog
index 4b837b9..62a1ab9 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -32,6 +32,7 @@
* 0312 FIX: Hiding views related to not existing datasources, like the EC now...
* 0325 FIX: Removed CSV export icon from availability views...
* 0327 FIX: Most forms did now work with "Profile Requests" enabled...
+ * 0333 FIX: Fixed too long page title during performing several actions...
WATO:
* 0308 Multisite can now set rotation view permissions for NagVis...
diff --git a/web/htdocs/js/sidebar.js b/web/htdocs/js/sidebar.js
index 67940f6..19b8c57 100644
--- a/web/htdocs/js/sidebar.js
+++ b/web/htdocs/js/sidebar.js
@@ -26,7 +26,6 @@ var browser = navigator.userAgent.toLowerCase();
var weAreIEF__k = ((browser.indexOf("msie") != -1) &&
(browser.indexOf("opera") == -1));
var weAreOpera = browser.indexOf("opera") != -1;
var weAreFirefox = browser.indexOf("firefox") != -1 ||
browser.indexOf("namoroka") != -1;
-var g_orig_title = null;
var g_content_loc = null;
var sidebar_folded = false;
@@ -363,8 +362,8 @@ function contentFrameAccessible() {
function update_content_location() {
// init the original frameset title
- if (g_orig_title == null) {
- g_orig_title = window.parent.document.title;
+ if (typeof(window.parent.orig_title) == 'undefined') {
+ window.parent.orig_title = window.parent.document.title;
}
var content_frame = window.parent.frames[1];
@@ -372,9 +371,9 @@ function update_content_location() {
// Change the title to add the right frame title to reflect the
// title of the content URL in the framesets title (window title or tab title)
if (content_frame.document.title != '') {
- var page_title = g_orig_title + ' - ' + content_frame.document.title;
+ var page_title = window.parent.orig_title + ' - ' +
content_frame.document.title;
} else {
- var page_title = g_orig_title;
+ var page_title = window.parent.orig_title;
}
window.parent.document.title = page_title;