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

Unified Diff: chrome/browser/resources/bookmark_manager/js/bmm/bookmark_list.js

Issue 2813059: Bookmarks: Remove the link from the bookmark list items.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 10 years, 5 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 | « chrome/browser/resources/bookmark_manager/css/bmm.css ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/resources/bookmark_manager/js/bmm/bookmark_list.js
===================================================================
--- chrome/browser/resources/bookmark_manager/js/bmm/bookmark_list.js (revision 52755)
+++ chrome/browser/resources/bookmark_manager/js/bmm/bookmark_list.js (working copy)
@@ -196,29 +196,19 @@
* @param {!Event} e The click event object.
*/
handleClick_: function(e) {
- var self = this;
-
- function dispatch(url) {
- var event = new cr.Event('urlClicked', true, false);
- event.url = url;
- event.originalEvent = e;
- self.dispatchEvent(event);
- }
-
- var el = e.target;
-
- // Handle clicks on the links to URLs.
- if (el.href) {
- dispatch(el.href);
-
// Handle middle click to open bookmark in a new tab.
- } else if (e.button == 1) {
+ if (e.button == 1) {
+ var el = e.target;
while (el.parentNode != this) {
el = el.parentNode;
}
var node = el.bookmarkNode;
- if (!bmm.isFolder(node))
- dispatch(node.url);
+ if (!bmm.isFolder(node)) {
+ var event = new cr.Event('urlClicked', true, false);
+ event.url = url;
+ event.originalEvent = e;
+ this.dispatchEvent(event);
+ }
}
},
@@ -392,11 +382,10 @@
if (bmm.isFolder(bookmarkNode)) {
this.className = 'folder';
- labelEl.href = '#' + bookmarkNode.id;
} else {
labelEl.style.backgroundImage = url('chrome://favicon/' +
bookmarkNode.url);
- labelEl.href = urlEl.textContent = bookmarkNode.url;
+ urlEl.textContent = bookmarkNode.url;
}
this.appendChild(labelEl);
« no previous file with comments | « chrome/browser/resources/bookmark_manager/css/bmm.css ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698