diff options
author | Ke Wu <ke.wu@ibeca.me> | 2012-08-17 14:20:32 -0700 |
---|---|---|
committer | Ke Wu <ke.wu@ibeca.me> | 2012-08-17 14:21:04 -0700 |
commit | 9fff560cbde5519fb2af0a6f933f2da68430b48d (patch) | |
tree | 6482f8cead9ead8fd129f975ddb5e1aaa1e2286c /horizon/browsers | |
parent | 156a368c6306a6ac59b2bbd4aaf833aeb9e438d8 (diff) | |
download | horizon-9fff560cbde5519fb2af0a6f933f2da68430b48d.tar.gz |
High-light selected container in browser
Fixed bug #1038264
Change-Id: I46c1d2faf58872d9ed72ee9f6f0f9c4d61d20756
Diffstat (limited to 'horizon/browsers')
-rw-r--r-- | horizon/browsers/base.py | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/horizon/browsers/base.py b/horizon/browsers/base.py index 802b63536..30a7b1514 100644 --- a/horizon/browsers/base.py +++ b/horizon/browsers/base.py @@ -127,12 +127,14 @@ class ResourceBrowser(html.HTMLElement): """ self.navigation_table = tables[self.navigation_table_class._meta.name] self.content_table = tables[self.content_table_class._meta.name] - if self.has_breadcrumb: - self.prepare_breadcrumb(tables) - - def prepare_breadcrumb(self, tables): navigation_item = self.kwargs.get(self.navigation_kwarg_name) content_path = self.kwargs.get(self.content_kwarg_name) + # Tells the navigation table what is selected. + self.navigation_table.current_item_id = navigation_item + if self.has_breadcrumb: + self.prepare_breadcrumb(tables, navigation_item, content_path) + + def prepare_breadcrumb(self, tables, navigation_item, content_path): if self.has_breadcrumb and navigation_item and content_path: for table in tables.values(): table.breadcrumb = Breadcrumb(self.request, |