Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(3337)

Unified Diff: chrome/browser/resources/uber/uber_frame.js

Issue 313363004: Separate Settings and Help from History and Extensions when settings-in- (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/browser/resources/uber/uber_frame.js
diff --git a/chrome/browser/resources/uber/uber_frame.js b/chrome/browser/resources/uber/uber_frame.js
index 8c5bb3bfe5c6be5c5c40373a6532f72a720c66d0..d82c83eb7b95de8846cbb5b7d16a5c434ee72b6d 100644
--- a/chrome/browser/resources/uber/uber_frame.js
+++ b/chrome/browser/resources/uber/uber_frame.js
@@ -77,6 +77,7 @@ cr.define('uber_frame', function() {
var navItem =
document.querySelector('li[controls="' + params.pageId + '"]');
setSelection(navItem);
+ showNavItems();
}
/**
@@ -93,6 +94,19 @@ cr.define('uber_frame', function() {
}
/**
+ * Shows nav items belonging to the same group as the selected item.
+ */
+ function showNavItems() {
+ var navItems = document.querySelectorAll('li');
+ var selectedNavItem = document.querySelector('li.selected');
+
+ for (var i = 0; i < navItems.length; ++i) {
+ navItems[i].hidden = (navItems[i].getAttribute('group') !=
+ selectedNavItem.getAttribute('group'));
+ }
+ }
+
+ /**
* Adjusts this frame's content to scrolls from the outer frame. This is done
* to obscure text in RTL as a user scrolls over the content of this frame (as
* currently RTL scrollbars still draw on the right).

Powered by Google App Engine
This is Rietveld 408576698