From a4e39bf5c40d1b71de89971750b3378c957f9f03 Mon Sep 17 00:00:00 2001 From: "arv@chromium.org" Date: Mon, 22 Feb 2010 21:18:57 +0000 Subject: Bookmark manager drag and drop. This is the HTML part of http://codereview.chromium.org/596105 BUG=4890 TEST=Try the following: Dragging and dropping within the bookmark manager Dragging and dropping from/to the bookmark bar Dragging and dropping from/to the old bookmark manager Dragging and dropping from/to the bookmark manager from another instance of Chrome. This should copy the items instead of moving them. Review URL: http://codereview.chromium.org/646076 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@39631 0039d316-1c4b-4281-b951-d872f2087c98 --- .../bookmark_manager/js/bmm/bookmarklist.js | 6 +- .../browser/resources/bookmark_manager/main.html | 314 ++++++++++----------- .../resources/bookmark_manager/manifest.json | 3 + 3 files changed, 164 insertions(+), 159 deletions(-) (limited to 'chrome/browser/resources') diff --git a/chrome/browser/resources/bookmark_manager/js/bmm/bookmarklist.js b/chrome/browser/resources/bookmark_manager/js/bmm/bookmarklist.js index 0505d25..e1ea344 100644 --- a/chrome/browser/resources/bookmark_manager/js/bmm/bookmarklist.js +++ b/chrome/browser/resources/bookmark_manager/js/bmm/bookmarklist.js @@ -61,7 +61,11 @@ cr.define('bmm', function() { cr.dispatchSimpleEvent(this, 'invalidId'); return; } - listLookup = {}; + // Remove all fields without recreating the object since other code + // references it. + for (var id in listLookup){ + delete listLookup[id]; + } this.clear(); var showFolder = this.showFolder(); items.forEach(function(item) { diff --git a/chrome/browser/resources/bookmark_manager/main.html b/chrome/browser/resources/bookmark_manager/main.html index 3f24d4a..c8a1f7c 100644 --- a/chrome/browser/resources/bookmark_manager/main.html +++ b/chrome/browser/resources/bookmark_manager/main.html @@ -9,22 +9,6 @@ found in the LICENSE file. This is work in progress: -i18n: Expose a chrome.experimental.bookmarkManager.getLocalStrings - -import/export: Expose in experimental extension API. - -Internal DnD: Buggy when dragging multiple items (the order of the dropped items -is not correct. - -External DnD: Chrome doesn't follow HTML5 and it limits the data types to text -and a single URL. Fixing Chrome is unreasonable given our current time frame. -There are two options here. Disable external DnD or expose enough hooks in the -experimental bookmarks manager extension API. - -Clipboard: Once again Chrome does not correctly implement HTML5 and it only -allows text and url. We can either disable the clipboard actions, only allow -internal clipboard or expose the hooks in the extension api. - Favicons: chrome-extension: is not allowed to access chrome://favicon. We need to whitelist it or expose a way to get the data URI for the favicon (slow and sucky). @@ -67,7 +51,6 @@ html, body { margin: 0; width: 100%; height: 100%; - /*-webkit-user-select: none;*/ cursor: default; font: 13px arial; } @@ -453,9 +436,6 @@ tree.addEventListener('change', function() { navigateTo(tree.selectedItem.bookmarkId); }); - - - diff --git a/chrome/browser/resources/bookmark_manager/manifest.json b/chrome/browser/resources/bookmark_manager/manifest.json index eca3190..7e05e6c 100644 --- a/chrome/browser/resources/bookmark_manager/manifest.json +++ b/chrome/browser/resources/bookmark_manager/manifest.json @@ -2,6 +2,9 @@ "name": "Bookmark Manager", "version": "0.1", "description": "Bookmark Manager", + "icons": { + "16": "images/bookmarks_favicon.png" + }, "permissions": [ "bookmarks", "experimental", -- cgit v1.1