зеркало из https://github.com/mozilla/pjs.git
bugs 110156, 110155
Removing support for <outliner> tags Removing <tree> layout code and moving <tree> tags to outliner layout Convert all usage of <outliner> to tree tags Convert all usage of <tree> tags to new <tree> syntax or <listbox> r=cmanske,varga sr=hyatt,sspitzer a=asa Also includes fixes by Jan Varga (varga@utcruk.sk) for bugs 132020, 133451, 131393, 115894, and 129327
This commit is contained in:
Родитель
92eb01724d
Коммит
6636073e5e
|
@ -125,8 +125,8 @@ function Startup()
|
|||
if (window.arguments[2])
|
||||
folderItem = bookmarkView.rdf.GetResource(window.arguments[2]);
|
||||
if (folderItem) {
|
||||
var ind = bookmarkView.outlinerBuilder.getIndexOfResource(folderItem);
|
||||
bookmarkView.outlinerBoxObject.selection.select(ind);
|
||||
var ind = bookmarkView.treeBuilder.getIndexOfResource(folderItem);
|
||||
bookmarkView.treeBoxObject.selection.select(ind);
|
||||
}
|
||||
break;
|
||||
case "newBookmark":
|
||||
|
@ -147,8 +147,8 @@ function Startup()
|
|||
gCreateInFolder = window.arguments[2];
|
||||
folderItem = bookmarkView.rdf.GetResource(gCreateInFolder);
|
||||
if (folderItem) {
|
||||
var ind = bookmarkView.outlinerBuilder.getIndexOfResource(folderItem);
|
||||
bookmarkView.outlinerBoxObject.selection.select(ind);
|
||||
var ind = bookmarkView.treeBuilder.getIndexOfResource(folderItem);
|
||||
bookmarkView.treeBoxObject.selection.select(ind);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -157,9 +157,9 @@ function Startup()
|
|||
if (shouldSetOKButton)
|
||||
onFieldInput();
|
||||
if (document.getElementById("bookmarknamegrid").hasAttribute("hidden")) {
|
||||
bookmarkView.outliner.focus();
|
||||
bookmarkView.tree.focus();
|
||||
if (bookmarkView.currentIndex == -1)
|
||||
bookmarkView.outlinerBoxObject.selection.select(0);
|
||||
bookmarkView.treeBoxObject.selection.select(0);
|
||||
}
|
||||
else {
|
||||
gFld_Name.select();
|
||||
|
@ -190,7 +190,7 @@ function onOK()
|
|||
var bookmarkView = document.getElementById("bookmarks-view");
|
||||
var currentIndex = bookmarkView.currentIndex;
|
||||
if (currentIndex != -1)
|
||||
gCreateInFolder = bookmarkView.outlinerBuilder.getResourceAtIndex(currentIndex).Value;
|
||||
gCreateInFolder = bookmarkView.treeBuilder.getResourceAtIndex(currentIndex).Value;
|
||||
}
|
||||
// In Select Folder Mode, do nothing but tell our caller what
|
||||
// folder was selected.
|
||||
|
@ -254,14 +254,14 @@ function useDefaultFolder ()
|
|||
if (sources.hasMoreElements()) {
|
||||
folder = sources.getNext().QueryInterface(Components.interfaces.nsIRDFResource);
|
||||
}
|
||||
var ind = bookmarkView.outlinerBuilder.getIndexOfResource(folder);
|
||||
var ind = bookmarkView.treeBuilder.getIndexOfResource(folder);
|
||||
if (ind != -1) {
|
||||
bookmarkView.outliner.focus();
|
||||
bookmarkView.outlinerBoxObject.selection.select(ind);
|
||||
bookmarkView.tree.focus();
|
||||
bookmarkView.treeBoxObject.selection.select(ind);
|
||||
gCreateInFolder = folder.Value;
|
||||
}
|
||||
else {
|
||||
bookmarkView.outlinerBoxObject.selection.clearSelection();
|
||||
bookmarkView.treeBoxObject.selection.clearSelection();
|
||||
gCreateInFolder = "NC:BookmarksRoot";
|
||||
}
|
||||
}
|
||||
|
|
|
@ -86,7 +86,7 @@
|
|||
<hbox flex="1">
|
||||
<label id="createinlabel" value="&createin.label;"/>
|
||||
<hbox flex="1">
|
||||
<bookmarks-outliner id="bookmarks-view" flex="1" type="folders"/>
|
||||
<bookmarks-tree id="bookmarks-view" flex="1" type="folders"/>
|
||||
<vbox>
|
||||
<button label="&button.newfolder.label;" accesskey="&button.newfolder.accesskey;"
|
||||
oncommand="createNewFolder();"/>
|
||||
|
|
|
@ -82,5 +82,6 @@
|
|||
oncommand="document.getElementById('bookmarks-view').openFindDialog();"/>
|
||||
</hbox>
|
||||
|
||||
<bookmarks-outliner class="sidebar" id="bookmarks-view" type="single-column" flex="1"/>
|
||||
<bookmarks-tree id="bookmarks-view" class="sidebar" type="single-column" flex="1"/>
|
||||
|
||||
</page>
|
||||
|
|
|
@ -1,14 +1,14 @@
|
|||
bookmarks-outliner, bookmarks-outliner[type="multi-column"]
|
||||
bookmarks-tree, bookmarks-tree[type="multi-column"]
|
||||
{
|
||||
-moz-binding : url("chrome://communicator/content/bookmarks/bookmarks.xml#bookmarks-outliner-full");
|
||||
-moz-binding : url("chrome://communicator/content/bookmarks/bookmarks.xml#bookmarks-tree-full");
|
||||
}
|
||||
|
||||
bookmarks-outliner[type="single-column"]
|
||||
bookmarks-tree[type="single-column"]
|
||||
{
|
||||
-moz-binding : url("chrome://communicator/content/bookmarks/bookmarks.xml#bookmarks-outliner-name");
|
||||
-moz-binding : url("chrome://communicator/content/bookmarks/bookmarks.xml#bookmarks-tree-name");
|
||||
}
|
||||
|
||||
bookmarks-outliner[type="folders"]
|
||||
bookmarks-tree[type="folders"]
|
||||
{
|
||||
-moz-binding : url("chrome://communicator/content/bookmarks/bookmarks.xml#bookmarks-outliner-folders");
|
||||
-moz-binding : url("chrome://communicator/content/bookmarks/bookmarks.xml#bookmarks-tree-folders");
|
||||
}
|
|
@ -22,16 +22,18 @@
|
|||
*/
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
// Initialize the command controllers, set focus, outliner root,
|
||||
// Initialize the command controllers, set focus, tree root,
|
||||
// window title state, etc.
|
||||
function Startup()
|
||||
{
|
||||
var bookmarksView = document.getElementById("bookmarks-view");
|
||||
|
||||
const windowNode = document.getElementById("bookmark-window");
|
||||
// If we've been opened with a parameter, root the outliner on it.
|
||||
// If we've been opened with a parameter, root the tree on it.
|
||||
if ("arguments" in window && window.arguments[0]) {
|
||||
var uri = window.arguments[0];
|
||||
bookmarksView.outliner.setAttribute("ref", uri);
|
||||
|
||||
bookmarksView.tree.setAttribute("ref", uri);
|
||||
|
||||
var title = "";
|
||||
if (uri.substring(0,5) == "find:") {
|
||||
|
@ -58,8 +60,8 @@ function Startup()
|
|||
windowNode.setAttribute("title", rootfoldername);
|
||||
}
|
||||
|
||||
bookmarksView.outlinerBoxObject.selection.select(0);
|
||||
bookmarksView.outliner.focus();
|
||||
bookmarksView.treeBoxObject.selection.select(0);
|
||||
bookmarksView.tree.focus();
|
||||
}
|
||||
|
||||
function Shutdown ()
|
||||
|
@ -77,10 +79,10 @@ function Shutdown ()
|
|||
|
||||
function updateSendLinkItem()
|
||||
{
|
||||
var outliner = document.getElementById("bookmarks-view");
|
||||
var tree = document.getElementById("bookmarks-view");
|
||||
var command = document.getElementById("Browser:SendLink");
|
||||
if (command) {
|
||||
if (outliner.canSendLink())
|
||||
if (tree.canSendLink())
|
||||
command.removeAttribute("disabled");
|
||||
else
|
||||
command.setAttribute("disabled", "true");
|
||||
|
@ -89,8 +91,8 @@ function updateSendLinkItem()
|
|||
|
||||
function sendBookmarksLink()
|
||||
{
|
||||
var outliner = document.getElementById("bookmarks-view");
|
||||
outliner.sendLink();
|
||||
var tree = document.getElementById("bookmarks-view");
|
||||
tree.sendLink();
|
||||
}
|
||||
|
||||
var gConstructedViewMenuSortItems = false;
|
||||
|
|
|
@ -65,7 +65,7 @@ function find()
|
|||
|
||||
// Update the root of the tree if we're using an existing search window.
|
||||
if (!gCreatingNewWindow)
|
||||
bmWindow.document.getElementById("bookmarks-view").outliner.setAttribute("ref", searchURI);
|
||||
bmWindow.document.getElementById("bookmarks-view").tree.setAttribute("ref", searchURI);
|
||||
|
||||
bmWindow.focus();
|
||||
|
||||
|
|
|
@ -66,20 +66,20 @@
|
|||
<!ENTITY menuitem.personaltoolbarfolder.label "Set as Personal Toolbar Folder">
|
||||
<!ENTITY menuitem.personaltoolbarfolder.accesskey "p">
|
||||
|
||||
<!ENTITY outlinercol.name.label "Name">
|
||||
<!ENTITY outlinercol.name.accesskey "n">
|
||||
<!ENTITY outlinercol.url.label "Location">
|
||||
<!ENTITY outlinercol.url.accesskey "l">
|
||||
<!ENTITY outlinercol.shortcut.label "Keyword">
|
||||
<!ENTITY outlinercol.shortcut.accesskey "k">
|
||||
<!ENTITY outlinercol.addedon.label "Added">
|
||||
<!ENTITY outlinercol.addedon.accesskey "a">
|
||||
<!ENTITY outlinercol.lastmod.label "Last Modified">
|
||||
<!ENTITY outlinercol.lastmod.accesskey "m">
|
||||
<!ENTITY outlinercol.lastvisit.label "Last Visited">
|
||||
<!ENTITY outlinercol.lastvisit.accesskey "b">
|
||||
<!ENTITY outlinercol.description.label "Description">
|
||||
<!ENTITY outlinercol.description.accesskey "d">
|
||||
<!ENTITY treecol.name.label "Name">
|
||||
<!ENTITY treecol.name.accesskey "n">
|
||||
<!ENTITY treecol.url.label "Location">
|
||||
<!ENTITY treecol.url.accesskey "l">
|
||||
<!ENTITY treecol.shortcut.label "Keyword">
|
||||
<!ENTITY treecol.shortcut.accesskey "k">
|
||||
<!ENTITY treecol.addedon.label "Added">
|
||||
<!ENTITY treecol.addedon.accesskey "a">
|
||||
<!ENTITY treecol.lastmod.label "Last Modified">
|
||||
<!ENTITY treecol.lastmod.accesskey "m">
|
||||
<!ENTITY treecol.lastvisit.label "Last Visited">
|
||||
<!ENTITY treecol.lastvisit.accesskey "b">
|
||||
<!ENTITY treecol.description.label "Description">
|
||||
<!ENTITY treecol.description.accesskey "d">
|
||||
|
||||
<!ENTITY bookmarksWindowTitle.label "Bookmarks">
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче