From 46246200594c1698f7ca49e2286ca7e853ed5e5b Mon Sep 17 00:00:00 2001 From: Tres Henry Date: Wed, 20 Jun 2012 10:19:10 -0700 Subject: [PATCH] When laxy loading tabs don't overwrite query params. Fixes bug 1015702 Change-Id: I5f6a895af09481b5c47a0335bb12c620b4c4be08 --- horizon/static/horizon/js/tabs.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/horizon/static/horizon/js/tabs.js b/horizon/static/horizon/js/tabs.js index 2b10581d2..d6940031c 100644 --- a/horizon/static/horizon/js/tabs.js +++ b/horizon/static/horizon/js/tabs.js @@ -5,7 +5,12 @@ horizon.tabs.load_tab = function (evt) { tab_id = $this.attr('data-target'), tab_pane = $(tab_id); tab_pane.append(" loading..."); - tab_pane.load("?tab=" + tab_id.replace('#', '')); + // If query params exist, append tab id. + if(window.location.search.length > 0) { + tab_pane.load(window.location.search + "&tab=" + tab_id.replace('#', '')); + } else { + tab_pane.load("?tab=" + tab_id.replace('#', '')); + } $this.attr("data-loaded", "true"); evt.preventDefault(); };