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

Unified Diff: chrome/browser/resources/ntp4/bookmarks_page.js

Issue 7976009: [ntp4] Make top level Bookmark Manager links point to the bookmarks bar folder. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 9 years, 3 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/resources/ntp4/bookmarks_page.js
===================================================================
--- chrome/browser/resources/ntp4/bookmarks_page.js (revision 101977)
+++ chrome/browser/resources/ntp4/bookmarks_page.js (working copy)
@@ -299,13 +299,14 @@
for (var i = 0; i < tile_count; i++)
this.appendTile(new Bookmark(items[i]), false);
+ var folder_id = this.id == ROOT_NODE_ID ? BOOKMARKS_BAR_ID : this.id;
var link = $('bookmarks-top-link-wrapper').querySelector('a');
- link.href = 'chrome://bookmarks/#' + this.id;
+ link.href = 'chrome://bookmarks/#' + folder_id;
var wrapper = $('bookmarks-bottom-link-wrapper');
if (items.length > MAX_BOOKMARK_TILES) {
var link = wrapper.querySelector('a');
Evan Stade 2011/09/21 22:13:23 confusing link variable shadowing here :(
csilv 2011/09/21 23:45:26 Indeed, fixed.
- link.href = 'chrome://bookmarks/#' + this.id;
+ link.href = 'chrome://bookmarks/#' + folder_id;
wrapper.hidden = false;
} else {
wrapper.hidden = true;
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698