зеркало из https://github.com/mozilla/pjs.git
Fixes for numerous bookmarks bugs, e.g. 68496, 50276, 68395, 68537, 68545,
68985, various hangs, crashes, glitches etc. 68545, 68985, 68395 r=jag; Implement new bookmarks sidebar panel. a=hyatt
This commit is contained in:
Родитель
bed410d9b5
Коммит
f5b6e50643
|
@ -48,8 +48,6 @@ function Startup()
|
|||
if (window.arguments[4] == "selectFolder") {
|
||||
document.getElementById("bookmarknamegrid").setAttribute("hidden", "true");
|
||||
toggleCreateIn();
|
||||
document.getElementById("createinlabel").setAttribute("collapsed", "true");
|
||||
document.getElementById("createinbuttonbox").setAttribute("hidden", "true");
|
||||
document.getElementById("dontaskagain").setAttribute("hidden", "true");
|
||||
document.getElementById("createinseparator").setAttribute("hidden", "true");
|
||||
sizeToContent();
|
||||
|
@ -61,11 +59,8 @@ function Startup()
|
|||
gFld_Name.value = window.arguments[0] || "";
|
||||
gFld_URL.value = window.arguments[1] || "";
|
||||
gBookmarkCharset = window.arguments [3] || null;
|
||||
if (window.arguments[2]) {
|
||||
if (window.arguments[2])
|
||||
gCreateInFolder = window.arguments[2];
|
||||
document.getElementById("createin").setAttribute("hidden", "true");
|
||||
document.getElementById("folderbox").setAttribute("hidden", "true");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -74,34 +69,6 @@ function Startup()
|
|||
gFld_Name.focus();
|
||||
}
|
||||
|
||||
function toggleCreateIn()
|
||||
{
|
||||
var folderbox = document.getElementById("folderbox");
|
||||
var createInButton = document.getElementById("createin");
|
||||
var dontaskagain = document.getElementById("dontaskagain");
|
||||
var oldID, newID;
|
||||
if (folderbox.getAttribute("hidden") == "true") {
|
||||
createInButton.value = createInButton.getAttribute("value2");
|
||||
folderbox.removeAttribute("hidden");
|
||||
dontaskagain.removeAttribute("hidden");
|
||||
oldID = "buttonsparent";
|
||||
newID = "openParent";
|
||||
}
|
||||
else {
|
||||
createInButton.value = createInButton.getAttribute("value1");
|
||||
folderbox.setAttribute("hidden", "true");
|
||||
dontaskagain.setAttribute("hidden", "true");
|
||||
oldID = "openParent";
|
||||
newID = "buttonsparent";
|
||||
}
|
||||
var oldParent = document.getElementById(oldID);
|
||||
var newParent = document.getElementById(newID);
|
||||
var buttons = oldParent.firstChild.cloneNode(true);
|
||||
oldParent.removeChild(oldParent.firstChild);
|
||||
newParent.appendChild(buttons);
|
||||
sizeToContent();
|
||||
}
|
||||
|
||||
function onLocationInput ()
|
||||
{
|
||||
var ok = document.getElementById("ok");
|
||||
|
@ -127,6 +94,7 @@ function onOK()
|
|||
catch (e) {
|
||||
// No "NC:NewBookmarkFolder" exists, just append to the root.
|
||||
rFolder = kRDF.GetResource("NC:BookmarksRoot", true);
|
||||
kRDFC.Init(kBMDS, rFolder);
|
||||
}
|
||||
if (!gFld_URL.value) return;
|
||||
|
||||
|
@ -163,8 +131,10 @@ function onTreeSelect ()
|
|||
{
|
||||
if (gFolderTree.selectedItems.length < 1)
|
||||
gCreateInFolder = "NC:NewBookmarkFolder";
|
||||
var selectedItem = gFolderTree.selectedItems[0];
|
||||
gCreateInFolder = selectedItem.id;
|
||||
else {
|
||||
var selectedItem = gFolderTree.selectedItems[0];
|
||||
gCreateInFolder = selectedItem.id;
|
||||
}
|
||||
}
|
||||
|
||||
var gBookmarksShell = null;
|
||||
|
@ -195,5 +165,3 @@ function useDefaultFolder ()
|
|||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
|
|
@ -82,19 +82,7 @@
|
|||
|
||||
<separator id="createinseparator"/>
|
||||
|
||||
<box id="createinbuttonbox">
|
||||
<button id="createin" class="disclosure-triangle" value="&button.createin.label;"
|
||||
accesskey="&button.createin.accesskey;"
|
||||
value1="&button.createin.label;"
|
||||
value2="&button.createin2.label;"
|
||||
oncommand="toggleCreateIn();"/>
|
||||
<spring flex="1"/>
|
||||
<box id="buttonsparent">
|
||||
<box id="okCancelButtonsRight"/>
|
||||
</box>
|
||||
</box>
|
||||
|
||||
<box id="folderbox" orient="vertical" hidden="true" flex="1">
|
||||
<box id="folderbox" orient="vertical" flex="1">
|
||||
<separator/>
|
||||
<grid flex="1">
|
||||
<columns>
|
||||
|
@ -144,15 +132,16 @@
|
|||
</grid>
|
||||
<separator/>
|
||||
</box>
|
||||
|
||||
|
||||
<!-- XXX - todo - remove all the create-in code -->
|
||||
<box valign="bottom">
|
||||
<box autostretch="never">
|
||||
<checkbox id="dontaskagain" hidden="true"
|
||||
<checkbox id="dontaskagain"
|
||||
value="&alwayscreateinfolder.label;"
|
||||
accesskey="&alwayscreateinfolder.accesskey;"/>
|
||||
</box>
|
||||
<spring flex="1"/>
|
||||
<box id="openParent" orient="vertical"/>
|
||||
<box id="okCancelButtonsRight"/>
|
||||
</box>
|
||||
|
||||
</window>
|
|
@ -131,6 +131,10 @@ BookmarksWindowTree.prototype = {
|
|||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Number of clicks to activate a bookmark.
|
||||
openClickCount: 2,
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Open Bookmark in new window
|
||||
openNewWindow: true,
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Selection change (clicks, key navigation) in the tree update the statusbar
|
||||
|
|
|
@ -36,9 +36,44 @@
|
|||
|
||||
<popupset id="popupset">
|
||||
<popup id="bmContext"
|
||||
oncreate="if (gBookmarksShell) gBookmarksShell.createContextMenu(event);"/>
|
||||
oncreate="gBookmarksShell.createContextMenu(event);"/>
|
||||
</popupset>
|
||||
|
||||
<commands id="commands">
|
||||
<commandset id="bookmarksItems">
|
||||
<command id="cmd_open" oncommand="goDoCommand('cmd_open');"/>
|
||||
<command id="cmd_openfolder" oncommand="goDoCommand('cmd_openfolder');"/>
|
||||
<command id="cmd_newfolder" oncommand="goDoCommand('cmd_newfolder');"/>
|
||||
<command id="cmd_newbookmark" oncommand="goDoCommand('cmd_newbookmark');"/>
|
||||
<command id="cmd_newseparator" oncommand="goDoCommand('cmd_newseparator');"/>
|
||||
<command id="cmd_find" oncommand="goDoCommand('cmd_find');"/>
|
||||
<command id="cmd_setnewbookmarkfolder" oncommand="goDoCommand('cmd_setnewbookmarkfolder');"/>
|
||||
<command id="cmd_setpersonaltoolbarfolder" oncommand="goDoCommand('cmd_setpersonaltoolbarfolder');"/>
|
||||
<command id="cmd_setnewsearchfolder" oncommand="goDoCommand('cmd_setnewsearchfolder');"/>
|
||||
<command id="cmd_properties" oncommand="goDoCommand('cmd_properties');"/>
|
||||
<command id="cmd_rename" oncommand="goDoCommand('cmd_rename');"/>
|
||||
<command id="cmd_openfolderinnewwindow" oncommand="goDoCommand('cmd_openfolderinnewwindow');"/>
|
||||
<command id="cmd_import" oncommand="goDoCommand('cmd_import');"/>
|
||||
<command id="cmd_export" oncommand="goDoCommand('cmd_export');"/>
|
||||
</commandset>
|
||||
<commandset id="CommandUpdate_Bookmarks"
|
||||
commandupdater="true"
|
||||
events="focus,tree-select"
|
||||
oncommandupdate="BookmarksTree.prototype.controller.onCommandUpdate()">
|
||||
</commandset>
|
||||
<commandset id="selectEditMenuItems"/>
|
||||
<commandset id="globalEditMenuItems"/>
|
||||
<commandset id="bookmarksItems"/>
|
||||
</commands>
|
||||
|
||||
<broadcasterset id="broadcasterset">
|
||||
<broadcaster id="cmd_cut"/>
|
||||
<broadcaster id="cmd_copy"/>
|
||||
<broadcaster id="cmd_paste"/>
|
||||
<broadcaster id="cmd_delete"/>
|
||||
<broadcaster id="cmd_selectAll"/>
|
||||
</broadcasterset>
|
||||
|
||||
</overlay>
|
||||
|
||||
|
|
@ -41,6 +41,9 @@
|
|||
<!ENTITY command.delete.label "Delete">
|
||||
<!ENTITY command.fileBookmark.label "File Bookmark">
|
||||
<!ENTITY command.fileBookmark.accesskey "l">
|
||||
<!ENTITY command.addBookmark.label "Add...">
|
||||
<!ENTITY command.manageBookmarks.label "Manage">
|
||||
|
||||
|
||||
<!ENTITY menuitem.view.command.toolbar.label "Toolbar">
|
||||
<!ENTITY menuitem.view.command.toolbar.accesskey "t">
|
||||
|
|
Загрузка…
Ссылка в новой задаче