зеркало из https://github.com/mozilla/pjs.git
Bug 405237 - "deleting "Unfiled Bookmarks" or "bookmarks menu" folders breaks places organizer (should be undeletable)" (Supplimental perf fix) [p=mak77@supereva.it (Marco Bonardo [MaK77]) r=Mano a=blocking1.9+ P1 for M10]
This commit is contained in:
Родитель
a287d7d585
Коммит
1374cd6b4b
|
@ -278,21 +278,18 @@ PlacesController.prototype = {
|
|||
var nodes = this._view.getSelectionNodes();
|
||||
var root = this._view.getResultNode();
|
||||
|
||||
var bmFolderId = PlacesUtils.bookmarksMenuFolderId;
|
||||
var ubFolderId = PlacesUtils.unfiledBookmarksFolderId;
|
||||
var btFolderId = PlacesUtils.toolbarFolderId;
|
||||
|
||||
for (var i = 0; i < nodes.length; ++i) {
|
||||
// Disallow removing the view's root node
|
||||
if (nodes[i] == root)
|
||||
return false;
|
||||
|
||||
// Disallow removing the toolbar folder
|
||||
// Disallow removing the toolbar, menu and unfiled-bookmarks folders
|
||||
var nodeItemId = nodes[i].itemId;
|
||||
if (!aIsMoveCommand &&
|
||||
PlacesUtils.nodeIsFolder(nodes[i]) &&
|
||||
(nodes[i].itemId == btFolderId ||
|
||||
nodes[i].itemId == ubFolderId ||
|
||||
nodes[i].itemId == bmFolderId))
|
||||
PlacesUtils.nodeIsFolder(nodes[i]) &&
|
||||
(nodeItemId == PlacesUtils.toolbarFolderId ||
|
||||
nodeItemId == PlacesUtils.unfiledBookmarksFolderId ||
|
||||
nodeItemId == PlacesUtils.bookmarksMenuFolderId))
|
||||
return false;
|
||||
|
||||
// We don't call nodeIsReadOnly here, because nodeIsReadOnly means that
|
||||
|
|
Загрузка…
Ссылка в новой задаче