From 273fb9c93ae61f45c6455b17d357ba5aca6b7e22 Mon Sep 17 00:00:00 2001 From: "arv@chromium.org" Date: Sat, 17 Jul 2010 00:30:16 +0000 Subject: Bookmarks: Remove the link from the bookmark list items. BUG=43312 TEST=Open bookmarks manager. There bookmark list items should not longer be underlined on hover and clicking them should only select them. Review URL: http://codereview.chromium.org/2813059 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@52777 0039d316-1c4b-4281-b951-d872f2087c98 --- .../browser/resources/bookmark_manager/css/bmm.css | 6 ----- .../bookmark_manager/js/bmm/bookmark_list.js | 29 +++++++--------------- 2 files changed, 9 insertions(+), 26 deletions(-) (limited to 'chrome') diff --git a/chrome/browser/resources/bookmark_manager/css/bmm.css b/chrome/browser/resources/bookmark_manager/css/bmm.css index 40178e8..cff6e71 100644 --- a/chrome/browser/resources/bookmark_manager/css/bmm.css +++ b/chrome/browser/resources/bookmark_manager/css/bmm.css @@ -41,16 +41,10 @@ list > * > * { list > * > .label { -webkit-transition: all .15s; - cursor: pointer; color: black; display: inline-block; /* We need to use inline-block here due to RTL. */ } -list > :hover > .label { - text-decoration: underline; - color: blue; -} - list > * > .url { display: none; } diff --git a/chrome/browser/resources/bookmark_manager/js/bmm/bookmark_list.js b/chrome/browser/resources/bookmark_manager/js/bmm/bookmark_list.js index 410f3a8..faeb31f 100644 --- a/chrome/browser/resources/bookmark_manager/js/bmm/bookmark_list.js +++ b/chrome/browser/resources/bookmark_manager/js/bmm/bookmark_list.js @@ -196,29 +196,19 @@ cr.define('bmm', function() { * @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 @@ cr.define('bmm', function() { 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); -- cgit v1.1