зеркало из https://github.com/mozilla/pjs.git
Removes non-assignable containers from the folder tree in the bookmark
properties dialog. bug=330054 r=brettw sr=ben
This commit is contained in:
Родитель
cc3b41a11c
Коммит
4edbf4e11b
|
@ -247,16 +247,35 @@ var BookmarkPropertiesPanel = {
|
|||
this._dialogWindow = dialogWindow;
|
||||
this._controller = controller;
|
||||
|
||||
this.folderTree = this._dialogWindow.document.getElementById("folder-tree");
|
||||
this.folderTree.peerDropTypes = [];
|
||||
this.folderTree.childDropTypes = [];
|
||||
this.folderTree.excludeItems = true;
|
||||
|
||||
this._initFolderTree();
|
||||
this._initAssignableFolderResult();
|
||||
this._populateProperties();
|
||||
this._updateSize();
|
||||
},
|
||||
|
||||
|
||||
/**
|
||||
* This method initializes the folder tree. It currently uses ._load()
|
||||
* because the tree binding doesn't allow for the setting of query options
|
||||
* to suppress non-assignable containers.
|
||||
*/
|
||||
|
||||
_initFolderTree: function BPP__initFolderTree() {
|
||||
this._folderTree = this._dialogWindow.document.getElementById("folder-tree");
|
||||
this._folderTree.peerDropTypes = [];
|
||||
this._folderTree.childDropTypes = [];
|
||||
this._folderTree.excludeItems = true;
|
||||
|
||||
var query = this._hist.getNewQuery();
|
||||
query.setFolders([this._bms.placesRoot], 1);
|
||||
var options = this._hist.getNewQueryOptions();
|
||||
options.setGroupingMode([Ci.nsINavHistoryQueryOptions.GROUP_BY_FOLDER], 1);
|
||||
options.excludeReadOnlyFolders = true;
|
||||
options.excludeQueries = true;
|
||||
this._folderTree._load([query], options);
|
||||
},
|
||||
|
||||
|
||||
/**
|
||||
* This method creates a query for the set of assignable folders.
|
||||
* This only needs to be created once; when closed (using
|
||||
|
@ -559,7 +578,7 @@ var BookmarkPropertiesPanel = {
|
|||
var newURI = this._uri(urlbox.value);
|
||||
|
||||
if (this._isFolderEditable()) {
|
||||
var selected = this.folderTree.getSelectionNodes();
|
||||
var selected = this._folderTree.getSelectionNodes();
|
||||
|
||||
for (var i = 0; i < selected.length; i++) {
|
||||
var node = selected[i];
|
||||
|
|
Загрузка…
Ссылка в новой задаче