зеркало из https://github.com/mozilla/gecko-dev.git
Bug 401333 - Can't expand folder tree of Edit bookmark dialog. r=sspitzer, a=mconnor.
This commit is contained in:
Родитель
099dde5e43
Коммит
bd8d2663b5
|
@ -571,11 +571,28 @@ var gEditItemOverlay = {
|
|||
expander.className = "expander-up"
|
||||
expander.setAttribute("tooltiptext",
|
||||
expander.getAttribute("tooltiptextup"));
|
||||
if (!this._folderTree.treeBoxObject.view.isContainerOpen(0))
|
||||
this._folderTree.treeBoxObject.view.toggleOpenState(0);
|
||||
this._folderTree.selectFolders([this._getFolderIdFromMenuList()]);
|
||||
this._folderTree.collapsed = false;
|
||||
this._folderTree.focus();
|
||||
if (!this._folderTree.place) {
|
||||
const FOLDER_TREE_PLACE_URI =
|
||||
"place:folder=2&excludeItems=1&excludeQueries=1&excludeReadOnlyFolders=1";
|
||||
this._folderTree.place = FOLDER_TREE_PLACE_URI;
|
||||
}
|
||||
|
||||
var currentFolder = this._getFolderIdFromMenuList();
|
||||
// Don't select anything in the tree if the item is "unfiled"
|
||||
if (currentFolder == PlacesUtils.unfiledRootId)
|
||||
this._folderTree.selectFolders([]);
|
||||
else {
|
||||
this._folderTree.selectFolders([currentFolder]);
|
||||
this._folderTree.focus();
|
||||
}
|
||||
|
||||
if ((currentFolder == PlacesUtils.bookmarksRootId ||
|
||||
currentFolder == PlacesUtils.unfiledRootId) &&
|
||||
!this._folderTree.treeBoxObject.view.isContainerOpen(0)) {
|
||||
// Expand the root node if selectFolder didn't
|
||||
this._folderTree.treeBoxObject.view.toggleOpenState(0);
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
|
|
|
@ -144,7 +144,6 @@
|
|||
collapsed="true"
|
||||
onselect="gEditItemOverlay.onFolderTreeSelect();"
|
||||
showRoot="true"
|
||||
place="place:folder=2&excludeItems=1&excludeQueries=1&excludeReadOnlyFolders=1"
|
||||
hidecolumnpicker="true"
|
||||
observes="paneElementsBroadcaster">
|
||||
<treecols>
|
||||
|
|
|
@ -78,11 +78,13 @@
|
|||
var resultview = this.getResultView();
|
||||
if (resultview)
|
||||
resultview.removeViewObserver(this._viewObserver);
|
||||
|
||||
this.treeBoxObject.view = val;
|
||||
if (val) {
|
||||
val.QueryInterface(Ci.nsINavHistoryResultViewer)
|
||||
.addViewObserver(this._viewObserver, false);
|
||||
}
|
||||
return val;
|
||||
]]></setter>
|
||||
</property>
|
||||
|
||||
|
@ -109,11 +111,11 @@
|
|||
if (optionsFilter)
|
||||
options = optionsFilter.filter(queryNode.getQueries({}), options,
|
||||
optionsFilter.historyHandler);
|
||||
|
||||
|
||||
var query = PlacesUtils.history.getNewQuery();
|
||||
query.searchTerms = filterString;
|
||||
query.onlyBookmarked = onlyBookmarks;
|
||||
|
||||
|
||||
// Remove "group by folder" from the options list, because
|
||||
// nsNavHistory::RecursiveGroup doesn't support it.
|
||||
function isFolderGrouping(grouping, index, ary) {
|
||||
|
@ -274,7 +276,7 @@
|
|||
<getter><![CDATA[
|
||||
return this.getAttribute("place");
|
||||
]]></getter>
|
||||
<setter><![CDATA[
|
||||
<setter><![CDATA[
|
||||
this.setAttribute("place", val);
|
||||
|
||||
var queriesRef = { };
|
||||
|
|
Загрузка…
Ссылка в новой задаче