[icinga-checkins] icinga.org: icinga-core/fix/cgi-reload-scroll-4233: classic ui: fix URL construction issue in icinga_reload_scroll_position() javascript

git at icinga.org git at icinga.org
Mon Jun 3 21:47:31 CEST 2013


Module: icinga-core
Branch: fix/cgi-reload-scroll-4233
Commit: 68b6717b2a8b10012140edcb46d4b2515beb44e3
URL:    https://git.icinga.org/?p=icinga-core.git;a=commit;h=68b6717b2a8b10012140edcb46d4b2515beb44e3

Author: Michael Friedrich <michael.friedrich at netways.de>
Date:   Mon Jun  3 21:46:57 2013 +0200

classic ui: fix URL construction issue in icinga_reload_scroll_position() javascript

fixes #4233

---

 Changelog               |    7 +++++++
 THANKS                  |    1 +
 html/js/page_refresh.js |    3 +++
 3 files changed, 11 insertions(+), 0 deletions(-)

diff --git a/Changelog b/Changelog
index 55c5b30..70a44df 100644
--- a/Changelog
+++ b/Changelog
@@ -13,6 +13,13 @@ UPGRADE NOTES
 	- idoutils: ${source}/module/idoutils/config/updates
 * package locations may differ!
 
+1.9.2 - XX/06/2013
+
+FIXES
+
+* classic ui: fix URL construction issue in icinga_reload_scroll_position() javascript (Karsten Sühring) #4233 - MF
+
+
 1.9.1 - 22/05/2013
 
 FIXES
diff --git a/THANKS b/THANKS
index d1eaa4d..95ccdfb 100644
--- a/THANKS
+++ b/THANKS
@@ -303,6 +303,7 @@ in various ways.  If we missed your name, let us know.
 * Kevin Stone
 * Herbert Straub
 * Sven Strickroth
+* Karsten Sühring
 * Alexander Sulfrian
 * SUSE Linux Team
 * Horvath Tamas
diff --git a/html/js/page_refresh.js b/html/js/page_refresh.js
index e0243d4..67db60f 100644
--- a/html/js/page_refresh.js
+++ b/html/js/page_refresh.js
@@ -51,6 +51,9 @@ function icinga_reload_scroll_position() {
 		url_c = url.replace(/[\?&]scroll=(\d+)/,'');
 
 		/* create new querystring and reload */
+		if (url_c.indexOf('?') === -1) {
+			url_c = url_c.replace(/&/,'?');
+		}
 		q = url_c.indexOf('?') === -1 ? '?' : '&';
 		window.location.href = url_c + q + 'scroll=' + scroll_pos;
 	}





More information about the icinga-checkins mailing list