From 4480055c9160e5773cf2de6edd7f9ff443608a0e Mon Sep 17 00:00:00 2001 From: Rajat Vig Date: Tue, 12 Jan 2016 12:02:07 -0800 Subject: [PATCH] Specify element in all pages This will allow $locationProvider to be set for the Horizon Application. The new patch also makes all relatively scoped URI's for Tabs and Pagination as absolute and fixes the horizon legacy scripts to include the current window location. Change-Id: I0ee517587e609856d7cafce519063b66878efb43 Closes-Bug: #1531737 --- horizon/static/horizon/js/horizon.tabs.js | 2 +- horizon/templates/horizon/common/_data_table.html | 4 ++-- horizon/templates/horizon/common/_tab_group.html | 2 +- openstack_dashboard/templates/base.html | 1 + 4 files changed, 5 insertions(+), 4 deletions(-) diff --git a/horizon/static/horizon/js/horizon.tabs.js b/horizon/static/horizon/js/horizon.tabs.js index 67d0bfcf0..2b4887346 100644 --- a/horizon/static/horizon/js/horizon.tabs.js +++ b/horizon/static/horizon/js/horizon.tabs.js @@ -29,7 +29,7 @@ horizon.tabs.load_tab = function () { horizon.tabs.initTabLoad(tab_pane); }); } else { - tab_pane.load("?tab=" + tab_id.replace('#', ''), function() { + tab_pane.load(window.location + "?tab=" + tab_id.replace('#', ''), function() { horizon.tabs.initTabLoad(tab_pane); }); } diff --git a/horizon/templates/horizon/common/_data_table.html b/horizon/templates/horizon/common/_data_table.html index df3c9c7d3..dda6898a4 100644 --- a/horizon/templates/horizon/common/_data_table.html +++ b/horizon/templates/horizon/common/_data_table.html @@ -74,10 +74,10 @@ | {% endif %} {% if table.has_prev_data %} - {% trans "« Prev" %} + {% trans "« Prev" %} {% endif %} {% if table.has_more_data %} - {% trans "Next »" %} + {% trans "Next »" %} {% endif %} diff --git a/horizon/templates/horizon/common/_tab_group.html b/horizon/templates/horizon/common/_tab_group.html index f09a66e8b..7b7387ae2 100644 --- a/horizon/templates/horizon/common/_tab_group.html +++ b/horizon/templates/horizon/common/_tab_group.html @@ -6,7 +6,7 @@ diff --git a/openstack_dashboard/templates/base.html b/openstack_dashboard/templates/base.html index 4efee7dd2..a1ebbc35e 100644 --- a/openstack_dashboard/templates/base.html +++ b/openstack_dashboard/templates/base.html @@ -15,6 +15,7 @@ {% include "horizon/_conf.html" %} {% include "horizon/client_side/_script_loader.html" %} {% include "horizon/_custom_head_js.html" %} +