Skip to content

Commit

Permalink
When laxy loading tabs don't overwrite query params.
Browse files Browse the repository at this point in the history
Fixes bug 1015702

Change-Id: I5f6a895af09481b5c47a0335bb12c620b4c4be08
  • Loading branch information
treshenry committed Jun 20, 2012
1 parent b9be56f commit 4624620
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion horizon/static/horizon/js/tabs.js
Expand Up @@ -5,7 +5,12 @@ horizon.tabs.load_tab = function (evt) {
tab_id = $this.attr('data-target'),
tab_pane = $(tab_id);
tab_pane.append("<i class='icon icon-updating ajax-updating'></i>&nbsp;<span>loading...</span>");
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();
};
Expand Down

0 comments on commit 4624620

Please sign in to comment.