зеркало из 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 nodes = this._view.getSelectionNodes();
|
||||||
var root = this._view.getResultNode();
|
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) {
|
for (var i = 0; i < nodes.length; ++i) {
|
||||||
// Disallow removing the view's root node
|
// Disallow removing the view's root node
|
||||||
if (nodes[i] == root)
|
if (nodes[i] == root)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
// Disallow removing the toolbar folder
|
// Disallow removing the toolbar, menu and unfiled-bookmarks folders
|
||||||
|
var nodeItemId = nodes[i].itemId;
|
||||||
if (!aIsMoveCommand &&
|
if (!aIsMoveCommand &&
|
||||||
PlacesUtils.nodeIsFolder(nodes[i]) &&
|
PlacesUtils.nodeIsFolder(nodes[i]) &&
|
||||||
(nodes[i].itemId == btFolderId ||
|
(nodeItemId == PlacesUtils.toolbarFolderId ||
|
||||||
nodes[i].itemId == ubFolderId ||
|
nodeItemId == PlacesUtils.unfiledBookmarksFolderId ||
|
||||||
nodes[i].itemId == bmFolderId))
|
nodeItemId == PlacesUtils.bookmarksMenuFolderId))
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
// We don't call nodeIsReadOnly here, because nodeIsReadOnly means that
|
// We don't call nodeIsReadOnly here, because nodeIsReadOnly means that
|
||||||
|
|
Загрузка…
Ссылка в новой задаче