зеркало из https://github.com/mozilla/pjs.git
Bug 702081 - Add back the folder picker to bookmarks dialog missing it.
r=dietrich
This commit is contained in:
Родитель
362a704df6
Коммит
a28a7787eb
|
@ -137,7 +137,6 @@ let RemoteTabViewer = {
|
|||
, title: title
|
||||
, hiddenRows: [ "description"
|
||||
, "location"
|
||||
, "folderPicker"
|
||||
, "loadInSidebar"
|
||||
, "keyword" ]
|
||||
}, window.top);
|
||||
|
|
|
@ -386,7 +386,6 @@ var PlacesCommandHook = {
|
|||
, hiddenRows: [ "description"
|
||||
, "location"
|
||||
, "loadInSidebar"
|
||||
, "folderPicker"
|
||||
, "keyword" ]
|
||||
}, window);
|
||||
}
|
||||
|
|
|
@ -3163,7 +3163,6 @@ var bookmarksButtonObserver = {
|
|||
, hiddenRows: [ "description"
|
||||
, "location"
|
||||
, "loadInSidebar"
|
||||
, "folderPicker"
|
||||
, "keyword" ]
|
||||
}, window);
|
||||
} catch(ex) { }
|
||||
|
@ -5792,7 +5791,6 @@ function contentAreaClick(event, isPanelClick)
|
|||
, loadBookmarkInSidebar: true
|
||||
, hiddenRows: [ "description"
|
||||
, "location"
|
||||
, "folderPicker"
|
||||
, "keyword" ]
|
||||
}, window);
|
||||
event.preventDefault();
|
||||
|
@ -6839,8 +6837,9 @@ function AddKeywordForSearchField() {
|
|||
, postData: postData
|
||||
, charSet: charset
|
||||
, hiddenRows: [ "location"
|
||||
, "loadInSidebar"
|
||||
, "folderPicker" ]
|
||||
, "description"
|
||||
, "tags"
|
||||
, "loadInSidebar" ]
|
||||
}, window);
|
||||
}
|
||||
|
||||
|
|
|
@ -1406,7 +1406,6 @@ nsContextMenu.prototype = {
|
|||
, hiddenRows: [ "description"
|
||||
, "location"
|
||||
, "loadInSidebar"
|
||||
, "folderPicker"
|
||||
, "keyword" ]
|
||||
}, window.top);
|
||||
}
|
||||
|
|
|
@ -264,8 +264,6 @@ var BookmarkPropertiesPanel = {
|
|||
NS_ASSERT("itemId" in dialogInfo);
|
||||
this._itemId = dialogInfo.itemId;
|
||||
this._title = PlacesUtils.bookmarks.getItemTitle(this._itemId);
|
||||
// Don't show folderPicker when editing
|
||||
this._hiddenRows.push("folderPicker");
|
||||
this._readOnly = !!dialogInfo.readOnly;
|
||||
|
||||
switch (dialogInfo.type) {
|
||||
|
|
|
@ -309,7 +309,6 @@ PlacesController.prototype = {
|
|||
, hiddenRows: [ "description"
|
||||
, "keyword"
|
||||
, "location"
|
||||
, "folderPicker"
|
||||
, "loadInSidebar" ]
|
||||
, uri: NetUtil.newURI(node.uri)
|
||||
, title: node.title
|
||||
|
@ -721,6 +720,7 @@ PlacesController.prototype = {
|
|||
, type: itemType
|
||||
, itemId: itemId
|
||||
, readOnly: isRootItem
|
||||
, hiddenRows: [ "folderPicker" ]
|
||||
}, window.top);
|
||||
},
|
||||
|
||||
|
|
|
@ -340,29 +340,36 @@ var PlacesUIUtils = {
|
|||
* See documentation at the top of bookmarkProperties.js
|
||||
* @param aWindow
|
||||
* Owner window for the new dialog.
|
||||
* @param aMinimalUI [optional]
|
||||
* Whether to open the dialog in "minimal ui" mode. Do not pass this
|
||||
* for new callers. It'll be removed in a future release.
|
||||
* @param aResizable [optional]
|
||||
* Whether the dialog is allowed to resize. Do not pass this for new
|
||||
* callers since it's deprecated. It'll be removed in future releases.
|
||||
*
|
||||
* @see documentation at the top of bookmarkProperties.js
|
||||
* @return true if any transaction has been performed, false otherwise.
|
||||
*/
|
||||
showBookmarkDialog:
|
||||
function PUIU_showBookmarkDialog(aInfo, aParentWindow, aMinimalUI) {
|
||||
function PUIU_showBookmarkDialog(aInfo, aParentWindow, aResizable) {
|
||||
// This is a compatibility shim for add-ons. It will warn in the Error
|
||||
// Console when used.
|
||||
if (!aParentWindow) {
|
||||
aParentWindow = this._getWindow(null);
|
||||
}
|
||||
|
||||
// Preserve size attributes differently based on the fact the dialog has
|
||||
// a folder picker or not.
|
||||
let minimalUI = "hiddenRows" in aInfo &&
|
||||
aInfo.hiddenRows.indexOf("folderPicker") != -1;
|
||||
let dialogURL = aMinimalUI ?
|
||||
// a folder picker or not. If the picker is visible, the dialog should
|
||||
// be resizable since it may not show enough content for the folders
|
||||
// hierarchy.
|
||||
let hasFolderPicker = !("hiddenRows" in aInfo) ||
|
||||
aInfo.hiddenRows.indexOf("folderPicker") == -1;
|
||||
let resizable = aResizable !== undefined ? aResizable : hasFolderPicker;
|
||||
// Use a different chrome url, since this allows to persist different sizes,
|
||||
// based on resizability of the dialog.
|
||||
let dialogURL = resizable ?
|
||||
"chrome://browser/content/places/bookmarkProperties2.xul" :
|
||||
"chrome://browser/content/places/bookmarkProperties.xul";
|
||||
|
||||
let features =
|
||||
"centerscreen,chrome,modal,resizable=" + (aMinimalUI ? "yes" : "no");
|
||||
"centerscreen,chrome,modal,resizable=" + (resizable ? "yes" : "no");
|
||||
|
||||
aParentWindow.openDialog(dialogURL, "", features, aInfo);
|
||||
return ("performed" in aInfo && aInfo.performed);
|
||||
|
|
|
@ -110,9 +110,7 @@ function (aTitle, aContentURL, aCustomizeURL, aPersist)
|
|||
, type: "bookmark"
|
||||
, hiddenRows: [ "description"
|
||||
, "keyword"
|
||||
, "location"
|
||||
, "folderPicker"
|
||||
, "loadInSidebar" ]
|
||||
, "location" ]
|
||||
, uri: uri
|
||||
, title: aTitle
|
||||
, loadBookmarkInSidebar: true
|
||||
|
|
Загрузка…
Ссылка в новой задаче