зеркало из https://github.com/mozilla/gecko-dev.git
bug 377799 - Move bookmarks chrome to suite/ - remove old, now unused files, r+sr=Neil
This commit is contained in:
Родитель
810faa9744
Коммит
a265ed9b15
|
@ -1,46 +0,0 @@
|
|||
#
|
||||
# ***** BEGIN LICENSE BLOCK *****
|
||||
# Version: MPL 1.1/GPL 2.0/LGPL 2.1
|
||||
#
|
||||
# The contents of this file are subject to the Mozilla Public License Version
|
||||
# 1.1 (the "License"); you may not use this file except in compliance with
|
||||
# the License. You may obtain a copy of the License at
|
||||
# http://www.mozilla.org/MPL/
|
||||
#
|
||||
# Software distributed under the License is distributed on an "AS IS" basis,
|
||||
# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||
# for the specific language governing rights and limitations under the
|
||||
# License.
|
||||
#
|
||||
# The Original Code is mozilla.org code.
|
||||
#
|
||||
# The Initial Developer of the Original Code is
|
||||
# Netscape Communications Corporation.
|
||||
# Portions created by the Initial Developer are Copyright (C) 1998
|
||||
# the Initial Developer. All Rights Reserved.
|
||||
#
|
||||
# Contributor(s):
|
||||
#
|
||||
# Alternatively, the contents of this file may be used under the terms of
|
||||
# either of the GNU General Public License Version 2 or later (the "GPL"),
|
||||
# or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
|
||||
# in which case the provisions of the GPL or the LGPL are applicable instead
|
||||
# of those above. If you wish to allow use of your version of this file only
|
||||
# under the terms of either the GPL or the LGPL, and not to allow others to
|
||||
# use your version of this file under the terms of the MPL, indicate your
|
||||
# decision by deleting the provisions above and replace them with the notice
|
||||
# and other provisions required by the GPL or the LGPL. If you do not delete
|
||||
# the provisions above, a recipient may use your version of this file under
|
||||
# the terms of any one of the MPL, the GPL or the LGPL.
|
||||
#
|
||||
# ***** END LICENSE BLOCK *****
|
||||
|
||||
DEPTH = ../../../..
|
||||
topsrcdir = @top_srcdir@
|
||||
srcdir = @srcdir@
|
||||
VPATH = @srcdir@
|
||||
|
||||
include $(DEPTH)/config/autoconf.mk
|
||||
|
||||
include $(topsrcdir)/config/rules.mk
|
||||
|
|
@ -1,341 +0,0 @@
|
|||
/* -*- Mode: Java; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
|
||||
/* ***** BEGIN LICENSE BLOCK *****
|
||||
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
|
||||
*
|
||||
* The contents of this file are subject to the Mozilla Public License Version
|
||||
* 1.1 (the "License"); you may not use this file except in compliance with
|
||||
* the License. You may obtain a copy of the License at
|
||||
* http://www.mozilla.org/MPL/
|
||||
*
|
||||
* Software distributed under the License is distributed on an "AS IS" basis,
|
||||
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||
* for the specific language governing rights and limitations under the
|
||||
* License.
|
||||
*
|
||||
* The Original Code is mozilla.org code.
|
||||
*
|
||||
* The Initial Developer of the Original Code is
|
||||
* Netscape Communications Corporation.
|
||||
* Portions created by the Initial Developer are Copyright (C) 1998
|
||||
* the Initial Developer. All Rights Reserved.
|
||||
*
|
||||
* Contributor(s):
|
||||
* Ben Goodger <ben@netscape.com> (Original Author)
|
||||
*
|
||||
* Alternatively, the contents of this file may be used under the terms of
|
||||
* either of the GNU General Public License Version 2 or later (the "GPL"),
|
||||
* or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
|
||||
* in which case the provisions of the GPL or the LGPL are applicable instead
|
||||
* of those above. If you wish to allow use of your version of this file only
|
||||
* under the terms of either the GPL or the LGPL, and not to allow others to
|
||||
* use your version of this file under the terms of the MPL, indicate your
|
||||
* decision by deleting the provisions above and replace them with the notice
|
||||
* and other provisions required by the GPL or the LGPL. If you do not delete
|
||||
* the provisions above, a recipient may use your version of this file under
|
||||
* the terms of any one of the MPL, the GPL or the LGPL.
|
||||
*
|
||||
* ***** END LICENSE BLOCK ***** */
|
||||
|
||||
/**
|
||||
* Add Bookmark Dialog.
|
||||
* ====================
|
||||
*
|
||||
* This is a generic bookmark dialog that allows for bookmark addition
|
||||
* and folder selection. It can be opened with various parameters that
|
||||
* result in appearance/purpose differences and initial state.
|
||||
*
|
||||
* Use: Open with 'openDialog', with the flags
|
||||
* 'centerscreen,chrome,dialog=no,resizable=yes'
|
||||
*
|
||||
* Parameters:
|
||||
* Apart from the standard openDialog parameters, this dialog can
|
||||
* be passed additional information, which gets mapped to the
|
||||
* window.arguments array:
|
||||
*
|
||||
* window.arguments[0]: Bookmark Name. The value to be prefilled
|
||||
* into the "Name: " field (if visible).
|
||||
* window.arguments[1]: Bookmark URL: The location of the bookmark.
|
||||
* The value to be filled in the "Location: "
|
||||
* field (if visible).
|
||||
* window.arguments[2]: Bookmark Folder. The RDF Resource URI of the
|
||||
* folder that this bookmark should be created in.
|
||||
* window.arguments[3]: Bookmark Charset. The charset that should be
|
||||
* used when adding a bookmark to the specified
|
||||
* URL. (Usually the charset of the current
|
||||
* document when launching this window).
|
||||
* window.arguments[4]: The mode of operation. See notes for details.
|
||||
* window.arguments[5]: If the mode is "addGroup", this is an array
|
||||
* of objects with name, URL and charset
|
||||
* properties, one for each group member.
|
||||
*
|
||||
* Mode of Operation Notes:
|
||||
* ------------------------
|
||||
* This dialog can be opened in four different ways by using a parameter
|
||||
* passed through the call to openDialog. The 'mode' of operation
|
||||
* of the window is expressed in window.arguments[4]. The valid modes are:
|
||||
*
|
||||
* 1) <default> (no fifth open parameter).
|
||||
* Opens this dialog with the bookmark Name, URL and folder selection
|
||||
* components visible.
|
||||
* 2) "newBookmark" (fifth open parameter = String("newBookmark"))
|
||||
* Opens the dialog as in (1) above except the folder selection tree
|
||||
* is hidden. This type of mode is useful when the creation folder
|
||||
* is pre-determined.
|
||||
* 3) "selectFolder" (fifth open parameter = String("selectFolder"))
|
||||
* Opens the dialog as in (1) above except the Name/Location section
|
||||
* is hidden, and the dialog takes on the utility of a Folder chooser.
|
||||
* Used when the user must select a Folder for some purpose.
|
||||
* 4) "addGroup" (fifth open parameter = String("addGroup"))
|
||||
* Opens the dialog like <default>, with a checkbox to select between
|
||||
* filing a single bookmark or a group. For the single bookmark the
|
||||
* values are taken from the name, URL and charset arguments.
|
||||
* For the group, the values are taken from the sixth argument.
|
||||
* This parameter can also be String("addGroup,group") where "group"
|
||||
* specifies that the dialog starts in filing as a group.
|
||||
*/
|
||||
|
||||
var gFld_Name = null;
|
||||
var gFld_URL = null;
|
||||
var gFld_ShortcutURL = null;
|
||||
var gFolderTree = null;
|
||||
var gCB_AddGroup = null;
|
||||
|
||||
var gBookmarkCharset = null;
|
||||
|
||||
const kRDFSContractID = "@mozilla.org/rdf/rdf-service;1";
|
||||
const kRDFSIID = Components.interfaces.nsIRDFService;
|
||||
const kRDF = Components.classes[kRDFSContractID].getService(kRDFSIID);
|
||||
|
||||
var gSelectItemObserver = null;
|
||||
|
||||
var gCreateInFolder = "NC:NewBookmarkFolder";
|
||||
|
||||
function Startup()
|
||||
{
|
||||
gFld_Name = document.getElementById("name");
|
||||
gFld_URL = document.getElementById("url");
|
||||
gFld_ShortcutURL = document.getElementById("shortcutUrl");
|
||||
gCB_AddGroup = document.getElementById("addgroup");
|
||||
var bookmarkView = document.getElementById("bookmarks-view");
|
||||
|
||||
var shouldSetOKButton = true;
|
||||
var dialogElement = document.documentElement;
|
||||
if ("arguments" in window) {
|
||||
var ind;
|
||||
var folderItem = null;
|
||||
var arg;
|
||||
if (window.arguments.length < 5)
|
||||
arg = null;
|
||||
else
|
||||
arg = window.arguments[4];
|
||||
switch (arg) {
|
||||
case "selectFolder":
|
||||
// If we're being opened as a folder selection window
|
||||
document.getElementById("bookmarknamegrid").hidden = true;
|
||||
document.getElementById("showaddgroup").hidden = true;
|
||||
document.getElementById("destinationSeparator").hidden = true;
|
||||
document.getElementById("nameseparator").hidden = true;
|
||||
document.title = dialogElement.getAttribute("selectFolderTitle");
|
||||
shouldSetOKButton = false;
|
||||
if (window.arguments[2])
|
||||
folderItem = RDF.GetResource(window.arguments[2]);
|
||||
if (folderItem) {
|
||||
ind = bookmarkView.treeBuilder.getIndexOfResource(folderItem);
|
||||
bookmarkView.tree.view.selection.select(ind);
|
||||
}
|
||||
break;
|
||||
case "newBookmark":
|
||||
document.getElementById("showaddgroup").hidden = true;
|
||||
document.getElementById("destinationSeparator").hidden = true;
|
||||
document.getElementById("folderbox").hidden = true;
|
||||
setupFields();
|
||||
if (window.arguments[2])
|
||||
gCreateInFolder = window.arguments[2];
|
||||
break;
|
||||
case "addGroup":
|
||||
setupFields();
|
||||
break;
|
||||
case "addGroup,group":
|
||||
gCB_AddGroup.checked = true;
|
||||
setupFields();
|
||||
toggleGroup();
|
||||
break;
|
||||
default:
|
||||
// Regular Add Bookmark
|
||||
document.getElementById("showaddgroup").hidden = true;
|
||||
setupFields();
|
||||
if (window.arguments[2]) {
|
||||
gCreateInFolder = window.arguments[2];
|
||||
folderItem = RDF.GetResource(gCreateInFolder);
|
||||
if (folderItem) {
|
||||
ind = bookmarkView.treeBuilder.getIndexOfResource(folderItem);
|
||||
bookmarkView.tree.view.selection.select(ind);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if ((arg != "newBookmark") && (bookmarkView.currentIndex == -1)) {
|
||||
var folder = BookmarksUtils.getNewBookmarkFolder();
|
||||
ind = bookmarkView.treeBuilder.getIndexOfResource(folder);
|
||||
if (ind != -1)
|
||||
bookmarkView.tree.view.selection.select(ind);
|
||||
else
|
||||
bookmarkView.tree.view.selection.select(0);
|
||||
}
|
||||
|
||||
if (shouldSetOKButton)
|
||||
onFieldInput();
|
||||
if (document.getElementById("bookmarknamegrid").hidden) {
|
||||
bookmarkView.tree.focus();
|
||||
} else {
|
||||
gFld_Name.select();
|
||||
gFld_Name.focus();
|
||||
}
|
||||
|
||||
// XXX fix old profiles
|
||||
dialogElement.removeAttribute("height");
|
||||
dialogElement.removeAttribute("width");
|
||||
sizeToContent();
|
||||
}
|
||||
|
||||
function setupFields()
|
||||
{
|
||||
// New bookmark in predetermined folder.
|
||||
gFld_Name.value = window.arguments[0] || "";
|
||||
gFld_URL.value = window.arguments[1] || "";
|
||||
onFieldInput();
|
||||
gFld_Name.select();
|
||||
gFld_Name.focus();
|
||||
gBookmarkCharset = window.arguments[3] || null;
|
||||
}
|
||||
|
||||
function onFieldInput()
|
||||
{
|
||||
const ok = document.documentElement.getButton("accept");
|
||||
ok.disabled = gFld_URL.value == "" && !gCB_AddGroup.checked ||
|
||||
gFld_Name.value == "";
|
||||
}
|
||||
|
||||
function onOK()
|
||||
{
|
||||
if (!document.getElementById("folderbox").hidden) {
|
||||
var bookmarkView = document.getElementById("bookmarks-view");
|
||||
var currentIndex = bookmarkView.currentIndex;
|
||||
if (currentIndex != -1)
|
||||
gCreateInFolder = bookmarkView.treeBuilder.getResourceAtIndex(currentIndex).Value;
|
||||
}
|
||||
// In Select Folder Mode, do nothing but tell our caller what
|
||||
// folder was selected.
|
||||
if (window.arguments.length > 4 && window.arguments[4] == "selectFolder") {
|
||||
window.arguments[5].target = BookmarksUtils.getTargetFromFolder(bookmarkView.treeBuilder.getResourceAtIndex(currentIndex));
|
||||
}
|
||||
else {
|
||||
// Otherwise add a bookmark to the selected folder.
|
||||
|
||||
const kBMDS = kRDF.GetDataSource("rdf:bookmarks");
|
||||
const kBMSContractID = "@mozilla.org/browser/bookmarks-service;1";
|
||||
const kBMSIID = Components.interfaces.nsIBookmarksService;
|
||||
const kBMS = Components.classes[kBMSContractID].getService(kBMSIID);
|
||||
var rFolder = kRDF.GetResource(gCreateInFolder, true);
|
||||
const kRDFCContractID = "@mozilla.org/rdf/container;1";
|
||||
const kRDFIID = Components.interfaces.nsIRDFContainer;
|
||||
const kRDFC = Components.classes[kRDFCContractID].getService(kRDFIID);
|
||||
try {
|
||||
kRDFC.Init(kBMDS, rFolder);
|
||||
}
|
||||
catch (e) {
|
||||
// No "NC:NewBookmarkFolder" exists, just append to the root.
|
||||
rFolder = kRDF.GetResource("NC:BookmarksRoot", true);
|
||||
kRDFC.Init(kBMDS, rFolder);
|
||||
}
|
||||
|
||||
var url;
|
||||
if (gCB_AddGroup.checked) {
|
||||
const group = kBMS.createGroupInContainer(gFld_Name.value, rFolder, -1);
|
||||
const groups = window.arguments[5];
|
||||
for (var i = 0; i < groups.length; ++i) {
|
||||
url = getNormalizedURL(groups[i].url);
|
||||
kBMS.createBookmarkInContainer(groups[i].name, url, null, null,
|
||||
groups[i].charset, group, -1);
|
||||
}
|
||||
} else if (gFld_URL.value) {
|
||||
url = getNormalizedURL(gFld_URL.value);
|
||||
var newBookmark = kBMS.createBookmarkInContainer(gFld_Name.value, url, gFld_ShortcutURL.value, null, gBookmarkCharset, rFolder, -1);
|
||||
if (window.arguments.length > 4 && window.arguments[4] == "newBookmark") {
|
||||
window.arguments[5].newBookmark = newBookmark;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function getNormalizedURL(url)
|
||||
{
|
||||
// Check to see if the item is a local directory path, and if so, convert
|
||||
// to a file URL so that aggregation with rdf:files works
|
||||
try {
|
||||
const kLF = Components.classes["@mozilla.org/file/local;1"]
|
||||
.createInstance(Components.interfaces.nsILocalFile);
|
||||
kLF.initWithPath(url);
|
||||
if (kLF.exists()) {
|
||||
var ioService = Components.classes["@mozilla.org/network/io-service;1"]
|
||||
.getService(Components.interfaces.nsIIOService);
|
||||
var fileHandler = ioService.getProtocolHandler("file")
|
||||
.QueryInterface(Components.interfaces.nsIFileProtocolHandler);
|
||||
|
||||
url = fileHandler.getURLSpecFromFile(kLF);
|
||||
}
|
||||
}
|
||||
catch (e) {
|
||||
}
|
||||
|
||||
return url;
|
||||
}
|
||||
|
||||
var gBookmarksShell = null;
|
||||
function createNewFolder()
|
||||
{
|
||||
var bookmarksView = document.getElementById("bookmarks-view");
|
||||
var resource = bookmarksView.treeBuilder.getResourceAtIndex(bookmarksView.currentIndex);
|
||||
var target = BookmarksUtils.getTargetFromFolder(resource);
|
||||
BookmarksCommand.createNewFolder(target);
|
||||
}
|
||||
|
||||
var gOldNameValue = "";
|
||||
var gOldURLValue = "";
|
||||
var gOldShortcutURLValue = "";
|
||||
|
||||
function toggleGroup()
|
||||
{
|
||||
// swap between single bookmark and group name
|
||||
var temp = gOldNameValue;
|
||||
gOldNameValue = gFld_Name.value;
|
||||
gFld_Name.value = temp;
|
||||
|
||||
// swap between single bookmark and group url
|
||||
temp = gOldURLValue;
|
||||
gOldURLValue = gFld_URL.value;
|
||||
gFld_URL.value = temp;
|
||||
gFld_URL.disabled = gCB_AddGroup.checked;
|
||||
|
||||
// swap between single bookmark and group shortcut url
|
||||
temp = gOldShortcutURLValue;
|
||||
gOldShortcutURLValue = gFld_ShortcutURL.value;
|
||||
gFld_ShortcutURL.value = temp;
|
||||
gFld_ShortcutURL.disabled = gCB_AddGroup.checked;
|
||||
|
||||
gFld_Name.select();
|
||||
gFld_Name.focus();
|
||||
onFieldInput();
|
||||
}
|
||||
|
||||
function persistTreeSize()
|
||||
{
|
||||
if (!document.getElementById("folderbox").hidden) {
|
||||
var bookmarkView = document.getElementById("bookmarks-view");
|
||||
bookmarkView.setAttribute("height", bookmarkView.boxObject.height);
|
||||
document.persist("bookmarks-view", "height");
|
||||
bookmarkView.setAttribute("width", bookmarkView.boxObject.width);
|
||||
document.persist("bookmarks-view", "width");
|
||||
}
|
||||
}
|
|
@ -1,129 +0,0 @@
|
|||
<?xml version="1.0"?>
|
||||
|
||||
<!-- -*- Mode: HTML; indent-tabs-mode: nil; -*- -->
|
||||
<!--
|
||||
|
||||
***** BEGIN LICENSE BLOCK *****
|
||||
Version: MPL 1.1/GPL 2.0/LGPL 2.1
|
||||
|
||||
The contents of this file are subject to the Mozilla Public License Version
|
||||
1.1 (the "License"); you may not use this file except in compliance with
|
||||
the License. You may obtain a copy of the License at
|
||||
http://www.mozilla.org/MPL/
|
||||
|
||||
Software distributed under the License is distributed on an "AS IS" basis,
|
||||
WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||
for the specific language governing rights and limitations under the
|
||||
License.
|
||||
|
||||
The Original Code is mozilla.org code.
|
||||
|
||||
The Initial Developer of the Original Code is
|
||||
Netscape Communications Corporation.
|
||||
Portions created by the Initial Developer are Copyright (C) 1998
|
||||
the Initial Developer. All Rights Reserved.
|
||||
|
||||
Contributor(s):
|
||||
Ben Goodger <ben@netscape.com> (Original Author)
|
||||
Gervase Markham <gerv@gerv.net>
|
||||
|
||||
Alternatively, the contents of this file may be used under the terms of
|
||||
either of the GNU General Public License Version 2 or later (the "GPL"),
|
||||
or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
|
||||
in which case the provisions of the GPL or the LGPL are applicable instead
|
||||
of those above. If you wish to allow use of your version of this file only
|
||||
under the terms of either the GPL or the LGPL, and not to allow others to
|
||||
use your version of this file under the terms of the MPL, indicate your
|
||||
decision by deleting the provisions above and replace them with the notice
|
||||
and other provisions required by the GPL or the LGPL. If you do not delete
|
||||
the provisions above, a recipient may use your version of this file under
|
||||
the terms of any one of the MPL, the GPL or the LGPL.
|
||||
|
||||
***** END LICENSE BLOCK ***** -->
|
||||
|
||||
<?xml-stylesheet href="chrome://communicator/skin/"?>
|
||||
<?xml-stylesheet href="chrome://communicator/skin/bookmarks/bookmarks.css"?>
|
||||
<?xml-stylesheet href="chrome://communicator/content/bookmarks/bookmarks.css" type="text/css"?>
|
||||
|
||||
<!DOCTYPE dialog [
|
||||
<!ENTITY % brandDTD SYSTEM "chrome://branding/locale/brand.dtd" >
|
||||
%brandDTD;
|
||||
<!ENTITY % addBookmarkDTD SYSTEM "chrome://communicator/locale/bookmarks/addBookmark.dtd">
|
||||
%addBookmarkDTD;
|
||||
]>
|
||||
|
||||
<dialog id="newBookmarkDialog"
|
||||
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
|
||||
ondialogaccept="return onOK(event)"
|
||||
title="&newBookmark.title;" selectFolderTitle="&selectFolder.title;"
|
||||
onload="Startup();"
|
||||
onunload="persistTreeSize();"
|
||||
persist="screenX screenY"
|
||||
screenX="24" screenY="24">
|
||||
|
||||
|
||||
<script type="application/x-javascript" src="chrome://communicator/content/bookmarks/bookmarks.js"/>
|
||||
<script type="application/x-javascript" src="chrome://communicator/content/bookmarks/addBookmark.js"/>
|
||||
|
||||
<stringbundle id="bookmarksbundle"
|
||||
src="chrome://communicator/locale/bookmarks/bookmarks.properties"/>
|
||||
|
||||
<broadcaster id="showaddgroup"/>
|
||||
|
||||
<separator id="nameseparator" class="thin"/>
|
||||
|
||||
<grid id="bookmarknamegrid">
|
||||
<columns>
|
||||
<column/>
|
||||
<column flex="1"/>
|
||||
</columns>
|
||||
<rows>
|
||||
<row align="center">
|
||||
<hbox pack="end">
|
||||
<label value="&name.label;" accesskey="&name.accesskey;" control="name"/>
|
||||
</hbox>
|
||||
<textbox id="name" oninput="onFieldInput();"/>
|
||||
</row>
|
||||
<row align="center">
|
||||
<hbox pack="end">
|
||||
<label value="&url.label;" accesskey="&url.accesskey;" control="url"/>
|
||||
</hbox>
|
||||
<textbox id="url" oninput="onFieldInput();"/>
|
||||
</row>
|
||||
<row align="center">
|
||||
<hbox pack="end">
|
||||
<label value="&shortcutURL.label;" accesskey="&shortcutURL.accesskey;" control="shortcutUrl"/>
|
||||
</hbox>
|
||||
<textbox id="shortcutUrl"/>
|
||||
</row>
|
||||
</rows>
|
||||
</grid>
|
||||
|
||||
<separator class="thin" observes="showaddgroup"/>
|
||||
<hbox observes="showaddgroup">
|
||||
<checkbox id="addgroup" label="&addGroup.label;"
|
||||
accesskey="&addGroup.accesskey;"
|
||||
oncommand="toggleGroup();"/>
|
||||
</hbox>
|
||||
|
||||
<separator id="destinationSeparator"/>
|
||||
|
||||
<vbox id="folderbox" flex="1">
|
||||
<label id="destinationLabel" value="&destination.label;" control="bookmarks-view"/>
|
||||
<bookmarks-tree id="bookmarks-view" flex="1" type="folders"
|
||||
rows="10" seltype="single"
|
||||
persist="width height"/>
|
||||
|
||||
<separator id="folderbuttonseparator" class="thin"/>
|
||||
|
||||
<hbox pack="end">
|
||||
<button label="&newFolder.label;"
|
||||
accesskey="&newFolder.accesskey;"
|
||||
oncommand="createNewFolder();"/>
|
||||
</hbox>
|
||||
</vbox>
|
||||
|
||||
<!-- Ensure a decent dialog width when the bookmarks-tree is hidden. -->
|
||||
<spacer style="width: 36em;"/>
|
||||
|
||||
</dialog>
|
|
@ -1,72 +0,0 @@
|
|||
/* -*- Mode: Java; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
||||
/* ***** BEGIN LICENSE BLOCK *****
|
||||
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
|
||||
*
|
||||
* The contents of this file are subject to the Mozilla Public License Version
|
||||
* 1.1 (the "License"); you may not use this file except in compliance with
|
||||
* the License. You may obtain a copy of the License at
|
||||
* http://www.mozilla.org/MPL/
|
||||
*
|
||||
* Software distributed under the License is distributed on an "AS IS" basis,
|
||||
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||
* for the specific language governing rights and limitations under the
|
||||
* License.
|
||||
*
|
||||
* The Original Code is mozilla.org code.
|
||||
*
|
||||
* The Initial Developer of the Original Code is
|
||||
* Netscape Communications Corporation.
|
||||
* Portions created by the Initial Developer are Copyright (C) 1998
|
||||
* the Initial Developer. All Rights Reserved.
|
||||
*
|
||||
* Contributor(s):
|
||||
* Ben Goodger <ben@netscape.com> (Original Author)
|
||||
*
|
||||
* Alternatively, the contents of this file may be used under the terms of
|
||||
* either of the GNU General Public License Version 2 or later (the "GPL"),
|
||||
* or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
|
||||
* in which case the provisions of the GPL or the LGPL are applicable instead
|
||||
* of those above. If you wish to allow use of your version of this file only
|
||||
* under the terms of either the GPL or the LGPL, and not to allow others to
|
||||
* use your version of this file under the terms of the MPL, indicate your
|
||||
* decision by deleting the provisions above and replace them with the notice
|
||||
* and other provisions required by the GPL or the LGPL. If you do not delete
|
||||
* the provisions above, a recipient may use your version of this file under
|
||||
* the terms of any one of the MPL, the GPL or the LGPL.
|
||||
*
|
||||
* ***** END LICENSE BLOCK ***** */
|
||||
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
// Get the two bookmarks utility libraries running, attach controllers, focus
|
||||
// tree widget, etc.
|
||||
function Startup()
|
||||
{
|
||||
// correct keybinding command attributes which don't do our business yet
|
||||
var key = document.getElementById("key_delete");
|
||||
if (key.getAttribute("command"))
|
||||
key.setAttribute("command", "cmd_bm_delete");
|
||||
key = document.getElementById("key_delete2");
|
||||
if (key.getAttribute("command"))
|
||||
key.setAttribute("command", "cmd_bm_delete");
|
||||
|
||||
var bookmarksView = document.getElementById("bookmarks-view");
|
||||
bookmarksView.tree.view.selection.select(0);
|
||||
}
|
||||
|
||||
function manageBookmarks() {
|
||||
openDialog("chrome://communicator/content/bookmarks/bookmarksManager.xul", "", "chrome,dialog=no,resizable=yes");
|
||||
}
|
||||
|
||||
function addBookmark() {
|
||||
var contentArea = top.document.getElementById('content');
|
||||
if (contentArea) {
|
||||
const browsers = contentArea.browsers;
|
||||
if (browsers.length > 1)
|
||||
BookmarksUtils.addBookmarkForTabBrowser(contentArea);
|
||||
else
|
||||
BookmarksUtils.addBookmarkForBrowser(contentArea.webNavigation, true);
|
||||
}
|
||||
else
|
||||
BookmarksUtils.addBookmark(null, null, undefined, true);
|
||||
}
|
|
@ -1,114 +0,0 @@
|
|||
<?xml version="1.0"?> <!-- -*- Mode: SGML; indent-tabs-mode: nil; -*- -->
|
||||
<!--
|
||||
|
||||
***** BEGIN LICENSE BLOCK *****
|
||||
Version: MPL 1.1/GPL 2.0/LGPL 2.1
|
||||
|
||||
The contents of this file are subject to the Mozilla Public License Version
|
||||
1.1 (the "License"); you may not use this file except in compliance with
|
||||
the License. You may obtain a copy of the License at
|
||||
http://www.mozilla.org/MPL/
|
||||
|
||||
Software distributed under the License is distributed on an "AS IS" basis,
|
||||
WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||
for the specific language governing rights and limitations under the
|
||||
License.
|
||||
|
||||
The Original Code is mozilla.org code.
|
||||
|
||||
The Initial Developer of the Original Code is
|
||||
Netscape Communications Corporation.
|
||||
Portions created by the Initial Developer are Copyright (C) 1998
|
||||
the Initial Developer. All Rights Reserved.
|
||||
|
||||
Contributor(s):
|
||||
Ben Goodger <ben@netscape.com> (Original Author, v2.0)
|
||||
Pierre Chanial <chanial@noos.fr>
|
||||
|
||||
Alternatively, the contents of this file may be used under the terms of
|
||||
either of the GNU General Public License Version 2 or later (the "GPL"),
|
||||
or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
|
||||
in which case the provisions of the GPL or the LGPL are applicable instead
|
||||
of those above. If you wish to allow use of your version of this file only
|
||||
under the terms of either the GPL or the LGPL, and not to allow others to
|
||||
use your version of this file under the terms of the MPL, indicate your
|
||||
decision by deleting the provisions above and replace them with the notice
|
||||
and other provisions required by the GPL or the LGPL. If you do not delete
|
||||
the provisions above, a recipient may use your version of this file under
|
||||
the terms of any one of the MPL, the GPL or the LGPL.
|
||||
|
||||
***** END LICENSE BLOCK ***** -->
|
||||
|
||||
<?xml-stylesheet href="chrome://communicator/skin/" type="text/css"?>
|
||||
<?xml-stylesheet href="chrome://communicator/skin/sidebar/sidebarListView.css" type="text/css"?>
|
||||
<?xml-stylesheet href="chrome://communicator/skin/bookmarks/bookmarksWindow.css" type="text/css"?>
|
||||
<?xml-stylesheet href="chrome://communicator/content/bookmarks/bookmarks.css" type="text/css"?>
|
||||
|
||||
<?xul-overlay href="chrome://communicator/content/utilityOverlay.xul"?>
|
||||
<?xul-overlay href="chrome://global/content/globalOverlay.xul"?>
|
||||
<?xul-overlay href="chrome://communicator/content/bookmarks/bookmarksOverlay.xul"?>
|
||||
<?xul-overlay href="chrome://communicator/content/tasksOverlay.xul"?>
|
||||
|
||||
<!DOCTYPE page SYSTEM "chrome://communicator/locale/bookmarks/bookmarks.dtd">
|
||||
|
||||
<page id="bookmarksPanel"
|
||||
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
||||
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
|
||||
onload="Startup();" elementtofocus="bookmarks-view">
|
||||
|
||||
<!-- XXX - would like to cut this dependency out -->
|
||||
<script type="application/x-javascript" src="chrome://global/content/strres.js"/>
|
||||
<script type="application/x-javascript" src="chrome://global/content/globalOverlay.js"/>
|
||||
|
||||
<!-- Bookmarks Shell -->
|
||||
<script type="application/x-javascript" src="chrome://communicator/content/bookmarks/bookmarks.js"/>
|
||||
<script type="application/x-javascript" src="chrome://communicator/content/bookmarks/bm-panel.js"/>
|
||||
|
||||
<!-- Bookmarks Panel Drag & Drop -->
|
||||
<script type="application/x-javascript" src="chrome://global/content/nsDragAndDrop.js"/>
|
||||
|
||||
<!-- context menu, tooltips, etc -->
|
||||
<popupset id="bookmarksPopupset"/>
|
||||
|
||||
<!-- bookmarks string bundle -->
|
||||
<stringbundleset id="stringbundleset"/>
|
||||
|
||||
<!-- bookmarks & edit commands -->
|
||||
<commands id="commands">
|
||||
<commandset id="CommandUpdate_Bookmarks"
|
||||
commandupdater="true"
|
||||
events="click,focus"
|
||||
oncommandupdate="document.getElementById('bookmarks-view').onCommandUpdate();">
|
||||
</commandset>
|
||||
<commandset id="bookmarksItems"/>
|
||||
<command id="cmd_undo"/>
|
||||
<command id="cmd_redo"/>
|
||||
</commands>
|
||||
|
||||
<keyset id="bookmarks-tasksKeys"/>
|
||||
|
||||
<hbox id="panel-bar" class="toolbar">
|
||||
<toolbarbutton id="btnAddBookmark" label="&command.addBookmark.label;"
|
||||
oncommand="addBookmark();"/>
|
||||
<toolbarbutton id="btnManageBookmarks" label="&command.manageBookmarks.label;"
|
||||
oncommand="manageBookmarks();"/>
|
||||
<spacer flex="1"/>
|
||||
<toolbarseparator/>
|
||||
<toolbarbutton id="btnFindBookmarks" label="&command.findBookmarks.label;"
|
||||
oncommand="BookmarksCommand.findBookmark();"/>
|
||||
</hbox>
|
||||
|
||||
<hbox id="search-bar" class="toolbar" align="center">
|
||||
<label value="&search.label;" accesskey="&search.accesskey;" control="search-box"/>
|
||||
<textbox id="search-box" flex="1"
|
||||
type="timed" timeout="500"
|
||||
oncommand="document.getElementById('bookmarks-view').searchBookmarks(this.value)"/>
|
||||
</hbox>
|
||||
|
||||
<bookmarks-tree id="bookmarks-view" type="single-column" flex="1"
|
||||
onfocus="this.tree.focus();"
|
||||
onkeypress="if (event.keyCode == 13) this.openItemKey(event);"
|
||||
ondraggesture="if (event.originalTarget.localName == 'treechildren') nsDragAndDrop.startDrag(event, this.DNDObserver);"
|
||||
onclick="this.openItemClick(event, 1);"/>
|
||||
|
||||
</page>
|
|
@ -1,376 +0,0 @@
|
|||
/* -*- Mode: Java; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
||||
/* ***** BEGIN LICENSE BLOCK *****
|
||||
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
|
||||
*
|
||||
* The contents of this file are subject to the Mozilla Public License Version
|
||||
* 1.1 (the "License"); you may not use this file except in compliance with
|
||||
* the License. You may obtain a copy of the License at
|
||||
* http://www.mozilla.org/MPL/
|
||||
*
|
||||
* Software distributed under the License is distributed on an "AS IS" basis,
|
||||
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||
* for the specific language governing rights and limitations under the
|
||||
* License.
|
||||
*
|
||||
* The Original Code is mozilla.org code.
|
||||
*
|
||||
* The Initial Developer of the Original Code is
|
||||
* Netscape Communications Corporation.
|
||||
* Portions created by the Initial Developer are Copyright (C) 1998
|
||||
* the Initial Developer. All Rights Reserved.
|
||||
*
|
||||
* Contributor(s):
|
||||
*
|
||||
* Alternatively, the contents of this file may be used under the terms of
|
||||
* either of the GNU General Public License Version 2 or later (the "GPL"),
|
||||
* or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
|
||||
* in which case the provisions of the GPL or the LGPL are applicable instead
|
||||
* of those above. If you wish to allow use of your version of this file only
|
||||
* under the terms of either the GPL or the LGPL, and not to allow others to
|
||||
* use your version of this file under the terms of the MPL, indicate your
|
||||
* decision by deleting the provisions above and replace them with the notice
|
||||
* and other provisions required by the GPL or the LGPL. If you do not delete
|
||||
* the provisions above, a recipient may use your version of this file under
|
||||
* the terms of any one of the MPL, the GPL or the LGPL.
|
||||
*
|
||||
* ***** END LICENSE BLOCK ***** */
|
||||
|
||||
// This is the set of fields that are visible in the window.
|
||||
var gFields;
|
||||
|
||||
// ...and this is a parallel array that contains the RDF properties
|
||||
// that they are associated with.
|
||||
var gProperties;
|
||||
|
||||
// The ID of the current shown bookmark
|
||||
var gBookmarkID;
|
||||
|
||||
function Init()
|
||||
{
|
||||
initServices();
|
||||
initBMService();
|
||||
|
||||
// This is the set of fields that are visible in the window.
|
||||
gFields = ["name", "url", "shortcut", "description"];
|
||||
|
||||
// ...and this is a parallel array that contains the RDF properties
|
||||
// that they are associated with.
|
||||
gProperties = [NC_NS + "Name",
|
||||
NC_NS + "URL",
|
||||
NC_NS + "ShortcutURL",
|
||||
NC_NS + "Description"];
|
||||
|
||||
gBookmarkID = window.arguments[0];
|
||||
|
||||
var i;
|
||||
var resource = RDF.GetResource(gBookmarkID);
|
||||
// Initialize the properties panel by copying the values from the
|
||||
// RDF graph into the fields on screen.
|
||||
|
||||
for (i = 0; i < gFields.length; ++i) {
|
||||
var field = document.getElementById(gFields[i]);
|
||||
|
||||
var value = BMDS.GetTarget(resource, RDF.GetResource(gProperties[i]), true);
|
||||
|
||||
if (value)
|
||||
value = value.QueryInterface(Components.interfaces.nsIRDFLiteral).Value;
|
||||
|
||||
if (value) //make sure were aren't stuffing null into any fields
|
||||
field.value = value;
|
||||
}
|
||||
|
||||
var nameNode = document.getElementById("name");
|
||||
document.title = document.title.replace(/\*\*bm_title\*\*/gi, nameNode.value);
|
||||
|
||||
// if its a container, disable some things
|
||||
var isContainerFlag = RDFCU.IsContainer(BMDS, resource);
|
||||
if (!isContainerFlag) {
|
||||
// XXX To do: the "RDFCU.IsContainer" call above only works for RDF sequences;
|
||||
// if its not a RDF sequence, we should to more checking to see if
|
||||
// the item in question is really a container of not. A good example
|
||||
// of this is the "File System" container.
|
||||
}
|
||||
|
||||
var isSeparator = BookmarksUtils.resolveType(resource) == "BookmarkSeparator";
|
||||
|
||||
if (isContainerFlag || isSeparator) {
|
||||
// If it is a folder, it has no URL or Keyword
|
||||
document.getElementById("locationrow").setAttribute("hidden", "true");
|
||||
document.getElementById("shortcutrow").setAttribute("hidden", "true");
|
||||
if (isSeparator) {
|
||||
document.getElementById("descriptionrow").setAttribute("hidden", "true");
|
||||
}
|
||||
}
|
||||
|
||||
var showScheduling = false;
|
||||
var url = BMDS.GetTarget(resource, RDF.GetResource(gProperties[1]), true);
|
||||
if (url) {
|
||||
url = url.QueryInterface(Components.interfaces.nsIRDFLiteral).Value;
|
||||
if (url.substr(0, 7).toLowerCase() == "http://" ||
|
||||
url.substr(0, 8).toLowerCase() == "https://") {
|
||||
showScheduling = true;
|
||||
}
|
||||
}
|
||||
|
||||
if (!showScheduling) {
|
||||
// only allow scheduling of http/https URLs
|
||||
document.getElementById("scheduling").setAttribute("hidden", "true");
|
||||
} else {
|
||||
// check bookmark schedule
|
||||
var scheduleArc = RDF.GetResource("http://home.netscape.com/WEB-rdf#Schedule");
|
||||
value = BMDS.GetTarget(resource, scheduleArc, true);
|
||||
|
||||
if (value) {
|
||||
value = value.QueryInterface(Components.interfaces.nsIRDFLiteral).Value;
|
||||
|
||||
if (value) {
|
||||
var values = value.split("|");
|
||||
if (values.length == 4) {
|
||||
// get day range
|
||||
var days = values[0];
|
||||
var dayNode = document.getElementById("dayRange");
|
||||
var dayItems = dayNode.childNodes[0].childNodes;
|
||||
for (i=0; i < dayItems.length; ++i) {
|
||||
if (dayItems[i].getAttribute("value") == days) {
|
||||
dayNode.selectedItem = dayItems[i];
|
||||
break;
|
||||
}
|
||||
}
|
||||
// Set up the enabled of controls on the scheduling panels
|
||||
dayRangeChange(dayNode);
|
||||
|
||||
// get hour range
|
||||
var hours = values[1].split("-");
|
||||
var startHour = "";
|
||||
var endHour = "";
|
||||
|
||||
if (hours.length == 2) {
|
||||
startHour = hours[0];
|
||||
endHour = hours[1];
|
||||
}
|
||||
|
||||
// set start hour
|
||||
var startHourNode = document.getElementById("startHourRange");
|
||||
var startHourItems = startHourNode.childNodes[0].childNodes;
|
||||
for (i=0; i < startHourItems.length; ++i) {
|
||||
if (startHourItems[i].getAttribute("value") == startHour) {
|
||||
startHourNode.selectedItem = startHourItems[i];
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
// set end hour
|
||||
var endHourNode = document.getElementById("endHourRange");
|
||||
var endHourItems = endHourNode.childNodes[0].childNodes;
|
||||
for (i=0; i < endHourItems.length; ++i) {
|
||||
if (endHourItems[i].getAttribute("value") == endHour) {
|
||||
endHourNode.selectedItem = endHourItems[i];
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
// get duration
|
||||
var duration = values[2];
|
||||
var durationNode = document.getElementById("duration");
|
||||
durationNode.value = duration;
|
||||
|
||||
// get notification method
|
||||
var method = values[3];
|
||||
if (method.indexOf("icon") >= 0)
|
||||
document.getElementById("bookmarkIcon").checked = true;
|
||||
|
||||
if (method.indexOf("sound") >= 0)
|
||||
document.getElementById("playSound").checked = true;
|
||||
|
||||
if (method.indexOf("alert") >= 0)
|
||||
document.getElementById("showAlert").checked = true;
|
||||
|
||||
if (method.indexOf("open") >= 0)
|
||||
document.getElementById("openWindow").checked = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
sizeToContent();
|
||||
|
||||
// set initial focus
|
||||
nameNode.focus();
|
||||
nameNode.select();
|
||||
|
||||
}
|
||||
|
||||
|
||||
function Commit()
|
||||
{
|
||||
var changed = false;
|
||||
|
||||
// Grovel through the fields to see if any of the values have
|
||||
// changed. If so, update the RDF graph and force them to be saved
|
||||
// to disk.
|
||||
for (var i = 0; i < gFields.length; ++i) {
|
||||
var field = document.getElementById(gFields[i]);
|
||||
|
||||
if (field) {
|
||||
// Get the new value as a literal, using 'null' if the value is empty.
|
||||
var newvalue = field.value;
|
||||
|
||||
var oldvalue = BMDS.GetTarget(RDF.GetResource(gBookmarkID),
|
||||
RDF.GetResource(gProperties[i]), true);
|
||||
|
||||
if (oldvalue)
|
||||
oldvalue = oldvalue.QueryInterface(Components.interfaces.nsIRDFLiteral);
|
||||
|
||||
if (newvalue && gProperties[i] == (NC_NS + "ShortcutURL")) {
|
||||
// shortcuts are always lowercased internally
|
||||
newvalue = newvalue.toLowerCase();
|
||||
}
|
||||
else if (newvalue && gProperties[i] == (NC_NS + "URL")) {
|
||||
// we're dealing with the URL attribute;
|
||||
// if a scheme isn't specified, use "http://"
|
||||
if (newvalue.indexOf(":") < 0)
|
||||
newvalue = "http://" + newvalue;
|
||||
}
|
||||
|
||||
if (newvalue)
|
||||
newvalue = RDF.GetLiteral(newvalue);
|
||||
|
||||
if (updateAttribute(gProperties[i], oldvalue, newvalue)) {
|
||||
changed = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Update bookmark schedule if necessary;
|
||||
// if the tab was removed, just skip it
|
||||
var scheduling = document.getElementById("scheduling");
|
||||
var schedulingHidden = scheduling.getAttribute("hidden");
|
||||
if (schedulingHidden != "true") {
|
||||
var scheduleRes = "http://home.netscape.com/WEB-rdf#Schedule";
|
||||
oldvalue = BMDS.GetTarget(RDF.GetResource(gBookmarkID),
|
||||
RDF.GetResource(scheduleRes), true);
|
||||
newvalue = "";
|
||||
var dayRangeNode = document.getElementById("dayRange");
|
||||
var dayRange = dayRangeNode.selectedItem.getAttribute("value");
|
||||
|
||||
if (dayRange) {
|
||||
var startHourRangeNode = document.getElementById("startHourRange");
|
||||
var startHourRange = startHourRangeNode.selectedItem.getAttribute("value");
|
||||
|
||||
var endHourRangeNode = document.getElementById("endHourRange");
|
||||
var endHourRange = endHourRangeNode.selectedItem.getAttribute("value");
|
||||
|
||||
if (parseInt(startHourRange) > parseInt(endHourRange)) {
|
||||
var temp = startHourRange;
|
||||
startHourRange = endHourRange;
|
||||
endHourRange = temp;
|
||||
}
|
||||
|
||||
var duration = document.getElementById("duration").value;
|
||||
if (!duration) {
|
||||
alert(BookmarksUtils.getLocaleString("pleaseEnterADuration"));
|
||||
return false;
|
||||
}
|
||||
|
||||
var methods = [];
|
||||
if (document.getElementById("bookmarkIcon").checked)
|
||||
methods.push("icon");
|
||||
if (document.getElementById("playSound").checked)
|
||||
methods.push("sound");
|
||||
if (document.getElementById("showAlert").checked)
|
||||
methods.push("alert");
|
||||
if (document.getElementById("openWindow").checked)
|
||||
methods.push("open");
|
||||
|
||||
if (methods.length == 0) {
|
||||
alert(BookmarksUtils.getLocaleString("pleaseSelectANotification"));
|
||||
return false;
|
||||
}
|
||||
|
||||
var method = methods.join(); // join string in array with ","
|
||||
|
||||
newvalue = dayRange + "|" + startHourRange + "-" + endHourRange + "|" + duration + "|" + method;
|
||||
}
|
||||
|
||||
if (newvalue)
|
||||
newvalue = RDF.GetLiteral(newvalue);
|
||||
|
||||
if (updateAttribute(scheduleRes, oldvalue, newvalue))
|
||||
changed = true;
|
||||
}
|
||||
|
||||
if (changed) {
|
||||
var remote = BMDS.QueryInterface(Components.interfaces.nsIRDFRemoteDataSource);
|
||||
if (remote)
|
||||
remote.Flush();
|
||||
}
|
||||
|
||||
window.close();
|
||||
return true;
|
||||
}
|
||||
|
||||
function updateAttribute(prop, oldvalue, newvalue)
|
||||
{
|
||||
var changed = false;
|
||||
|
||||
if (prop && (oldvalue || newvalue) && oldvalue != newvalue) {
|
||||
|
||||
if (oldvalue && !newvalue) {
|
||||
BMDS.Unassert(RDF.GetResource(gBookmarkID),
|
||||
RDF.GetResource(prop), oldvalue);
|
||||
}
|
||||
else if (!oldvalue && newvalue) {
|
||||
BMDS.Assert(RDF.GetResource(gBookmarkID),
|
||||
RDF.GetResource(prop), newvalue, true);
|
||||
}
|
||||
else /* if (oldvalue && newvalue) */ {
|
||||
BMDS.Change(RDF.GetResource(gBookmarkID),
|
||||
RDF.GetResource(prop), oldvalue, newvalue);
|
||||
}
|
||||
|
||||
changed = true;
|
||||
}
|
||||
|
||||
return changed;
|
||||
}
|
||||
|
||||
function setEndHourRange()
|
||||
{
|
||||
// Get the values of the start-time and end-time as ints
|
||||
var startHourRangeNode = document.getElementById("startHourRange");
|
||||
var startHourRange = startHourRangeNode.selectedItem.getAttribute("value");
|
||||
var startHourRangeInt = parseInt(startHourRange);
|
||||
|
||||
var endHourRangeNode = document.getElementById("endHourRange");
|
||||
var endHourRange = endHourRangeNode.selectedItem.getAttribute("value");
|
||||
var endHourRangeInt = parseInt(endHourRange);
|
||||
|
||||
var endHourItemNode = endHourRangeNode.firstChild.firstChild;
|
||||
|
||||
var index = 0;
|
||||
|
||||
// disable all those end-times before the start-time
|
||||
for (; index < startHourRangeInt; ++index) {
|
||||
endHourItemNode.setAttribute("disabled", "true");
|
||||
endHourItemNode = endHourItemNode.nextSibling;
|
||||
}
|
||||
|
||||
// update the selected value if it's out of the allowed range
|
||||
if (startHourRangeInt >= endHourRangeInt)
|
||||
endHourRangeNode.selectedItem = endHourItemNode;
|
||||
|
||||
// make sure all the end-times after the start-time are enabled
|
||||
for (; index < 24; ++index) {
|
||||
endHourItemNode.removeAttribute("disabled");
|
||||
endHourItemNode = endHourItemNode.nextSibling;
|
||||
}
|
||||
}
|
||||
|
||||
function dayRangeChange (aMenuList)
|
||||
{
|
||||
var controls = ["startHourRange", "endHourRange", "duration", "bookmarkIcon",
|
||||
"showAlert", "openWindow", "playSound", "durationSubLabel",
|
||||
"durationLabel", "startHourRangeLabel", "endHourRangeLabel"];
|
||||
for (var i = 0; i < controls.length; ++i)
|
||||
document.getElementById(controls[i]).disabled = !aMenuList.value;
|
||||
}
|
|
@ -1,215 +0,0 @@
|
|||
<?xml version="1.0"?> <!-- -*- Mode: SGML; indent-tabs-mode: nil; -*- -->
|
||||
<!--
|
||||
|
||||
***** BEGIN LICENSE BLOCK *****
|
||||
Version: MPL 1.1/GPL 2.0/LGPL 2.1
|
||||
|
||||
The contents of this file are subject to the Mozilla Public License Version
|
||||
1.1 (the "License"); you may not use this file except in compliance with
|
||||
the License. You may obtain a copy of the License at
|
||||
http://www.mozilla.org/MPL/
|
||||
|
||||
Software distributed under the License is distributed on an "AS IS" basis,
|
||||
WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||
for the specific language governing rights and limitations under the
|
||||
License.
|
||||
|
||||
The Original Code is mozilla.org code.
|
||||
|
||||
The Initial Developer of the Original Code is
|
||||
Netscape Communications Corporation.
|
||||
Portions created by the Initial Developer are Copyright (C) 1998
|
||||
the Initial Developer. All Rights Reserved.
|
||||
|
||||
Contributor(s):
|
||||
|
||||
Alternatively, the contents of this file may be used under the terms of
|
||||
either of the GNU General Public License Version 2 or later (the "GPL"),
|
||||
or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
|
||||
in which case the provisions of the GPL or the LGPL are applicable instead
|
||||
of those above. If you wish to allow use of your version of this file only
|
||||
under the terms of either the GPL or the LGPL, and not to allow others to
|
||||
use your version of this file under the terms of the MPL, indicate your
|
||||
decision by deleting the provisions above and replace them with the notice
|
||||
and other provisions required by the GPL or the LGPL. If you do not delete
|
||||
the provisions above, a recipient may use your version of this file under
|
||||
the terms of any one of the MPL, the GPL or the LGPL.
|
||||
|
||||
***** END LICENSE BLOCK ***** -->
|
||||
|
||||
<?xml-stylesheet href="chrome://communicator/skin/" type="text/css"?>
|
||||
<?xml-stylesheet href="chrome://communicator/skin/bookmarks/bookmarks.css" type="text/css"?>
|
||||
|
||||
<!DOCTYPE dialog [
|
||||
<!ENTITY % brandDTD SYSTEM "chrome://branding/locale/brand.dtd" >
|
||||
%brandDTD;
|
||||
<!ENTITY % bmpropsDTD SYSTEM "chrome://communicator/locale/bookmarks/bm-props.dtd">
|
||||
%bmpropsDTD;
|
||||
]>
|
||||
|
||||
<dialog id="bmPropsWindow" xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
|
||||
title="&bookmarks.windowtitle.label;"
|
||||
onload="Init()" style="width: 40em;"
|
||||
ondialogaccept="return Commit();">
|
||||
|
||||
<stringbundleset>
|
||||
<stringbundle id="bundle_bookmarks" src="chrome://communicator/locale/bookmarks/bookmarks.properties"/>
|
||||
<stringbundle id="bundle_brand" src="chrome://branding/locale/brand.properties"/>
|
||||
</stringbundleset>
|
||||
<script type="application/x-javascript" src="chrome://global/content/globalOverlay.js"/>
|
||||
<script type="application/x-javascript" src="chrome://communicator/content/bookmarks/bookmarks.js"/>
|
||||
<script type="application/x-javascript" src="chrome://communicator/content/bookmarks/bm-props.js"/>
|
||||
|
||||
<keyset id="keyset"/>
|
||||
|
||||
<groupbox>
|
||||
<caption label="&generalInfo.label;" />
|
||||
<grid>
|
||||
<columns>
|
||||
<column />
|
||||
<column flex="1"/>
|
||||
</columns>
|
||||
<rows>
|
||||
<row align="center">
|
||||
<label value="&bookmarks.name.label;"
|
||||
accesskey="&bookmarks.name.accesskey;" control="name"/>
|
||||
<textbox id="name"/>
|
||||
</row>
|
||||
<row id="locationrow" align="center">
|
||||
<label value="&bookmarks.location.label;"
|
||||
accesskey="&bookmarks.location.accesskey;" control="url"/>
|
||||
<textbox id="url" class="uri-element" />
|
||||
</row>
|
||||
<row id="shortcutrow" align="center">
|
||||
<label value="&bookmarks.shortcut.label;"
|
||||
accesskey="&bookmarks.shortcut.accesskey;" control="shortcut"/>
|
||||
<textbox id="shortcut" />
|
||||
</row>
|
||||
<row id="descriptionrow">
|
||||
<label value="&bookmarks.description.label;"
|
||||
accesskey="&bookmarks.description.accesskey;" control="description"/>
|
||||
<textbox multiline="true" wrap="virtual" id="description" flex="1"/>
|
||||
</row>
|
||||
</rows>
|
||||
</grid>
|
||||
</groupbox>
|
||||
<hbox id="scheduling">
|
||||
<groupbox>
|
||||
<caption label="&checkforupdates.legend.label;"/>
|
||||
<grid flex="1">
|
||||
<columns>
|
||||
<column/>
|
||||
<column flex="1"/>
|
||||
</columns>
|
||||
<rows>
|
||||
<row align="center">
|
||||
<label value="&when.label;" accesskey="&when.accesskey;" control="dayRange"/>
|
||||
<hbox>
|
||||
<menulist id="dayRange" oncommand="dayRangeChange(this);">
|
||||
<menupopup>
|
||||
<menuitem value="" label="&checknever.label;"/>
|
||||
<menuseparator />
|
||||
<menuitem value="0123456" label="&checkeveryday.label;"/>
|
||||
<menuitem value="12345" label="&checkweekdays.label;"/>
|
||||
<menuitem value="06" label="&checkweekends.label;"/>
|
||||
<menuitem value="1" label="&checkmondays.label;"/>
|
||||
<menuitem value="2" label="&checktuesdays.label;"/>
|
||||
<menuitem value="3" label="&checkwednesdays.label;"/>
|
||||
<menuitem value="4" label="&checkthursdays.label;"/>
|
||||
<menuitem value="5" label="&checkfridays.label;"/>
|
||||
<menuitem value="6" label="&checksaturdays.label;"/>
|
||||
<menuitem value="0" label="&checksundays.label;"/>
|
||||
</menupopup>
|
||||
</menulist>
|
||||
</hbox>
|
||||
</row>
|
||||
<row align="center">
|
||||
<label id="startHourRangeLabel" value="&from.label;"
|
||||
accesskey="&from.accesskey;" control="startHourRange"/>
|
||||
<hbox align="center">
|
||||
<menulist id="startHourRange" oncommand="setEndHourRange()" disabled="true">
|
||||
<menupopup>
|
||||
<menuitem value="0" label="&midnight.label;"/>
|
||||
<menuitem value="1" label="&AMone.label;"/>
|
||||
<menuitem value="2" label="&AMtwo.label;"/>
|
||||
<menuitem value="3" label="&AMthree.label;"/>
|
||||
<menuitem value="4" label="&AMfour.label;"/>
|
||||
<menuitem value="5" label="&AMfive.label;"/>
|
||||
<menuitem value="6" label="&AMsix.label;"/>
|
||||
<menuitem value="7" label="&AMseven.label;"/>
|
||||
<menuitem value="8" label="&AMeight.label;"/>
|
||||
<menuitem value="9" label="&AMnine.label;"/>
|
||||
<menuitem value="10" label="&AMten.label;"/>
|
||||
<menuitem value="11" label="&AMeleven.label;"/>
|
||||
<menuitem value="12" label="&noon.label;"/>
|
||||
<menuitem value="13" label="&PMone.label;"/>
|
||||
<menuitem value="14" label="&PMtwo.label;"/>
|
||||
<menuitem value="15" label="&PMthree.label;"/>
|
||||
<menuitem value="16" label="&PMfour.label;"/>
|
||||
<menuitem value="17" label="&PMfive.label;"/>
|
||||
<menuitem value="18" label="&PMsix.label;"/>
|
||||
<menuitem value="19" label="&PMseven.label;"/>
|
||||
<menuitem value="20" label="&PMeight.label;"/>
|
||||
<menuitem value="21" label="&PMnine.label;"/>
|
||||
<menuitem value="22" label="&PMten.label;"/>
|
||||
<menuitem value="23" label="&PMeleven.label;"/>
|
||||
</menupopup>
|
||||
</menulist>
|
||||
<label id="endHourRangeLabel" value="&to.label;"
|
||||
accesskey="&to.accesskey;" control="endHourRange"/>
|
||||
<menulist id="endHourRange" disabled="true">
|
||||
<menupopup onpopupshowing="setEndHourRange()">
|
||||
<menuitem value="1" label="&AMone.label;"/>
|
||||
<menuitem value="2" label="&AMtwo.label;"/>
|
||||
<menuitem value="3" label="&AMthree.label;"/>
|
||||
<menuitem value="4" label="&AMfour.label;"/>
|
||||
<menuitem value="5" label="&AMfive.label;"/>
|
||||
<menuitem value="6" label="&AMsix.label;"/>
|
||||
<menuitem value="7" label="&AMseven.label;"/>
|
||||
<menuitem value="8" label="&AMeight.label;"/>
|
||||
<menuitem value="9" label="&AMnine.label;"/>
|
||||
<menuitem value="10" label="&AMten.label;"/>
|
||||
<menuitem value="11" label="&AMeleven.label;"/>
|
||||
<menuitem value="12" label="&noon.label;"/>
|
||||
<menuitem value="13" label="&PMone.label;"/>
|
||||
<menuitem value="14" label="&PMtwo.label;"/>
|
||||
<menuitem value="15" label="&PMthree.label;"/>
|
||||
<menuitem value="16" label="&PMfour.label;"/>
|
||||
<menuitem value="17" label="&PMfive.label;"/>
|
||||
<menuitem value="18" label="&PMsix.label;"/>
|
||||
<menuitem value="19" label="&PMseven.label;"/>
|
||||
<menuitem value="20" label="&PMeight.label;"/>
|
||||
<menuitem value="21" label="&PMnine.label;"/>
|
||||
<menuitem value="22" label="&PMten.label;"/>
|
||||
<menuitem value="23" label="&PMeleven.label;"/>
|
||||
<menuitem value="24" label="&midnight.label;"/>
|
||||
</menupopup>
|
||||
</menulist>
|
||||
</hbox>
|
||||
</row>
|
||||
<row align="center">
|
||||
<label id="durationLabel" value="&every.label;"
|
||||
accesskey="&every.accesskey;" control="duration"/>
|
||||
<hbox align="center">
|
||||
<textbox id="duration" size="4" value="60" disabled="true" />
|
||||
<label id="durationSubLabel" value="&minutes.label;" />
|
||||
</hbox>
|
||||
</row>
|
||||
</rows>
|
||||
</grid>
|
||||
</groupbox>
|
||||
<groupbox>
|
||||
<caption label="¬ifications.legend.label;" />
|
||||
<vbox align="start">
|
||||
<checkbox id="bookmarkIcon" label="¬ification.icon.label;"
|
||||
accesskey="¬ification.icon.accesskey;" disabled="true" />
|
||||
<checkbox id="showAlert" label="¬ification.alert.label;"
|
||||
accesskey="¬ification.alert.accesskey;" disabled="true" />
|
||||
<checkbox id="openWindow" label="¬ification.window.label;"
|
||||
accesskey="¬ification.window.accesskey;" disabled="true" />
|
||||
<checkbox id="playSound" label="¬ification.sound.label;"
|
||||
accesskey="¬ification.sound.accesskey;" disabled="true" />
|
||||
</vbox>
|
||||
</groupbox>
|
||||
</hbox>
|
||||
</dialog>
|
|
@ -1,14 +0,0 @@
|
|||
bookmarks-tree, bookmarks-tree[type="multi-column"]
|
||||
{
|
||||
-moz-binding : url("chrome://communicator/content/bookmarks/bookmarksTree.xml#bookmarks-tree-full");
|
||||
}
|
||||
|
||||
bookmarks-tree[type="single-column"]
|
||||
{
|
||||
-moz-binding : url("chrome://communicator/content/bookmarks/bookmarksTree.xml#bookmarks-tree-name");
|
||||
}
|
||||
|
||||
bookmarks-tree[type="folders"]
|
||||
{
|
||||
-moz-binding : url("chrome://communicator/content/bookmarks/bookmarksTree.xml#bookmarks-tree-folders");
|
||||
}
|
Разница между файлами не показана из-за своего большого размера
Загрузить разницу
|
@ -1,161 +0,0 @@
|
|||
/* -*- Mode: Java; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
|
||||
*
|
||||
* ***** BEGIN LICENSE BLOCK *****
|
||||
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
|
||||
*
|
||||
* The contents of this file are subject to the Mozilla Public License Version
|
||||
* 1.1 (the "License"); you may not use this file except in compliance with
|
||||
* the License. You may obtain a copy of the License at
|
||||
* http://www.mozilla.org/MPL/
|
||||
*
|
||||
* Software distributed under the License is distributed on an "AS IS" basis,
|
||||
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||
* for the specific language governing rights and limitations under the
|
||||
* License.
|
||||
*
|
||||
* The Original Code is mozilla.org code.
|
||||
*
|
||||
* The Initial Developer of the Original Code is
|
||||
* Netscape Communications Corporation.
|
||||
* Portions created by the Initial Developer are Copyright (C) 1998
|
||||
* the Initial Developer. All Rights Reserved.
|
||||
*
|
||||
* Contributor(s):
|
||||
* Ben Goodger <ben@netscape.com> (Original Author, v3.0)
|
||||
*
|
||||
* Alternatively, the contents of this file may be used under the terms of
|
||||
* either of the GNU General Public License Version 2 or later (the "GPL"),
|
||||
* or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
|
||||
* in which case the provisions of the GPL or the LGPL are applicable instead
|
||||
* of those above. If you wish to allow use of your version of this file only
|
||||
* under the terms of either the GPL or the LGPL, and not to allow others to
|
||||
* use your version of this file under the terms of the MPL, indicate your
|
||||
* decision by deleting the provisions above and replace them with the notice
|
||||
* and other provisions required by the GPL or the LGPL. If you do not delete
|
||||
* the provisions above, a recipient may use your version of this file under
|
||||
* the terms of any one of the MPL, the GPL or the LGPL.
|
||||
*
|
||||
* ***** END LICENSE BLOCK ***** */
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
// Initialize the command controllers, set focus, tree root,
|
||||
// window title state, etc.
|
||||
function Startup()
|
||||
{
|
||||
const windowNode = document.getElementById("bookmark-window");
|
||||
const bookmarksView = document.getElementById("bookmarks-view");
|
||||
|
||||
var titleString;
|
||||
|
||||
// If we've been opened with a parameter, root the tree on it.
|
||||
if ("arguments" in window && window.arguments[0]) {
|
||||
var title;
|
||||
var uri = window.arguments[0];
|
||||
bookmarksView.tree.setAttribute("ref", uri);
|
||||
document.getElementById("bookmarks-search").setAttribute("hidden","true")
|
||||
if (uri.substring(0,5) == "find:") {
|
||||
title = BookmarksUtils.getLocaleString("search_results_title");
|
||||
// Update the windowtype so that future searches are directed
|
||||
// there and the window is not re-used for bookmarks.
|
||||
windowNode.setAttribute("windowtype", "bookmarks:searchresults");
|
||||
}
|
||||
else
|
||||
title = BookmarksUtils.getProperty(window.arguments[0], NC_NS+"Name");
|
||||
|
||||
titleString = BookmarksUtils.getLocaleString("window_title", title);
|
||||
}
|
||||
else {
|
||||
titleString = BookmarksUtils.getLocaleString("bookmarks_title", title);
|
||||
// always open the bookmark top root folder
|
||||
if (!bookmarksView.treeBoxObject.view.isContainerOpen(0))
|
||||
bookmarksView.treeBoxObject.view.toggleOpenState(0);
|
||||
}
|
||||
|
||||
bookmarksView.treeBoxObject.view.selection.select(0);
|
||||
|
||||
document.title = titleString;
|
||||
|
||||
// correct keybinding command attributes which don't do our business yet
|
||||
var key = document.getElementById("key_delete");
|
||||
if (key.getAttribute("command"))
|
||||
key.setAttribute("command", "cmd_bm_delete");
|
||||
key = document.getElementById("key_delete2");
|
||||
if (key.getAttribute("command"))
|
||||
key.setAttribute("command", "cmd_bm_delete");
|
||||
|
||||
document.getElementById("CommandUpdate_Bookmarks").setAttribute("commandupdater","true");
|
||||
bookmarksView.tree.focus();
|
||||
}
|
||||
|
||||
function Shutdown()
|
||||
{
|
||||
// Store current window position and size in window attributes (for persistence).
|
||||
var win = document.getElementById("bookmark-window");
|
||||
win.setAttribute("x", screenX);
|
||||
win.setAttribute("y", screenY);
|
||||
win.setAttribute("height", outerHeight);
|
||||
win.setAttribute("width", outerWidth);
|
||||
}
|
||||
|
||||
var gConstructedColumnsMenuItems = false;
|
||||
function fillColumnsMenu(aEvent)
|
||||
{
|
||||
var bookmarksView = document.getElementById("bookmarks-view");
|
||||
var columns = bookmarksView.columns;
|
||||
var i;
|
||||
|
||||
if (!gConstructedColumnsMenuItems) {
|
||||
for (i = 0; i < columns.length; ++i) {
|
||||
var menuitem = document.createElement("menuitem");
|
||||
menuitem.setAttribute("label", columns[i].label);
|
||||
menuitem.setAttribute("colid", columns[i].id);
|
||||
menuitem.setAttribute("id", "columnMenuItem:" + columns[i].id);
|
||||
menuitem.setAttribute("type", "checkbox");
|
||||
menuitem.setAttribute("checked", columns[i].hidden != "true");
|
||||
//Disable Name column because you cannot hide it
|
||||
if (columns[i].id == "Name")
|
||||
menuitem.setAttribute("disabled", "true");
|
||||
aEvent.target.appendChild(menuitem);
|
||||
}
|
||||
|
||||
gConstructedColumnsMenuItems = true;
|
||||
}
|
||||
else {
|
||||
for (i = 0; i < columns.length; ++i) {
|
||||
var element = document.getElementById("columnMenuItem:" + columns[i].id);
|
||||
if (element)
|
||||
if (columns[i].hidden == "true")
|
||||
element.setAttribute("checked", "false");
|
||||
else
|
||||
element.setAttribute("checked", "true");
|
||||
}
|
||||
}
|
||||
|
||||
aEvent.stopPropagation();
|
||||
}
|
||||
|
||||
function onViewMenuColumnItemSelected(aEvent)
|
||||
{
|
||||
var colid = aEvent.target.getAttribute("colid");
|
||||
if (colid != "") {
|
||||
var bookmarksView = document.getElementById("bookmarks-view");
|
||||
bookmarksView.toggleColumnVisibility(colid);
|
||||
}
|
||||
|
||||
aEvent.stopPropagation();
|
||||
}
|
||||
|
||||
function OpenBookmarksFile()
|
||||
{
|
||||
const nsIFilePicker = Components.interfaces.nsIFilePicker;
|
||||
var fp = Components.classes["@mozilla.org/filepicker;1"].createInstance(nsIFilePicker);
|
||||
fp.init(window, BookmarksUtils.getLocaleString("SelectOpen"), nsIFilePicker.modeOpen);
|
||||
fp.appendFilters(nsIFilePicker.filterHTML);
|
||||
if (fp.show() == nsIFilePicker.returnOK) {
|
||||
var path = Components.classes["@mozilla.org/supports-string;1"]
|
||||
.createInstance(Components.interfaces.nsISupportsString);
|
||||
path.data = fp.file.path;
|
||||
PREF.setComplexValue("browser.bookmarks.file",
|
||||
Components.interfaces.nsISupportsString, path);
|
||||
}
|
||||
}
|
|
@ -1,258 +0,0 @@
|
|||
<?xml version="1.0"?>
|
||||
|
||||
<!-- -*- Mode: HTML; indent-tabs-mode: nil; -*- -->
|
||||
<!--
|
||||
|
||||
***** BEGIN LICENSE BLOCK *****
|
||||
Version: MPL 1.1/GPL 2.0/LGPL 2.1
|
||||
|
||||
The contents of this file are subject to the Mozilla Public License Version
|
||||
1.1 (the "License"); you may not use this file except in compliance with
|
||||
the License. You may obtain a copy of the License at
|
||||
http://www.mozilla.org/MPL/
|
||||
|
||||
Software distributed under the License is distributed on an "AS IS" basis,
|
||||
WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||
for the specific language governing rights and limitations under the
|
||||
License.
|
||||
|
||||
The Original Code is mozilla.org code.
|
||||
|
||||
The Initial Developer of the Original Code is
|
||||
Netscape Communications Corporation.
|
||||
Portions created by the Initial Developer are Copyright (C) 1998
|
||||
the Initial Developer. All Rights Reserved.
|
||||
|
||||
Contributor(s):
|
||||
Ben Goodger <ben@netscape.com>
|
||||
Blake Ross <blakeross@telocity.com>
|
||||
Dean Tessman <dean_tessman@hotmail.com>
|
||||
Mike Kowalski <mikejk@ameritech.net>
|
||||
|
||||
Alternatively, the contents of this file may be used under the terms of
|
||||
either of the GNU General Public License Version 2 or later (the "GPL"),
|
||||
or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
|
||||
in which case the provisions of the GPL or the LGPL are applicable instead
|
||||
of those above. If you wish to allow use of your version of this file only
|
||||
under the terms of either the GPL or the LGPL, and not to allow others to
|
||||
use your version of this file under the terms of the MPL, indicate your
|
||||
decision by deleting the provisions above and replace them with the notice
|
||||
and other provisions required by the GPL or the LGPL. If you do not delete
|
||||
the provisions above, a recipient may use your version of this file under
|
||||
the terms of any one of the MPL, the GPL or the LGPL.
|
||||
|
||||
***** END LICENSE BLOCK ***** -->
|
||||
|
||||
<?xml-stylesheet href="chrome://communicator/skin/" type="text/css"?>
|
||||
<?xml-stylesheet href="chrome://communicator/skin/bookmarks/bookmarksWindow.css" type="text/css"?>
|
||||
<?xml-stylesheet href="chrome://communicator/content/bookmarks/bookmarks.css" type="text/css"?>
|
||||
<?xul-overlay href="chrome://global/content/globalOverlay.xul"?>
|
||||
<?xul-overlay href="chrome://communicator/content/bookmarks/bookmarksOverlay.xul"?>
|
||||
<?xul-overlay href="chrome://communicator/content/utilityOverlay.xul"?>
|
||||
<?xul-overlay href="chrome://communicator/content/tasksOverlay.xul"?>
|
||||
|
||||
<!DOCTYPE window [
|
||||
<!ENTITY % utilDTD SYSTEM "chrome://communicator/locale/utilityOverlay.dtd" >
|
||||
%utilDTD;
|
||||
<!ENTITY % bmDTD SYSTEM "chrome://communicator/locale/bookmarks/bookmarks.dtd">
|
||||
%bmDTD;
|
||||
]>
|
||||
|
||||
<window id="bookmark-window" windowtype="bookmarks:manager"
|
||||
title="&bookmarksWindowTitle.label;"
|
||||
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
||||
xmlns:web="http://home.netscape.com/WEB-rdf#"
|
||||
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
|
||||
width="630" height="400" screenX="20" screenY="20"
|
||||
persist="width height screenX screenY sizemode"
|
||||
onload="Startup();" onunload="Shutdown();">
|
||||
|
||||
<!-- The order of loading of these script files is IMPORTANT -->
|
||||
|
||||
<!-- Shared Libraries -->
|
||||
<script type="application/x-javascript" src="chrome://global/content/strres.js"/>
|
||||
|
||||
<!-- XXX - This should SO become an XBL widget -->
|
||||
<script type="application/x-javascript" src="chrome://global/content/globalOverlay.js"/>
|
||||
|
||||
<!-- Shared Bookmarks Utility Library -->
|
||||
<script type="application/x-javascript" src="chrome://communicator/content/bookmarks/bookmarks.js"/>
|
||||
<!-- Bookmarks Window -->
|
||||
<script type="application/x-javascript" src="chrome://communicator/content/bookmarks/bookmarksManager.js"/>
|
||||
|
||||
<!-- Bookmarks Window Drag & Drop -->
|
||||
<script type="application/x-javascript" src="chrome://global/content/nsDragAndDrop.js"/>
|
||||
|
||||
<popupset id="bookmarksPopupset"/>
|
||||
|
||||
<commands id="commands">
|
||||
<commandset id="CommandUpdate_Bookmarks"
|
||||
events="focus,tree-select"
|
||||
oncommandupdate="document.getElementById('bookmarks-view').onCommandUpdate();">
|
||||
</commandset>
|
||||
|
||||
<commandset id="tasksCommands"/>
|
||||
|
||||
<!-- File Menu -->
|
||||
<command id="cmd_close" oncommand="close()"/>
|
||||
<command id="cmd_quit"/>
|
||||
<!-- Edit Menu -->
|
||||
<command id="cmd_undo"/>
|
||||
<command id="cmd_redo"/>
|
||||
</commands>
|
||||
|
||||
<stringbundleset id="stringbundleset"/>
|
||||
|
||||
<keyset id="tasksKeys">
|
||||
<!-- File Menu -->
|
||||
<key id="key_close"/>
|
||||
<key id="key_quit"/>
|
||||
</keyset>
|
||||
<keyset id="bookmarks-tasksKeys"/>
|
||||
|
||||
<toolbox id="bookmarks-toolbox">
|
||||
<menubar id="main-menubar" grippytooltiptext="&menuBar.tooltip;">
|
||||
<menu id="menu_File">
|
||||
<menupopup id="menu_FilePopup">
|
||||
<menu id="menu_New">
|
||||
<menupopup>
|
||||
<menuitem label="&menuitem.newBookmark.label;"
|
||||
accesskey="&command.newBookmark.accesskey;"
|
||||
observes="cmd_bm_newbookmark"/>
|
||||
<menuitem label="&menuitem.newFolder.label;"
|
||||
accesskey="&command.newFolder.accesskey;"
|
||||
observes="cmd_bm_newfolder"/>
|
||||
<menuitem label="&menuitem.newSeparator.label;"
|
||||
accesskey="&command.newSeparator.accesskey;"
|
||||
observes="cmd_bm_newseparator"/>
|
||||
</menupopup>
|
||||
</menu>
|
||||
<menuitem label="&menuitem.open.label;"
|
||||
accesskey="&menuitem.open.accesskey;"
|
||||
oncommand="OpenBookmarksFile();"/>
|
||||
<menuitem id="menu_close"/>
|
||||
</menupopup>
|
||||
</menu>
|
||||
<menu id="menu_Edit">
|
||||
<menupopup>
|
||||
<menuitem id="menu_undo"/>
|
||||
<menuitem id="menu_redo"/>
|
||||
<menuseparator/>
|
||||
<menuitem id="menu_bm_cut"
|
||||
label="&cutCmd.label;" accesskey="&cutCmd.accesskey;"
|
||||
key="key_cut" command="cmd_bm_cut"/>
|
||||
<menuitem id="menu_bm_copy"
|
||||
label="©Cmd.label;" accesskey="©Cmd.accesskey;"
|
||||
key="key_copy" command="cmd_bm_copy"/>
|
||||
<menuitem id="menu_bm_paste"
|
||||
label="&pasteCmd.label;" accesskey="&pasteCmd.accesskey;"
|
||||
key="key_paste" command="cmd_bm_paste"/>
|
||||
<menuitem id="menu_bm_delete"
|
||||
label="&deleteCmd.label;" accesskey="&deleteCmd.accesskey;"
|
||||
key="key_delete" command="cmd_bm_delete"/>
|
||||
<menuseparator/>
|
||||
<menuitem id="menu_bm_selectAll"
|
||||
label="&selectAllCmd.label;" accesskey="&selectAllCmd.accesskey;"
|
||||
key="key_selectAll" command="cmd_bm_selectAll"/>
|
||||
<menuseparator/>
|
||||
<menuitem label="&command.moveBookmark.label;"
|
||||
accesskey="&command.moveBookmark.accesskey;"
|
||||
command="cmd_bm_movebookmark"/>
|
||||
<menuseparator/>
|
||||
<menuitem label="&command.sortFolder.label;"
|
||||
accesskey="&command.sortFolder.accesskey;"
|
||||
key="bm_key_sortFolder"
|
||||
command="cmd_bm_sortfolder"/>
|
||||
<menuitem label="&command.sortFolderByName.label;"
|
||||
accesskey="&command.sortFolderByName.accesskey;"
|
||||
command="cmd_bm_sortfolderbyname"/>
|
||||
<menuseparator/>
|
||||
<menuitem label="&command.properties.label;"
|
||||
accesskey="&command.properties.accesskey;"
|
||||
key="bm_key_properties"
|
||||
command="cmd_bm_properties" />
|
||||
</menupopup>
|
||||
</menu>
|
||||
|
||||
<menu id="menu_View">
|
||||
<menupopup>
|
||||
<menuitem id="viewCommandToolbar" type="checkbox" class="menuitem-iconic"
|
||||
label="&menuitem.view.command.toolbar.label;"
|
||||
accesskey="&menuitem.view.command.toolbar.accesskey;"
|
||||
oncommand="goToggleToolbar('command-toolbar', 'viewCommandToolbar'); event.stopPropagation();"
|
||||
checked="true"/>
|
||||
<menuitem id="viewCommandSearchbar" type="checkbox" class="menuitem-iconic"
|
||||
label="&menuitem.view.command.searchbar.label;"
|
||||
accesskey="&menuitem.view.command.searchbar.accesskey;"
|
||||
oncommand="goToggleToolbar('bookmarks-search', 'viewCommandSearchbar'); event.stopPropagation();"
|
||||
checked="true"/>
|
||||
<menu label="&menuitem.view.show_columns.label;"
|
||||
accesskey="&menuitem.view.show_columns.accesskey;">
|
||||
<menupopup id="columnsPopup" onpopupshowing="fillColumnsMenu(event);"
|
||||
oncommand="onViewMenuColumnItemSelected(event);"/>
|
||||
</menu>
|
||||
<menuseparator/>
|
||||
<menuitem label="&menuitem.newbookmarkfolder.label;"
|
||||
command="cmd_bm_setnewbookmarkfolder"
|
||||
accesskey="&menuitem.newbookmarkfolder.accesskey;"/>
|
||||
<menuitem label="&menuitem.newinternetsearchfolder.label;"
|
||||
command="cmd_bm_setnewsearchfolder"
|
||||
accesskey="&menuitem.newinternetsearchfolder.accesskey;"/>
|
||||
<menuitem label="&menuitem.personaltoolbarfolder.label;"
|
||||
command="cmd_bm_setpersonaltoolbarfolder"
|
||||
accesskey="&menuitem.personaltoolbarfolder.accesskey;"/>
|
||||
</menupopup>
|
||||
</menu>
|
||||
<menu id="tasksMenu">
|
||||
<menupopup id="taskPopup">
|
||||
<menuitem command="cmd_bm_find" key="bm_key_find"
|
||||
label="&menuitem.find.label;"
|
||||
accesskey="&menuitem.find.accesskey;"/>
|
||||
<menuitem label="&menuitem.import.label;"
|
||||
accesskey="&menuitem.import.accesskey;"
|
||||
observes="cmd_bm_import"/>
|
||||
<menuitem label="&menuitem.export.label;"
|
||||
accesskey="&menuitem.export.accesskey;"
|
||||
observes="cmd_bm_export"/>
|
||||
<menuseparator/>
|
||||
</menupopup>
|
||||
</menu>
|
||||
<menu id="windowMenu"/>
|
||||
<menu id="menu_Help"/>
|
||||
</menubar>
|
||||
|
||||
<toolbar class="chromeclass-toolbar" id="command-toolbar" tbalign="stretch" grippytooltiptext="&bookmarkToolbar.tooltip;">
|
||||
<toolbarbutton id="newfolder" label="&button.newFolder.label;"
|
||||
accesskey="&button.newFolder.accesskey;"
|
||||
command="cmd_bm_newfolder"/>
|
||||
<toolbarbutton id="newseparator" label="&button.newSeparator.label;"
|
||||
accesskey="&button.newSeparator.accesskey;"
|
||||
command="cmd_bm_newseparator"/>
|
||||
<toolbarseparator/>
|
||||
<toolbarbutton id="moveBookmark" label="&command.moveBookmarkShort.label;"
|
||||
accesskey="&command.moveBookmark.accesskey;"
|
||||
command="cmd_bm_movebookmark"/>
|
||||
<toolbarseparator/>
|
||||
<toolbarbutton id="properties" label="&command.properties.label;"
|
||||
accesskey="&button.properties.accesskey;"
|
||||
command="cmd_bm_properties"/>
|
||||
<toolbarbutton id="rename" label="&command.rename.label;"
|
||||
accesskey="&button.rename.accesskey;"
|
||||
command="cmd_bm_rename"/>
|
||||
<toolbarbutton id="delete" label="&command.delete.label;"
|
||||
accesskey="&button.delete.accesskey;"
|
||||
command="cmd_bm_delete"/>
|
||||
</toolbar>
|
||||
|
||||
<toolbar id="bookmarks-search" grippytooltiptext="&bookmarksSearch.tooltip;">
|
||||
<label value="&search.label;" accesskey="&search.accesskey;" control="search-box"/>
|
||||
<textbox id="search-box" flex="1"
|
||||
type="timed" timeout="500"
|
||||
oncommand="document.getElementById('bookmarks-view').searchBookmarks(this.value)"/>
|
||||
</toolbar>
|
||||
</toolbox>
|
||||
|
||||
<bookmarks-tree id="bookmarks-view" flex="1"/>
|
||||
|
||||
</window>
|
||||
|
|
@ -1,884 +0,0 @@
|
|||
/* -*- Mode: Java; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
||||
/* ***** BEGIN LICENSE BLOCK *****
|
||||
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
|
||||
*
|
||||
* The contents of this file are subject to the Mozilla Public License Version
|
||||
* 1.1 (the "License"); you may not use this file except in compliance with
|
||||
* the License. You may obtain a copy of the License at
|
||||
* http://www.mozilla.org/MPL/
|
||||
*
|
||||
* Software distributed under the License is distributed on an "AS IS" basis,
|
||||
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||
* for the specific language governing rights and limitations under the
|
||||
* License.
|
||||
*
|
||||
* The Original Code is mozilla.org code.
|
||||
*
|
||||
* The Initial Developer of the Original Code is
|
||||
* Pierre Chanial <chanial@noos.fr>.
|
||||
* Portions created by the Initial Developer are Copyright (C) 1998
|
||||
* the Initial Developer. All Rights Reserved.
|
||||
*
|
||||
* Contributor(s):
|
||||
*
|
||||
* Alternatively, the contents of this file may be used under the terms of
|
||||
* either of the GNU General Public License Version 2 or later (the "GPL"),
|
||||
* or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
|
||||
* in which case the provisions of the GPL or the LGPL are applicable instead
|
||||
* of those above. If you wish to allow use of your version of this file only
|
||||
* under the terms of either the GPL or the LGPL, and not to allow others to
|
||||
* use your version of this file under the terms of the MPL, indicate your
|
||||
* decision by deleting the provisions above and replace them with the notice
|
||||
* and other provisions required by the GPL or the LGPL. If you do not delete
|
||||
* the provisions above, a recipient may use your version of this file under
|
||||
* the terms of any one of the MPL, the GPL or the LGPL.
|
||||
*
|
||||
* ***** END LICENSE BLOCK ***** */
|
||||
|
||||
var BookmarksMenu = {
|
||||
_selection:null,
|
||||
_target:null,
|
||||
_orientation:null,
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
// Fill a context menu popup with menuitems appropriate for the current
|
||||
// selection.
|
||||
createContextMenu: function (aEvent)
|
||||
{
|
||||
var target = document.popupNode;
|
||||
if (!this.isBTBookmark(target.id) && target.id != "bookmarks-ptf")
|
||||
return false;
|
||||
target.focus() // buttons in the pt have -moz-user-focus: ignore -->
|
||||
this._selection = this.getBTSelection(target);
|
||||
this._orientation = this.getBTOrientation(aEvent, target);
|
||||
this._target = this.getBTTarget(target, this._orientation);
|
||||
BookmarksCommand.createContextMenu(aEvent, this._selection);
|
||||
this.onCommandUpdate();
|
||||
aEvent.target.addEventListener("mousemove", BookmarksMenuController.onMouseMove, false);
|
||||
return true;
|
||||
},
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////
|
||||
// Clean up after closing the context menu popup
|
||||
destroyContextMenu: function (aEvent)
|
||||
{
|
||||
if (content)
|
||||
content.focus();
|
||||
BookmarksMenuDNDObserver.onDragRemoveFeedBack(document.popupNode); // needed on cancel
|
||||
aEvent.target.removeEventListener("mousemove", BookmarksMenuController.onMouseMove, false);
|
||||
},
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// returns the formatted selection from aNode
|
||||
getBTSelection: function (aNode)
|
||||
{
|
||||
var item;
|
||||
switch (aNode.id) {
|
||||
case "bookmarks-ptf":
|
||||
item = "NC:PersonalToolbarFolder";
|
||||
break;
|
||||
case "BookmarksMenu":
|
||||
item = "NC:BookmarksRoot";
|
||||
break;
|
||||
default:
|
||||
item = aNode.id;
|
||||
}
|
||||
if (!this.isBTBookmark(item))
|
||||
return {length:0};
|
||||
var parent = this.getBTContainer(aNode);
|
||||
var isExpanded = aNode.hasAttribute("open") && aNode.open;
|
||||
var selection = {};
|
||||
selection.item = [RDF.GetResource(item)];
|
||||
selection.parent = [RDF.GetResource(parent)];
|
||||
selection.isExpanded = [isExpanded];
|
||||
selection.length = selection.item.length;
|
||||
BookmarksUtils.checkSelection(selection);
|
||||
return selection;
|
||||
},
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////
|
||||
// returns the insertion target from aNode
|
||||
getBTTarget: function (aNode, aOrientation)
|
||||
{
|
||||
var item, parent, index;
|
||||
|
||||
switch (aNode.id) {
|
||||
case "BookmarksMenu":
|
||||
case "bookmarks-button":
|
||||
parent = "NC:BookmarksRoot";
|
||||
break;
|
||||
case "bookmarks-ptf":
|
||||
item = BookmarksToolbar.getLastVisibleBookmark();
|
||||
// Continue to next case.
|
||||
case "bookmarks-chevron":
|
||||
parent = "NC:PersonalToolbarFolder";
|
||||
break;
|
||||
default:
|
||||
if (aOrientation == BookmarksUtils.DROP_ON)
|
||||
parent = aNode.id
|
||||
else {
|
||||
parent = this.getBTContainer(aNode);
|
||||
item = aNode;
|
||||
}
|
||||
}
|
||||
|
||||
parent = RDF.GetResource(parent);
|
||||
if (aOrientation == BookmarksUtils.DROP_ON)
|
||||
return BookmarksUtils.getTargetFromFolder(parent);
|
||||
|
||||
item = RDF.GetResource(item.id);
|
||||
RDFC.Init(BMDS, parent);
|
||||
index = RDFC.IndexOf(item);
|
||||
if (aOrientation == BookmarksUtils.DROP_AFTER)
|
||||
++index;
|
||||
|
||||
return { parent: parent, index: index };
|
||||
},
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////
|
||||
// returns the parent resource of a node in the personal toolbar.
|
||||
// this is determined by inspecting the source element and walking up the
|
||||
// DOM tree to find the appropriate containing node.
|
||||
getBTContainer: function (aNode)
|
||||
{
|
||||
var parent;
|
||||
var item = aNode.id;
|
||||
if (!this.isBTBookmark(item))
|
||||
return "NC:BookmarksRoot"
|
||||
parent = aNode.parentNode.parentNode;
|
||||
parent = parent.id;
|
||||
switch (parent) {
|
||||
case "BookmarksMenu":
|
||||
case "bookmarks-button":
|
||||
return "NC:BookmarksRoot";
|
||||
case "PersonalToolbar":
|
||||
case "bookmarks-chevron":
|
||||
return "NC:PersonalToolbarFolder";
|
||||
default:
|
||||
return parent;
|
||||
}
|
||||
},
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
// returns true if the node is a bookmark, a folder or a bookmark separator
|
||||
isBTBookmark: function (aURI)
|
||||
{
|
||||
if (!aURI)
|
||||
return false;
|
||||
var type = BookmarksUtils.resolveType(aURI);
|
||||
return (type == "BookmarkSeparator" ||
|
||||
type == "Bookmark" ||
|
||||
type == "Folder" ||
|
||||
type == "FolderGroup" ||
|
||||
type == "PersonalToolbarFolder")
|
||||
},
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////
|
||||
// returns true if the node is a container. -->
|
||||
isBTContainer: function (aTarget)
|
||||
{
|
||||
return aTarget.localName == "menu" || (aTarget.localName == "toolbarbutton" &&
|
||||
(aTarget.getAttribute("container") == "true" || aTarget.getAttribute("group") == "true"));
|
||||
},
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////
|
||||
// returns BookmarksUtils.DROP_BEFORE, DROP_ON or DROP_AFTER accordingly
|
||||
// to the event coordinates. Skin authors could break us, we'll cross that
|
||||
// bridge when they turn us 90degrees. -->
|
||||
getBTOrientation: function (aEvent, aTarget)
|
||||
{
|
||||
var target
|
||||
if (!aTarget)
|
||||
target = aEvent.target;
|
||||
else
|
||||
target = aTarget;
|
||||
if (target.localName == "menu" &&
|
||||
target.parentNode.localName != "menupopup")
|
||||
return BookmarksUtils.DROP_ON;
|
||||
if (target.id == "bookmarks-ptf") {
|
||||
return target.hasChildNodes() ?
|
||||
BookmarksUtils.DROP_AFTER : BookmarksUtils.DROP_ON;
|
||||
}
|
||||
if (target.id == "bookmarks-chevron")
|
||||
return BookmarksUtils.DROP_ON;
|
||||
|
||||
var overButtonBoxObject = target.boxObject.QueryInterface(Components.interfaces.nsIBoxObject);
|
||||
var overParentBoxObject = target.parentNode.boxObject.QueryInterface(Components.interfaces.nsIBoxObject);
|
||||
|
||||
var size, border;
|
||||
var coordValue, clientCoordValue;
|
||||
switch (target.localName) {
|
||||
case "toolbarseparator":
|
||||
case "toolbarbutton":
|
||||
size = overButtonBoxObject.width;
|
||||
coordValue = overButtonBoxObject.x;
|
||||
clientCoordValue = aEvent.clientX;
|
||||
break;
|
||||
case "menuseparator":
|
||||
case "menu":
|
||||
case "menuitem":
|
||||
size = overButtonBoxObject.height;
|
||||
coordValue = overButtonBoxObject.screenY;
|
||||
clientCoordValue = aEvent.screenY;
|
||||
break;
|
||||
default: return BookmarksUtils.DROP_ON;
|
||||
}
|
||||
if (this.isBTContainer(target))
|
||||
if (target.localName == "toolbarbutton") {
|
||||
// the DROP_BEFORE area excludes the label
|
||||
var iconNode = document.getAnonymousElementByAttribute(target, "class", "toolbarbutton-icon");
|
||||
border = parseInt(document.defaultView.getComputedStyle(target,"").getPropertyValue("padding-left")) +
|
||||
parseInt(document.defaultView.getComputedStyle(iconNode ,"").getPropertyValue("width"));
|
||||
border = Math.min(size/5,Math.max(border,4));
|
||||
} else
|
||||
border = size/5;
|
||||
else
|
||||
border = size/2;
|
||||
|
||||
// in the first region?
|
||||
if (clientCoordValue-coordValue < border)
|
||||
return BookmarksUtils.DROP_BEFORE;
|
||||
// in the last region?
|
||||
if (clientCoordValue-coordValue >= size-border)
|
||||
return BookmarksUtils.DROP_AFTER;
|
||||
// must be in the middle somewhere
|
||||
return BookmarksUtils.DROP_ON;
|
||||
},
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////
|
||||
// expand the folder targeted by the context menu.
|
||||
expandBTFolder: function ()
|
||||
{
|
||||
var target = document.popupNode.lastChild;
|
||||
if (document.popupNode.open)
|
||||
target.hidePopup();
|
||||
else
|
||||
target.showPopup(document.popupNode);
|
||||
},
|
||||
|
||||
onCommandUpdate: function ()
|
||||
{
|
||||
var selection = this._selection;
|
||||
var target = this._target;
|
||||
BookmarksController.onCommandUpdate(selection, target);
|
||||
if (document.popupNode.id == "bookmarks-ptf") {
|
||||
// disabling 'cut' and 'copy' on the empty area of the personal toolbar
|
||||
var commandNode = document.getElementById("cmd_bm_cut");
|
||||
commandNode.setAttribute("disabled", "true");
|
||||
commandNode = document.getElementById("cmd_bm_copy");
|
||||
commandNode.setAttribute("disabled", "true");
|
||||
}
|
||||
},
|
||||
|
||||
loadBookmark: function (aEvent, aDS)
|
||||
{
|
||||
if (this.isBTBookmark(aEvent.target.id))
|
||||
BookmarksUtils.loadBookmarkBrowser(aEvent, aDS);
|
||||
},
|
||||
|
||||
////////////////////////////////////////////////
|
||||
// loads a bookmark with the middle mouse button
|
||||
loadBookmarkMiddleClick: function (aEvent, aDS)
|
||||
{
|
||||
if (aEvent.type != "click" || aEvent.button != 1)
|
||||
return;
|
||||
// unlike for command events, we have to close the menus manually
|
||||
for (var node = aEvent.target; node != aEvent.currentTarget;
|
||||
node = node.parentNode) {
|
||||
if (node.nodeType == node.ELEMENT_NODE && node.tagName == "menupopup")
|
||||
node.hidePopup();
|
||||
}
|
||||
this.loadBookmark(aEvent, aDS);
|
||||
}
|
||||
}
|
||||
|
||||
var BookmarksMenuController = {
|
||||
|
||||
supportsCommand: BookmarksController.supportsCommand,
|
||||
|
||||
isCommandEnabled: function (aCommand)
|
||||
{
|
||||
// warning: this is not the function called in BookmarksController.onCommandUpdate
|
||||
var selection = BookmarksMenu._selection;
|
||||
var target = BookmarksMenu._target;
|
||||
if (selection)
|
||||
return BookmarksController.isCommandEnabled(aCommand, selection, target);
|
||||
return false;
|
||||
},
|
||||
|
||||
doCommand: function (aCommand)
|
||||
{
|
||||
BookmarksMenuDNDObserver.onDragRemoveFeedBack(document.popupNode);
|
||||
var selection = BookmarksMenu._selection;
|
||||
var target = BookmarksMenu._target;
|
||||
switch (aCommand) {
|
||||
case "cmd_bm_expandfolder":
|
||||
setTimeout(BookmarksMenu.expandBTFolder, 0);
|
||||
break;
|
||||
default:
|
||||
BookmarksController.doCommand(aCommand, selection, target);
|
||||
}
|
||||
},
|
||||
|
||||
onMouseMove: function (aEvent)
|
||||
{
|
||||
var command = aEvent.target.getAttribute("command");
|
||||
var isDisabled = aEvent.target.getAttribute("disabled")
|
||||
if (isDisabled != "true" && (command == "cmd_bm_newfolder" || command == "cmd_bm_paste")) {
|
||||
BookmarksMenuDNDObserver.onDragSetFeedBack(document.popupNode, BookmarksMenu._orientation);
|
||||
} else {
|
||||
BookmarksMenuDNDObserver.onDragRemoveFeedBack(document.popupNode);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
var BookmarksMenuDNDObserver = {
|
||||
|
||||
////////////////////
|
||||
// Public methods //
|
||||
////////////////////
|
||||
|
||||
onDragStart: function (aEvent, aXferData, aDragAction)
|
||||
{
|
||||
var target = aEvent.target;
|
||||
|
||||
// Prevent dragging from an invalid region
|
||||
if (!this.canDrop(aEvent))
|
||||
return;
|
||||
|
||||
// Prevent dragging out of menupopups on non Win32 platforms.
|
||||
// a) on Mac drag from menus is generally regarded as being satanic
|
||||
// b) on Linux, this causes an X-server crash, (bug 151336)
|
||||
// c) on Windows, there is no hang or crash associated with this, so we'll leave
|
||||
// the functionality there.
|
||||
if (navigator.platform != "Win32" && target.localName != "toolbarbutton")
|
||||
return;
|
||||
|
||||
// bail if dragging from the empty area of the bookmarks toolbar
|
||||
if (target.id == "bookmarks-ptf")
|
||||
return
|
||||
|
||||
// a drag start is fired when leaving an open toolbarbutton(type=menu)
|
||||
// (see bug 143031)
|
||||
if (this.isContainer(target) &&
|
||||
target.getAttribute("group") != "true") {
|
||||
if (this.isPlatformNotSupported)
|
||||
return;
|
||||
if (!aEvent.shiftKey && !aEvent.altKey && !aEvent.ctrlKey)
|
||||
return;
|
||||
// menus open on mouse down
|
||||
target.firstChild.hidePopup();
|
||||
}
|
||||
var selection = BookmarksMenu.getBTSelection(target);
|
||||
aXferData.data = BookmarksUtils.getXferDataFromSelection(selection);
|
||||
},
|
||||
|
||||
onDragOver: function(aEvent, aFlavour, aDragSession)
|
||||
{
|
||||
var orientation = BookmarksMenu.getBTOrientation(aEvent)
|
||||
if (aDragSession.canDrop)
|
||||
this.onDragSetFeedBack(aEvent.target, orientation);
|
||||
if (orientation != this.mCurrentDropPosition) {
|
||||
// emulating onDragExit and onDragEnter events since the drop region
|
||||
// has changed on the target.
|
||||
this.onDragExit(aEvent, aDragSession);
|
||||
this.onDragEnter(aEvent, aDragSession);
|
||||
}
|
||||
if (this.isPlatformNotSupported)
|
||||
return;
|
||||
if (this.isTimerSupported || !aDragSession.sourceNode)
|
||||
return;
|
||||
this.onDragOverCheckTimers();
|
||||
},
|
||||
|
||||
onDragEnter: function (aEvent, aDragSession)
|
||||
{
|
||||
var target = aEvent.target;
|
||||
var orientation = BookmarksMenu.getBTOrientation(aEvent);
|
||||
if (target.localName == "menupopup" || target.id == "bookmarks-ptf")
|
||||
target = target.parentNode;
|
||||
if (aDragSession.canDrop) {
|
||||
this.onDragSetFeedBack(target, orientation);
|
||||
this.onDragEnterSetTimer(target, aDragSession);
|
||||
}
|
||||
this.mCurrentDragOverTarget = target;
|
||||
this.mCurrentDropPosition = orientation;
|
||||
},
|
||||
|
||||
onDragExit: function (aEvent, aDragSession)
|
||||
{
|
||||
var target = aEvent.target;
|
||||
if (target.localName == "menupopup" || target.id == "bookmarks-ptf")
|
||||
target = target.parentNode;
|
||||
this.onDragRemoveFeedBack(target);
|
||||
this.onDragExitSetTimer(target, aDragSession);
|
||||
this.mCurrentDragOverTarget = null;
|
||||
this.mCurrentDropPosition = null;
|
||||
},
|
||||
|
||||
onDrop: function (aEvent, aXferData, aDragSession)
|
||||
{
|
||||
var target = aEvent.target;
|
||||
this.onDragRemoveFeedBack(target);
|
||||
|
||||
var selection = BookmarksUtils.getSelectionFromXferData(aDragSession);
|
||||
|
||||
var orientation = BookmarksMenu.getBTOrientation(aEvent);
|
||||
|
||||
// For RTL PersonalBar bookmarks buttons, orientation should be inverted (only in drop case)
|
||||
// because "before" (to the left) on the screen translates to "after" in the collection of items.
|
||||
if (target.localName == "toolbarbutton")
|
||||
if (window.getComputedStyle(document.getElementById("PersonalToolbar"),'').direction == 'rtl')
|
||||
if (orientation == BookmarksUtils.DROP_AFTER)
|
||||
orientation = BookmarksUtils.DROP_BEFORE;
|
||||
else if (orientation == BookmarksUtils.DROP_BEFORE)
|
||||
orientation = BookmarksUtils.DROP_AFTER;
|
||||
|
||||
var selTarget = BookmarksMenu.getBTTarget(target, orientation);
|
||||
|
||||
const kDSIID = Components.interfaces.nsIDragService;
|
||||
const kCopyAction = kDSIID.DRAGDROP_ACTION_COPY + kDSIID.DRAGDROP_ACTION_LINK;
|
||||
|
||||
// hide the 'open in tab' menuseparator because bookmarks
|
||||
// can be inserted after it if they are dropped after the last bookmark
|
||||
// a more comprehensive fix would be in the menupopup template builder
|
||||
var menuTarget = (target.localName == "toolbarbutton" ||
|
||||
target.localName == "menu") &&
|
||||
orientation == BookmarksUtils.DROP_ON?
|
||||
target.lastChild:target.parentNode;
|
||||
if (menuTarget.hasChildNodes() &&
|
||||
menuTarget.lastChild.id == "openintabs-menuitem") {
|
||||
menuTarget.removeChild(menuTarget.lastChild.previousSibling);
|
||||
}
|
||||
|
||||
if (aDragSession.dragAction & kCopyAction)
|
||||
BookmarksUtils.insertSelection("drag", selection, selTarget);
|
||||
else
|
||||
BookmarksUtils.moveSelection("drag", selection, selTarget);
|
||||
|
||||
var chevron = document.getElementById("bookmarks-chevron");
|
||||
if (chevron.getAttribute("open") == "true") {
|
||||
BookmarksToolbar.resizeFunc(null);
|
||||
BookmarksToolbar.updateOverflowMenu(document.getElementById("bookmarks-chevron-popup"));
|
||||
}
|
||||
|
||||
// show again the menuseparator
|
||||
if (menuTarget.hasChildNodes() &&
|
||||
menuTarget.lastChild.id == "openintabs-menuitem") {
|
||||
var element = document.createElementNS(XUL_NS, "menuseparator");
|
||||
menuTarget.insertBefore(element, menuTarget.lastChild);
|
||||
}
|
||||
},
|
||||
|
||||
canDrop: function (aEvent, aDragSession)
|
||||
{
|
||||
var target = aEvent.target;
|
||||
|
||||
// onDragStart calls this without a drag session
|
||||
// There will be no sourceNode for drags from external apps
|
||||
if (aDragSession && aDragSession.sourceNode) {
|
||||
var orientation = BookmarksMenu.getBTOrientation(aEvent, target);
|
||||
if (target == aDragSession.sourceNode ||
|
||||
(target == aDragSession.sourceNode.previousSibling &&
|
||||
orientation == BookmarksUtils.DROP_AFTER) ||
|
||||
(target == aDragSession.sourceNode.nextSibling &&
|
||||
orientation == BookmarksUtils.DROP_BEFORE))
|
||||
return false;
|
||||
}
|
||||
|
||||
return BookmarksMenu.isBTBookmark(target.id) &&
|
||||
target.id != "NC:SystemBookmarksStaticRoot" &&
|
||||
target.id.substring(0,5) != "find:" ||
|
||||
target.id == "BookmarksMenu" ||
|
||||
target.id == "bookmarks-button" ||
|
||||
target.id == "bookmarks-chevron" ||
|
||||
target.id == "bookmarks-ptf";
|
||||
},
|
||||
|
||||
canHandleMultipleItems: true,
|
||||
|
||||
getSupportedFlavours: function ()
|
||||
{
|
||||
var flavourSet = new FlavourSet();
|
||||
flavourSet.appendFlavour("moz/rdfitem");
|
||||
flavourSet.appendFlavour("text/x-moz-url");
|
||||
flavourSet.appendFlavour("application/x-moz-file", "nsIFile");
|
||||
flavourSet.appendFlavour("text/unicode");
|
||||
return flavourSet;
|
||||
},
|
||||
|
||||
|
||||
////////////////////////////////////
|
||||
// Private methods and properties //
|
||||
////////////////////////////////////
|
||||
|
||||
springLoadedMenuDelay: 350, // milliseconds
|
||||
isPlatformNotSupported: navigator.platform.indexOf("Mac") != -1, // see bug 136524
|
||||
// Needs to be dynamically overridden (to |true|) in the case of an external drag: see bug 232795.
|
||||
isTimerSupported: navigator.platform.indexOf("Win") == -1,
|
||||
|
||||
mCurrentDragOverTarget: null,
|
||||
mCurrentDropPosition: null,
|
||||
loadTimer : null,
|
||||
closeTimer : null,
|
||||
loadTarget : null,
|
||||
closeTarget: null,
|
||||
|
||||
_observers : null,
|
||||
get mObservers ()
|
||||
{
|
||||
if (!this._observers) {
|
||||
this._observers = [
|
||||
document.getElementById("bookmarks-ptf"),
|
||||
document.getElementById("BookmarksMenu").parentNode,
|
||||
document.getElementById("bookmarks-chevron").parentNode,
|
||||
document.getElementById("PersonalToolbar")
|
||||
]
|
||||
}
|
||||
return this._observers;
|
||||
},
|
||||
|
||||
getObserverForNode: function (aNode)
|
||||
{
|
||||
if (!aNode)
|
||||
return null;
|
||||
var node = aNode;
|
||||
var observer;
|
||||
do {
|
||||
for (var i=0; i < this.mObservers.length; i++) {
|
||||
observer = this.mObservers[i];
|
||||
if (observer == node)
|
||||
return observer;
|
||||
}
|
||||
node = node.parentNode;
|
||||
} while (node != document)
|
||||
return null;
|
||||
},
|
||||
|
||||
onDragCloseMenu: function (aNode)
|
||||
{
|
||||
var children = aNode.childNodes;
|
||||
for (var i = 0; i < children.length; i++) {
|
||||
if (this.isContainer(children[i]) &&
|
||||
children[i].getAttribute("open") == "true") {
|
||||
this.onDragCloseMenu(children[i].lastChild);
|
||||
if (children[i] != this.mCurrentDragOverTarget || this.mCurrentDropPosition != BookmarksUtils.DROP_ON)
|
||||
children[i].lastChild.hidePopup();
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
onDragCloseTarget: function ()
|
||||
{
|
||||
var currentObserver = this.getObserverForNode(this.mCurrentDragOverTarget);
|
||||
// close all the menus not hovered by the mouse
|
||||
for (var i=0; i < this.mObservers.length; i++) {
|
||||
if (currentObserver != this.mObservers[i])
|
||||
this.onDragCloseMenu(this.mObservers[i]);
|
||||
else
|
||||
this.onDragCloseMenu(this.mCurrentDragOverTarget.parentNode);
|
||||
}
|
||||
},
|
||||
|
||||
onDragLoadTarget: function (aTarget)
|
||||
{
|
||||
if (!this.mCurrentDragOverTarget)
|
||||
return;
|
||||
// Load the current menu
|
||||
if (this.mCurrentDropPosition == BookmarksUtils.DROP_ON &&
|
||||
this.isContainer(aTarget) &&
|
||||
aTarget.getAttribute("group") != "true")
|
||||
aTarget.lastChild.showPopup(aTarget);
|
||||
},
|
||||
|
||||
onDragOverCheckTimers: function ()
|
||||
{
|
||||
var now = new Date().getTime();
|
||||
if (this.closeTimer && now-this.springLoadedMenuDelay>this.closeTimer) {
|
||||
this.onDragCloseTarget();
|
||||
this.closeTimer = null;
|
||||
}
|
||||
if (this.loadTimer && (now-this.springLoadedMenuDelay>this.loadTimer)) {
|
||||
this.onDragLoadTarget(this.loadTarget);
|
||||
this.loadTimer = null;
|
||||
}
|
||||
},
|
||||
|
||||
onDragEnterSetTimer: function (aTarget, aDragSession)
|
||||
{
|
||||
if (this.isPlatformNotSupported)
|
||||
return;
|
||||
if (this.isTimerSupported || !aDragSession.sourceNode) {
|
||||
var targetToBeLoaded = aTarget;
|
||||
clearTimeout(this.loadTimer);
|
||||
if (aTarget == aDragSession.sourceNode)
|
||||
return;
|
||||
var This = this;
|
||||
this.loadTimer=setTimeout(function () {This.onDragLoadTarget(targetToBeLoaded)}, This.springLoadedMenuDelay);
|
||||
} else {
|
||||
var now = new Date().getTime();
|
||||
this.loadTimer = now;
|
||||
this.loadTarget = aTarget;
|
||||
}
|
||||
},
|
||||
|
||||
onDragExitSetTimer: function (aTarget, aDragSession)
|
||||
{
|
||||
if (this.isPlatformNotSupported)
|
||||
return;
|
||||
var This = this;
|
||||
if (this.isTimerSupported || !aDragSession.sourceNode) {
|
||||
clearTimeout(this.closeTimer)
|
||||
this.closeTimer=setTimeout(function () {This.onDragCloseTarget()}, This.springLoadedMenuDelay);
|
||||
} else {
|
||||
var now = new Date().getTime();
|
||||
this.closeTimer = now;
|
||||
this.closeTarget = aTarget;
|
||||
this.loadTimer = null;
|
||||
|
||||
// If the user isn't rearranging within the menu, close it
|
||||
// To do so, we exploit a Mac bug: timeout set during
|
||||
// drag and drop on Windows and Mac are fired only after that the drop is released.
|
||||
// timeouts will pile up, we may have a better approach but for the moment, this one
|
||||
// correctly close the menus after a drop/cancel outside the personal toolbar.
|
||||
// The if statement in the function has been introduced to deal with rare but reproducible
|
||||
// missing Exit events.
|
||||
if (aDragSession.sourceNode.localName != "menuitem" && aDragSession.sourceNode.localName != "menu")
|
||||
setTimeout(function () { if (This.mCurrentDragOverTarget) {This.onDragRemoveFeedBack(This.mCurrentDragOverTarget); This.mCurrentDragOverTarget=null} This.loadTimer=null; This.onDragCloseTarget() }, 0);
|
||||
}
|
||||
},
|
||||
|
||||
onDragSetFeedBack: function (aTarget, aOrientation)
|
||||
{
|
||||
switch (aTarget.localName) {
|
||||
case "toolbarseparator":
|
||||
case "toolbarbutton":
|
||||
switch (aOrientation) {
|
||||
case BookmarksUtils.DROP_BEFORE:
|
||||
aTarget.setAttribute("dragover-left", "true");
|
||||
break;
|
||||
case BookmarksUtils.DROP_AFTER:
|
||||
aTarget.setAttribute("dragover-right", "true");
|
||||
break;
|
||||
case BookmarksUtils.DROP_ON:
|
||||
aTarget.setAttribute("dragover-top" , "true");
|
||||
aTarget.setAttribute("dragover-bottom", "true");
|
||||
aTarget.setAttribute("dragover-left" , "true");
|
||||
aTarget.setAttribute("dragover-right" , "true");
|
||||
break;
|
||||
}
|
||||
break;
|
||||
case "menuseparator":
|
||||
case "menu":
|
||||
case "menuitem":
|
||||
switch (aOrientation) {
|
||||
case BookmarksUtils.DROP_BEFORE:
|
||||
aTarget.setAttribute("dragover-top", "true");
|
||||
break;
|
||||
case BookmarksUtils.DROP_AFTER:
|
||||
aTarget.setAttribute("dragover-bottom", "true");
|
||||
break;
|
||||
case BookmarksUtils.DROP_ON:
|
||||
break;
|
||||
}
|
||||
break;
|
||||
case "toolbar":
|
||||
var newTarget = BookmarksToolbar.getLastVisibleBookmark();
|
||||
if (newTarget)
|
||||
newTarget.setAttribute("dragover-right", "true");
|
||||
break;
|
||||
case "hbox":
|
||||
case "menupopup": break;
|
||||
default: dump("No feedback for: "+aTarget.localName+"\n");
|
||||
}
|
||||
},
|
||||
|
||||
onDragRemoveFeedBack: function (aTarget)
|
||||
{
|
||||
var newTarget;
|
||||
var bt;
|
||||
if (aTarget.id == "PersonalToolbar" || aTarget.id == "bookmarks-ptf") {
|
||||
newTarget = BookmarksToolbar.getLastVisibleBookmark();
|
||||
if (newTarget)
|
||||
newTarget.removeAttribute("dragover-right");
|
||||
} else {
|
||||
aTarget.removeAttribute("dragover-left");
|
||||
aTarget.removeAttribute("dragover-right");
|
||||
aTarget.removeAttribute("dragover-top");
|
||||
aTarget.removeAttribute("dragover-bottom");
|
||||
}
|
||||
},
|
||||
|
||||
onDropSetFeedBack: function (aTarget)
|
||||
{
|
||||
//XXX Not yet...
|
||||
},
|
||||
|
||||
isContainer: function (aTarget)
|
||||
{
|
||||
return aTarget.localName == "menu" ||
|
||||
aTarget.localName == "toolbarbutton" &&
|
||||
aTarget.getAttribute("type") == "menu";
|
||||
}
|
||||
}
|
||||
|
||||
var BookmarksToolbar =
|
||||
{
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// make bookmarks toolbar act like menus
|
||||
openMenuButton: null,
|
||||
autoOpenMenu: function (aTarget)
|
||||
{
|
||||
if (this.openMenuButton &&
|
||||
this.openMenuButton != aTarget &&
|
||||
aTarget.localName == "toolbarbutton" &&
|
||||
(aTarget.type == "menu" ||
|
||||
aTarget.type == "menu-button")) {
|
||||
this.openMenuButton.open = false;
|
||||
aTarget.open = true;
|
||||
}
|
||||
},
|
||||
onMenuOpen: function (aTarget)
|
||||
{
|
||||
if (aTarget.parentNode.localName == "toolbarbutton")
|
||||
this.openMenuButton = aTarget.parentNode;
|
||||
},
|
||||
onMenuClose: function (aTarget)
|
||||
{
|
||||
if (aTarget.parentNode.localName == "toolbarbutton")
|
||||
this.openMenuButton = null;
|
||||
},
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// returns the node of the last visible bookmark on the toolbar -->
|
||||
getLastVisibleBookmark: function ()
|
||||
{
|
||||
var buttons = document.getElementById("bookmarks-ptf");
|
||||
var button = buttons.firstChild;
|
||||
if (!button)
|
||||
return null; // empty bookmarks toolbar
|
||||
do {
|
||||
if (button.collapsed)
|
||||
return button.previousSibling;
|
||||
button = button.nextSibling;
|
||||
} while (button)
|
||||
return buttons.lastChild;
|
||||
},
|
||||
|
||||
updateOverflowMenu: function (aMenuPopup)
|
||||
{
|
||||
var hbox = document.getElementById("bookmarks-ptf");
|
||||
for (var i = 0; i < hbox.childNodes.length; i++) {
|
||||
var button = hbox.childNodes[i];
|
||||
var menu = aMenuPopup.childNodes[i];
|
||||
if (menu.hidden == button.collapsed)
|
||||
menu.hidden = !menu.hidden;
|
||||
}
|
||||
},
|
||||
|
||||
resizeFunc: function(event)
|
||||
{
|
||||
if (!event) // timer callback case
|
||||
BookmarksToolbarRDFObserver._overflowTimerInEffect = false;
|
||||
else if (event.target != window)
|
||||
return; // only interested in chrome resizes
|
||||
|
||||
var buttons = document.getElementById("bookmarks-ptf");
|
||||
if (!buttons)
|
||||
return;
|
||||
|
||||
var chevron = document.getElementById("bookmarks-chevron");
|
||||
if (!buttons.firstChild) {
|
||||
// No bookmarks means no chevron
|
||||
chevron.collapsed = true;
|
||||
return;
|
||||
}
|
||||
|
||||
chevron.collapsed = false;
|
||||
var chevronWidth = chevron.boxObject.width;
|
||||
chevron.collapsed = true;
|
||||
|
||||
var remainingWidth = buttons.boxObject.width;
|
||||
var overflowed = false;
|
||||
|
||||
for (var i=0; i<buttons.childNodes.length; i++) {
|
||||
var button = buttons.childNodes[i];
|
||||
button.collapsed = overflowed;
|
||||
|
||||
if (i == buttons.childNodes.length - 1)
|
||||
chevronWidth = 0;
|
||||
remainingWidth -= button.boxObject.width;
|
||||
if (remainingWidth < chevronWidth) {
|
||||
overflowed = true;
|
||||
// This button doesn't fit. Show it in the menu. Hide it in the toolbar.
|
||||
if (!button.collapsed)
|
||||
button.collapsed = true;
|
||||
if (chevron.collapsed) {
|
||||
chevron.collapsed = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
// Fill in tooltips for personal toolbar (and Bookmarks menu).
|
||||
fillInBTTooltip: function (tipElement)
|
||||
{
|
||||
// Don't show a tooltip for non bookmark related elements.
|
||||
if (!/bookmark/.test(tipElement.className))
|
||||
return false;
|
||||
|
||||
var title = tipElement.label;
|
||||
var url = tipElement.statusText;
|
||||
|
||||
// Don't show a tooltip without any data.
|
||||
if (!title && !url)
|
||||
return false;
|
||||
|
||||
var tooltipElement = document.getElementById("btTitleText");
|
||||
tooltipElement.hidden = !title || (title == url);
|
||||
if (!tooltipElement.hidden)
|
||||
tooltipElement.setAttribute("value", title);
|
||||
|
||||
tooltipElement = document.getElementById("btUrlText");
|
||||
tooltipElement.hidden = !url;
|
||||
if (!tooltipElement.hidden)
|
||||
tooltipElement.setAttribute("value", url);
|
||||
|
||||
// Show the tooltip.
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
// Implement nsIRDFObserver so we can update our overflow state when items get
|
||||
// added/removed from the toolbar
|
||||
var BookmarksToolbarRDFObserver =
|
||||
{
|
||||
onAssert: function (aDataSource, aSource, aProperty, aTarget)
|
||||
{
|
||||
this.setOverflowTimeout(aSource, aProperty);
|
||||
},
|
||||
onUnassert: function (aDataSource, aSource, aProperty, aTarget)
|
||||
{
|
||||
this.setOverflowTimeout(aSource, aProperty);
|
||||
},
|
||||
onChange: function (aDataSource, aSource, aProperty, aOldTarget, aNewTarget) {},
|
||||
onMove: function (aDataSource, aOldSource, aNewSource, aProperty, aTarget) {},
|
||||
onBeginUpdateBatch: function (aDataSource) {},
|
||||
onEndUpdateBatch: function (aDataSource)
|
||||
{
|
||||
if (this._overflowTimerInEffect)
|
||||
return;
|
||||
this._overflowTimerInEffect = true;
|
||||
setTimeout(BookmarksToolbar.resizeFunc, 0, null);
|
||||
},
|
||||
_overflowTimerInEffect: false,
|
||||
setOverflowTimeout: function (aSource, aProperty)
|
||||
{
|
||||
if (this._overflowTimerInEffect)
|
||||
return;
|
||||
if (aSource.Value != "NC:PersonalToolbarFolder" || aProperty.Value == NC_NS+"LastModifiedDate")
|
||||
return;
|
||||
this._overflowTimerInEffect = true;
|
||||
setTimeout(BookmarksToolbar.resizeFunc, 0, null);
|
||||
}
|
||||
}
|
|
@ -1,120 +0,0 @@
|
|||
<?xml version="1.0"?>
|
||||
|
||||
<!-- -*- Mode: HTML; indent-tabs-mode: nil; -*- -->
|
||||
<!--
|
||||
|
||||
***** BEGIN LICENSE BLOCK *****
|
||||
Version: MPL 1.1/GPL 2.0/LGPL 2.1
|
||||
|
||||
The contents of this file are subject to the Mozilla Public License Version
|
||||
1.1 (the "License"); you may not use this file except in compliance with
|
||||
the License. You may obtain a copy of the License at
|
||||
http://www.mozilla.org/MPL/
|
||||
|
||||
Software distributed under the License is distributed on an "AS IS" basis,
|
||||
WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||
for the specific language governing rights and limitations under the
|
||||
License.
|
||||
|
||||
The Original Code is mozilla.org code.
|
||||
|
||||
The Initial Developer of the Original Code is
|
||||
Netscape Communications Corporation.
|
||||
Portions created by the Initial Developer are Copyright (C) 1998
|
||||
the Initial Developer. All Rights Reserved.
|
||||
|
||||
Contributor(s):
|
||||
Ben Goodger <ben@netscape.com> (Original Author)
|
||||
|
||||
Alternatively, the contents of this file may be used under the terms of
|
||||
either of the GNU General Public License Version 2 or later (the "GPL"),
|
||||
or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
|
||||
in which case the provisions of the GPL or the LGPL are applicable instead
|
||||
of those above. If you wish to allow use of your version of this file only
|
||||
under the terms of either the GPL or the LGPL, and not to allow others to
|
||||
use your version of this file under the terms of the MPL, indicate your
|
||||
decision by deleting the provisions above and replace them with the notice
|
||||
and other provisions required by the GPL or the LGPL. If you do not delete
|
||||
the provisions above, a recipient may use your version of this file under
|
||||
the terms of any one of the MPL, the GPL or the LGPL.
|
||||
|
||||
***** END LICENSE BLOCK ***** -->
|
||||
|
||||
<!DOCTYPE overlay [
|
||||
<!ENTITY % utilDTD SYSTEM "chrome://communicator/locale/bookmarks/bookmarksOverlay.dtd" >
|
||||
%utilDTD;
|
||||
<!ENTITY % bmDTD SYSTEM "chrome://communicator/locale/bookmarks/bookmarks.dtd">
|
||||
%bmDTD;
|
||||
]>
|
||||
|
||||
<overlay id="bookmarksOverlay"
|
||||
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
|
||||
|
||||
<stringbundleset id="stringbundleset">
|
||||
<stringbundle id="bundle_bookmarks" src="chrome://communicator/locale/bookmarks/bookmarks.properties"/>
|
||||
<stringbundle id="bundle_brand" src="chrome://branding/locale/brand.properties"/>
|
||||
</stringbundleset>
|
||||
|
||||
<commands id="commands">
|
||||
<commandset id="bookmarksItems">
|
||||
<command id="cmd_bm_open" oncommand="goDoCommand('cmd_bm_open');"/>
|
||||
<command id="cmd_bm_openinnewwindow" oncommand="goDoCommand('cmd_bm_openinnewwindow');"/>
|
||||
<command id="cmd_bm_openinnewtab" oncommand="goDoCommand('cmd_bm_openinnewtab');"/>
|
||||
<command id="cmd_bm_expandfolder" oncommand="goDoCommand('cmd_bm_expandfolder');"/>
|
||||
<command id="cmd_bm_managefolder" oncommand="goDoCommand('cmd_bm_managefolder');"/>
|
||||
<command id="cmd_bm_newfolder" oncommand="goDoCommand('cmd_bm_newfolder');"/>
|
||||
<command id="cmd_bm_newbookmark" oncommand="goDoCommand('cmd_bm_newbookmark');"/>
|
||||
<command id="cmd_bm_newseparator" oncommand="goDoCommand('cmd_bm_newseparator');"/>
|
||||
<command id="cmd_bm_find" oncommand="goDoCommand('cmd_bm_find');"/>
|
||||
<command id="cmd_bm_setnewbookmarkfolder" oncommand="goDoCommand('cmd_bm_setnewbookmarkfolder');"/>
|
||||
<command id="cmd_bm_setpersonaltoolbarfolder" oncommand="goDoCommand('cmd_bm_setpersonaltoolbarfolder');"/>
|
||||
<command id="cmd_bm_setnewsearchfolder" oncommand="goDoCommand('cmd_bm_setnewsearchfolder');"/>
|
||||
<command id="cmd_bm_properties" oncommand="goDoCommand('cmd_bm_properties');"/>
|
||||
<command id="cmd_bm_rename" oncommand="goDoCommand('cmd_bm_rename');"/>
|
||||
<command id="cmd_bm_import" oncommand="goDoCommand('cmd_bm_import');"/>
|
||||
<command id="cmd_bm_export" oncommand="goDoCommand('cmd_bm_export');"/>
|
||||
<command id="cmd_bm_movebookmark" oncommand="goDoCommand('cmd_bm_movebookmark');"/>
|
||||
<command id="cmd_bm_sortfolder" oncommand="goDoCommand('cmd_bm_sortfolder');"/>
|
||||
<command id="cmd_bm_sortfolderbyname" oncommand="goDoCommand('cmd_bm_sortfolderbyname');"/>
|
||||
|
||||
<command id="cmd_bm_cut" oncommand="goDoCommand('cmd_bm_cut');"/>
|
||||
<command id="cmd_bm_copy" oncommand="goDoCommand('cmd_bm_copy');"/>
|
||||
<command id="cmd_bm_paste" oncommand="goDoCommand('cmd_bm_paste');"/>
|
||||
<command id="cmd_bm_delete" oncommand="goDoCommand('cmd_bm_delete');"/>
|
||||
<command id="cmd_bm_selectAll" oncommand="goDoCommand('cmd_bm_selectAll');"/>
|
||||
</commandset>
|
||||
<commandset id="selectEditMenuItems"/>
|
||||
<commandset id="globalEditMenuItems"/>
|
||||
</commands>
|
||||
|
||||
<keyset id="bookmarks-tasksKeys">
|
||||
<!-- Edit Menu -->
|
||||
<key id="key_undo"/>
|
||||
<key id="key_redo"/>
|
||||
|
||||
<!-- These keybindings do not have a command specified in the overlay,
|
||||
which is good, but we need to specify it ourselves here -->
|
||||
<key id="key_cut" command="cmd_bm_cut"/>
|
||||
<key id="key_copy" command="cmd_bm_copy"/>
|
||||
<key id="key_paste" command="cmd_bm_paste"/>
|
||||
<key id="key_selectAll" command="cmd_bm_selectAll"/>
|
||||
|
||||
<!-- These keybindings do have a command specified in the overlay,
|
||||
which we need to correct in our Startup() function -->
|
||||
<key id="key_delete"/>
|
||||
<key id="key_delete2"/>
|
||||
|
||||
<key id="bm_key_find"
|
||||
key="&edit.find.keybinding;"
|
||||
command="cmd_bm_find" modifiers="accel"/>
|
||||
|
||||
<key id="bm_key_sortFolder"
|
||||
key="&edit.sortFolder.keybinding;"
|
||||
command="cmd_bm_sortfolder" modifiers="accel"/>
|
||||
|
||||
<key id="bm_key_properties"
|
||||
key="&edit.properties.keybinding;"
|
||||
command="cmd_bm_properties" modifiers="accel"/>
|
||||
</keyset>
|
||||
|
||||
</overlay>
|
|
@ -1,922 +0,0 @@
|
|||
<?xml version="1.0"?>
|
||||
|
||||
<!-- -*- Mode: HTML; indent-tabs-mode: nil; -*- -->
|
||||
<!--
|
||||
|
||||
***** BEGIN LICENSE BLOCK *****
|
||||
Version: MPL 1.1/GPL 2.0/LGPL 2.1
|
||||
|
||||
The contents of this file are subject to the Mozilla Public License Version
|
||||
1.1 (the "License"); you may not use this file except in compliance with
|
||||
the License. You may obtain a copy of the License at
|
||||
http://www.mozilla.org/MPL/
|
||||
|
||||
Software distributed under the License is distributed on an "AS IS" basis,
|
||||
WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||
for the specific language governing rights and limitations under the
|
||||
License.
|
||||
|
||||
The Original Code is mozilla.org code.
|
||||
|
||||
The Initial Developer of the Original Code is
|
||||
Netscape Communications Corporation.
|
||||
Portions created by the Initial Developer are Copyright (C) 1998
|
||||
the Initial Developer. All Rights Reserved.
|
||||
|
||||
Contributor(s):
|
||||
Ben Goodger <ben@netscape.com> (Original Author)
|
||||
Blake Ross <blakeross@telocity.com>
|
||||
Pierre Chanial <chanial@noos.fr> (v2.0)
|
||||
Dan Cannon <dc2@myrealbox.com>
|
||||
|
||||
Alternatively, the contents of this file may be used under the terms of
|
||||
either of the GNU General Public License Version 2 or later (the "GPL"),
|
||||
or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
|
||||
in which case the provisions of the GPL or the LGPL are applicable instead
|
||||
of those above. If you wish to allow use of your version of this file only
|
||||
under the terms of either the GPL or the LGPL, and not to allow others to
|
||||
use your version of this file under the terms of the MPL, indicate your
|
||||
decision by deleting the provisions above and replace them with the notice
|
||||
and other provisions required by the GPL or the LGPL. If you do not delete
|
||||
the provisions above, a recipient may use your version of this file under
|
||||
the terms of any one of the MPL, the GPL or the LGPL.
|
||||
|
||||
***** END LICENSE BLOCK ***** -->
|
||||
|
||||
<!-- bookmarksTree.xml depends on global variables defined in bookmarks.js.
|
||||
Before use, these must be initialized by calling initServices() and
|
||||
initBMService() -->
|
||||
|
||||
<!DOCTYPE bindings [
|
||||
<!ENTITY % bookmarksDTD SYSTEM "chrome://communicator/locale/bookmarks/bookmarks.dtd" >
|
||||
%bookmarksDTD;
|
||||
]>
|
||||
|
||||
<bindings id="bookmarksBindings"
|
||||
xmlns="http://www.mozilla.org/xbl"
|
||||
xmlns:xul="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
|
||||
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
||||
xmlns:xbl="http://www.mozilla.org/xbl">
|
||||
|
||||
<binding id="bookmarks-tree">
|
||||
<implementation>
|
||||
<constructor><![CDATA[
|
||||
// This function only reads in the bookmarks from disk if they have not already been read.
|
||||
initServices();
|
||||
initBMService();
|
||||
|
||||
BMSVC.readBookmarks();
|
||||
|
||||
// Add controllers and listeners.
|
||||
this.tree.controllers.appendController(this.controller);
|
||||
|
||||
// XXXvarga this observer should go away once bug 120071 is fixed.
|
||||
this.treeBuilder.addObserver(this.builderObserver);
|
||||
|
||||
this.tree.builder.addListener(this.builderListener);
|
||||
|
||||
BMSVC.transactionManager.AddListener(this.transactionListener);
|
||||
|
||||
// Load column settings from persisted attribute
|
||||
var colinfostr = this.getAttribute("colinfo");
|
||||
var colinfo = colinfostr.split(" ");
|
||||
for (var i = 0; i < colinfo.length; ++i) {
|
||||
if (colinfo[i] == "") continue;
|
||||
|
||||
var querymarker = colinfo[i].indexOf("?");
|
||||
var anonid = colinfo[i].substring(4, querymarker);
|
||||
var col = document.getAnonymousElementByAttribute(this, "id", anonid);
|
||||
|
||||
if (!anonid || !col) break;
|
||||
|
||||
var attrstring = colinfo[i].substr(querymarker + 1);
|
||||
|
||||
var attrpairs = attrstring.split("&");
|
||||
for (var j = 0; j < attrpairs.length; ++j) {
|
||||
var pair = attrpairs[j].split("=");
|
||||
col.setAttribute(pair[0], pair[1]);
|
||||
}
|
||||
}
|
||||
]]></constructor>
|
||||
<destructor><![CDATA[
|
||||
// Remove controllers and listeners.
|
||||
BMSVC.transactionManager.RemoveListener(this.transactionListener);
|
||||
|
||||
this.tree.builder.removeListener(this.builderListener);
|
||||
|
||||
this.treeBuilder.removeObserver(this.builderObserver);
|
||||
|
||||
this.tree.controllers.removeController(this.controller);
|
||||
|
||||
// Save column settings and sort info to persisted attribute
|
||||
var persistString = "";
|
||||
|
||||
var treecols = document.getAnonymousElementByAttribute(this, "anonid", "treecols");
|
||||
var child = treecols.firstChild;
|
||||
while (child) {
|
||||
if (child.localName != "splitter") {
|
||||
var formatString = " col:%1%?width=%2%&hidden=%3%&ordinal=%6%";
|
||||
formatString = formatString.replace(/%1%/, child.getAttribute("id"));
|
||||
formatString = formatString.replace(/%2%/, child.getAttribute("width"));
|
||||
formatString = formatString.replace(/%3%/, child.getAttribute("hidden"));
|
||||
formatString = formatString.replace(/%6%/, child.getAttribute("ordinal"));
|
||||
persistString += formatString;
|
||||
}
|
||||
child = child.nextSibling;
|
||||
}
|
||||
this.setAttribute("colinfo", persistString);
|
||||
|
||||
document.persist(this.id, "colinfo");
|
||||
]]></destructor>
|
||||
|
||||
<property name="db">
|
||||
<getter><![CDATA[
|
||||
return this.tree.database;
|
||||
]]></getter>
|
||||
</property>
|
||||
|
||||
<property name="columns">
|
||||
<getter>
|
||||
<![CDATA[
|
||||
var cols = [];
|
||||
|
||||
var treecols = document.getAnonymousElementByAttribute(this, "anonid", "treecols");
|
||||
var child = treecols.firstChild;
|
||||
while (child) {
|
||||
if (child.localName != "splitter") {
|
||||
var obj = {
|
||||
id: child.getAttribute("id"),
|
||||
label: child.getAttribute("label"),
|
||||
accesskey: child.getAttribute("accesskey"),
|
||||
hidden: child.getAttribute("hidden")
|
||||
}
|
||||
cols.push(obj);
|
||||
}
|
||||
child = child.nextSibling;
|
||||
}
|
||||
|
||||
return cols;
|
||||
]]>
|
||||
</getter>
|
||||
</property>
|
||||
|
||||
<method name="toggleColumnVisibility">
|
||||
<parameter name="aColumnId"/>
|
||||
<body>
|
||||
<![CDATA[
|
||||
var elt = document.getAnonymousElementByAttribute(this, "id", aColumnId);
|
||||
if (elt)
|
||||
elt.setAttribute("hidden", elt.getAttribute("hidden") != "true");
|
||||
]]>
|
||||
</body>
|
||||
</method>
|
||||
|
||||
<property name="treeBoxObject">
|
||||
<getter><![CDATA[
|
||||
return this.tree.boxObject.QueryInterface(Components.interfaces.nsITreeBoxObject);
|
||||
]]></getter>
|
||||
</property>
|
||||
|
||||
<property name="treeBuilder">
|
||||
<getter><![CDATA[
|
||||
return this.tree.builder.QueryInterface(Components.interfaces.nsIXULTreeBuilder);
|
||||
]]></getter>
|
||||
</property>
|
||||
|
||||
<property name="tree">
|
||||
<getter><![CDATA[
|
||||
return document.getAnonymousElementByAttribute(this, "anonid", "bookmarks-tree");
|
||||
]]></getter>
|
||||
</property>
|
||||
|
||||
<property name="currentIndex">
|
||||
<getter><![CDATA[
|
||||
return this.tree.view.selection.currentIndex;
|
||||
]]></getter>
|
||||
</property>
|
||||
|
||||
<property name="currentRes">
|
||||
<getter><![CDATA[
|
||||
return this.treeBuilder.getResourceAtIndex(this.currentIndex);
|
||||
]]></getter>
|
||||
</property>
|
||||
|
||||
<property name="parentRes">
|
||||
<getter><![CDATA[
|
||||
const currIndex = this.currentIndex;
|
||||
|
||||
if (currIndex == -1)
|
||||
return RDF.GetResource("NC:BookmarksRoot");
|
||||
|
||||
var parentIndex = this.treeBoxObject.view.getParentIndex(currIndex);
|
||||
if (parentIndex != -1)
|
||||
return this.treeBuilder.getResourceAtIndex(parentIndex)
|
||||
return RDF.GetResource("NC:BookmarksRoot"); // assume its parent is the root
|
||||
]]></getter>
|
||||
</property>
|
||||
|
||||
<property name="type">
|
||||
<getter><![CDATA[
|
||||
if (!this._type) {
|
||||
var type = this.getAttribute("type");
|
||||
if (!type)
|
||||
type = "multi-column";
|
||||
this._type = type;
|
||||
}
|
||||
return this._type;
|
||||
]]></getter>
|
||||
</property>
|
||||
|
||||
<method name="getRowResource">
|
||||
<parameter name="aRow"/>
|
||||
<body><![CDATA[
|
||||
if (aRow != -1)
|
||||
return this.treeBuilder.getResourceAtIndex(aRow);
|
||||
else
|
||||
return this.getRootResource();
|
||||
]]></body>
|
||||
</method>
|
||||
|
||||
<method name="getParentResource">
|
||||
<parameter name="aRow"/>
|
||||
<body><![CDATA[
|
||||
if (aRow != -1) {
|
||||
var parentIndex = this.treeBoxObject.view.getParentIndex(aRow);
|
||||
return this.getRowResource(parentIndex);
|
||||
}
|
||||
return this.getRootResource(); // assume its parent is the root
|
||||
]]></body>
|
||||
</method>
|
||||
|
||||
<method name="getRootResource">
|
||||
<body><![CDATA[
|
||||
var tree = document.getAnonymousElementByAttribute(this, "anonid", "bookmarks-tree");
|
||||
var rootURI = tree.ref;
|
||||
return RDF.GetResource(rootURI);
|
||||
]]></body>
|
||||
</method>
|
||||
|
||||
<field name="_selection">null</field>
|
||||
<field name="_target"> null</field>
|
||||
|
||||
<method name="getTreeSelection">
|
||||
<body><![CDATA[
|
||||
var selection = {};
|
||||
selection.item = [];
|
||||
selection.parent = [];
|
||||
selection.isExpanded = [];
|
||||
var rangeCount = this.treeBoxObject.view.selection.getRangeCount();
|
||||
// workaround for bug 171547: if rowCount==0, rangeCount==1
|
||||
if (this.treeBuilder.rowCount > 0)
|
||||
for (var k = 0; k < rangeCount; ++k) {
|
||||
var rangeMin = {};
|
||||
var rangeMax = {};
|
||||
this.treeBoxObject.view.selection.getRangeAt(k, rangeMin, rangeMax);
|
||||
for (var i = rangeMin.value; i <= rangeMax.value; ++i) {
|
||||
var selectedItem = this.getRowResource(i);
|
||||
var selectedParent = this.getParentResource(i);
|
||||
var isExpanded = this.treeBoxObject.view.isContainerOpen(i)
|
||||
selection.item .push(selectedItem);
|
||||
selection.parent.push(selectedParent);
|
||||
selection.isExpanded.push(isExpanded);
|
||||
}
|
||||
}
|
||||
selection.length = selection.item.length;
|
||||
BookmarksUtils.checkSelection(selection);
|
||||
return selection;
|
||||
]]></body>
|
||||
</method>
|
||||
|
||||
<method name="getTreeTarget">
|
||||
<parameter name="aItem"/>
|
||||
<parameter name="aParent"/>
|
||||
<parameter name="aOrientation"/>
|
||||
<body><![CDATA[
|
||||
|
||||
if (!aParent || aParent.Value == "NC:BookmarksTopRoot")
|
||||
return BookmarksUtils.getTargetFromFolder(RDF.GetResource("NC:BookmarksRoot"))
|
||||
|
||||
if (aOrientation == BookmarksUtils.DROP_ON)
|
||||
return BookmarksUtils.getTargetFromFolder(aItem);
|
||||
|
||||
RDFC.Init(this.db, aParent);
|
||||
var index = RDFC.IndexOf(aItem);
|
||||
if (aOrientation == BookmarksUtils.DROP_AFTER)
|
||||
++index;
|
||||
return { parent: aParent, index: index };
|
||||
]]></body>
|
||||
</method>
|
||||
|
||||
<!--
|
||||
This function saves the current selection state before the tree is
|
||||
rebuilt.
|
||||
-->
|
||||
<field name="_savedSelection">[]</field>
|
||||
<method name="saveSelection">
|
||||
<body><![CDATA[
|
||||
this._savedSelection = [];
|
||||
var selection = this.treeBoxObject.view.selection;
|
||||
if (selection) {
|
||||
var rangeCount = selection.getRangeCount();
|
||||
var min = {}; var max = {};
|
||||
for (var i = 0; i < rangeCount; ++i) {
|
||||
selection.getRangeAt(i, min, max);
|
||||
for (var j = min.value; j <= max.value; ++j) {
|
||||
var resource = this.treeBuilder.getResourceAtIndex(j);
|
||||
this._savedSelection.push(resource);
|
||||
}
|
||||
}
|
||||
}
|
||||
]]></body>
|
||||
</method>
|
||||
|
||||
<!--
|
||||
This function restores the selection appropriately after the tree has
|
||||
been rebuilt.
|
||||
-->
|
||||
<method name="restoreSelection">
|
||||
<body><![CDATA[
|
||||
var selection = this.treeBoxObject.view.selection;
|
||||
if (selection) {
|
||||
selection.selectEventsSuppressed = true;
|
||||
|
||||
selection.clearSelection();
|
||||
for (var i = 0; i < this._savedSelection.length; ++i) {
|
||||
var index = this.treeBuilder.getIndexOfResource(this._savedSelection[i]);
|
||||
if (index >= 0) {
|
||||
selection.toggleSelect(index);
|
||||
}
|
||||
}
|
||||
|
||||
selection.selectEventsSuppressed = false;
|
||||
}
|
||||
]]></body>
|
||||
</method>
|
||||
|
||||
<field name="_itemToBeToggled"> []</field>
|
||||
<field name="_parentToBeToggled">[]</field>
|
||||
<method name="preUpdateTreeSelection">
|
||||
<parameter name="aTxn"/>
|
||||
<body><![CDATA[
|
||||
aTxn = aTxn.wrappedJSObject;
|
||||
var type = aTxn.type;
|
||||
// Skip transactions that aggregates nested "insert" or "remove" transactions.
|
||||
if (type != "insert" && type != "remove")
|
||||
return;
|
||||
for (var i=0; i<aTxn.item.length; ++i) {
|
||||
this._itemToBeToggled .push(aTxn.item [i]);
|
||||
this._parentToBeToggled.push(aTxn.parent[i]);
|
||||
}
|
||||
]]></body>
|
||||
</method>
|
||||
|
||||
<method name="updateTreeSelection">
|
||||
<body><![CDATA[
|
||||
this.treeBoxObject.view.selection.selectEventsSuppressed = true;
|
||||
this.treeBoxObject.view.selection.clearSelection();
|
||||
for (var i=0; i<this._itemToBeToggled.length; ++i) {
|
||||
index = this.treeBuilder.getIndexOfResource(this._itemToBeToggled[i]);
|
||||
if (index >=0)
|
||||
this.treeBoxObject.view.selection.toggleSelect(index);
|
||||
}
|
||||
this.treeBoxObject.view.selection.selectEventsSuppressed = false;
|
||||
]]></body>
|
||||
</method>
|
||||
|
||||
<method name="createTreeContextMenu">
|
||||
<parameter name="aEvent"/>
|
||||
<body><![CDATA[
|
||||
BookmarksCommand.createContextMenu(aEvent, this._selection);
|
||||
this.onCommandUpdate();
|
||||
]]></body>
|
||||
</method>
|
||||
|
||||
<method name="openItemClick">
|
||||
<parameter name="aEvent"/>
|
||||
<parameter name="aClickCount"/>
|
||||
<body><![CDATA[
|
||||
if (aEvent.button == 2 || aEvent.originalTarget.localName != "treechildren")
|
||||
return;
|
||||
if (aClickCount != this.clickCount && aEvent.button != 1)
|
||||
return;
|
||||
|
||||
var row = {};
|
||||
var col = {};
|
||||
var obj = {};
|
||||
this.treeBoxObject.getCellAt(aEvent.clientX, aEvent.clientY, row, col, obj);
|
||||
row = row.value;
|
||||
|
||||
if (row == -1 || obj.value == "twisty")
|
||||
return;
|
||||
var modifKey = aEvent.shiftKey || aEvent.ctrlKey || aEvent.altKey ||
|
||||
aEvent.metaKey || aEvent.button == 1;
|
||||
if (this.clickCount == 2 && !modifKey &&
|
||||
this.treeBoxObject.view.isContainer(row))
|
||||
return;
|
||||
|
||||
if (this.clickCount == 2 && modifKey) {
|
||||
this.treeBoxObject.view.selection.select(row);
|
||||
this._selection = this.getTreeSelection();
|
||||
}
|
||||
var selection = this._selection;
|
||||
|
||||
if (selection.type[0] != "FolderGroup" && selection.isContainer[0]) {
|
||||
if (this.clickCount == 1 && !modifKey) {
|
||||
this.treeBoxObject.view.toggleOpenState(row);
|
||||
if (selection.protocol[0] != "file")
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
var target = BookmarksUtils.getBrowserTargetFromEvent(aEvent);
|
||||
if (target)
|
||||
BookmarksCommand.openBookmark(selection, target, this.db, aEvent);
|
||||
]]></body>
|
||||
</method>
|
||||
|
||||
<method name="openItemKey">
|
||||
<parameter name="aEvent"/>
|
||||
<body><![CDATA[
|
||||
if (this._selection.length != 1)
|
||||
return;
|
||||
if (!this._selection.isContainer[0]) {
|
||||
var target = BookmarksUtils.getBrowserTargetFromEvent(aEvent);
|
||||
if (target)
|
||||
BookmarksCommand.openBookmark(this._selection, target, this.db, aEvent)
|
||||
}
|
||||
]]></body>
|
||||
</method>
|
||||
|
||||
<method name="searchBookmarks">
|
||||
<parameter name="aInput"/>
|
||||
<body><![CDATA[
|
||||
this.treeBoxObject.view.selection.currentIndex=-1;
|
||||
if (!aInput) {
|
||||
this.tree.setAttribute("ref", this.originalRef);
|
||||
}
|
||||
else {
|
||||
if (!this.originalRef) {
|
||||
this.originalRef = this.tree.getAttribute("ref");
|
||||
}
|
||||
this.tree.setAttribute("ref",
|
||||
"find:datasource=rdf:bookmarks&match=http://home.netscape.com/NC-rdf#Name&method=contains&text=" + encodeURIComponent(aInput));
|
||||
}
|
||||
]]></body>
|
||||
</method>
|
||||
|
||||
<!-- observer -->
|
||||
<field name="DNDObserver" readonly="true"><![CDATA[
|
||||
({
|
||||
mOuter: this,
|
||||
onDragStart: function (aEvent, aXferData, aDragAction)
|
||||
{
|
||||
var selection = this.mOuter._selection;
|
||||
aXferData.data = BookmarksUtils.getXferDataFromSelection(selection);
|
||||
const kDSIID = Components.interfaces.nsIDragService;
|
||||
if (aEvent.ctrlKey)
|
||||
aDragAction.action = kDSIID.DRAGDROP_ACTION_COPY;
|
||||
}
|
||||
})
|
||||
]]></field>
|
||||
|
||||
<!-- nsIController -->
|
||||
<field name="controller" readonly="true"><![CDATA[
|
||||
({
|
||||
mOuter: this,
|
||||
|
||||
supportsCommand: BookmarksController.supportsCommand,
|
||||
|
||||
isCommandEnabled: function (aCommand)
|
||||
{
|
||||
// warning: this is not the called function in BookmarksController.onCommandUpdate
|
||||
return BookmarksController.isCommandEnabled(aCommand,
|
||||
this.mOuter._selection,
|
||||
this.mOuter._target);
|
||||
},
|
||||
|
||||
doCommand: function (aCommand)
|
||||
{
|
||||
var selection = this.mOuter._selection;
|
||||
var target = this.mOuter._target;
|
||||
switch (aCommand) {
|
||||
// Commands that insert rows
|
||||
case "cmd_bm_newfolder":
|
||||
case "cmd_bm_newbookmark":
|
||||
case "cmd_bm_newseparator":
|
||||
case "cmd_bm_import":
|
||||
case "cmd_bm_movebookmark":
|
||||
case "cmd_bm_paste":
|
||||
// XXXvarga undo/redo can insert or remove rows.
|
||||
case "cmd_undo":
|
||||
case "cmd_redo":
|
||||
// All items inserted will be selected. The implementation of
|
||||
// this model is left to |preUpdateTreeSelection|, called when
|
||||
// an insert transaction is executed, and |updateTreeSelection|
|
||||
// called here.
|
||||
BookmarksController.doCommand(aCommand, selection, target);
|
||||
this.mOuter.updateTreeSelection();
|
||||
break;
|
||||
// Commands that remove rows
|
||||
case "cmd_bm_cut":
|
||||
case "cmd_bm_delete":
|
||||
// Since rows have been removed, the row immediately after the
|
||||
// first range in the original selection now has the index of
|
||||
// the first item in the first range.
|
||||
var s = this.mOuter.treeBoxObject.view.selection;
|
||||
rangeMin = {};
|
||||
rangeMax = {};
|
||||
s.getRangeAt(0, rangeMin, rangeMax);
|
||||
BookmarksController.doCommand(aCommand, selection, target);
|
||||
// Select the next remaining row if there is one,
|
||||
// or the previous row, even "Bookmarks for <profile name>"(= 0)
|
||||
// if no other row remains.
|
||||
s.select((rangeMin.value >= this.mOuter.treeBuilder.rowCount)
|
||||
? this.mOuter.treeBuilder.rowCount - 1
|
||||
: rangeMin.value);
|
||||
break;
|
||||
case "cmd_bm_expandfolder":
|
||||
this.mOuter.treeBoxObject.view.toggleOpenState(this.mOuter.currentIndex);
|
||||
break;
|
||||
case "cmd_bm_selectAll":
|
||||
this.mOuter.treeBoxObject.view.selection.selectAll();
|
||||
break;
|
||||
default:
|
||||
BookmarksController.doCommand(aCommand, selection, target);
|
||||
}
|
||||
}
|
||||
})
|
||||
]]></field>
|
||||
|
||||
<method name="onCommandUpdate">
|
||||
<body><![CDATA[
|
||||
BookmarksController.onCommandUpdate(this._selection, this._target);
|
||||
]]></body>
|
||||
</method>
|
||||
|
||||
<method name="selectionChanged">
|
||||
<parameter name="aEvent"/>
|
||||
<body><![CDATA[
|
||||
]]></body>
|
||||
</method>
|
||||
|
||||
<!-- nsIXULTreeBuilderObserver -->
|
||||
<field name="builderObserver"><![CDATA[
|
||||
({
|
||||
mOuter: this,
|
||||
canDrop: function(index, orientation)
|
||||
{
|
||||
var dragSession = DS && DS.getCurrentSession();
|
||||
if (!dragSession)
|
||||
return false;
|
||||
var selection = BookmarksUtils.getSelectionFromXferData(dragSession);
|
||||
if (selection.containsRF)
|
||||
return false;
|
||||
if (orientation == BookmarksUtils.DROP_ON)
|
||||
return true;
|
||||
|
||||
if (index != 0)
|
||||
return true;
|
||||
if (this.mOuter.getRowResource(index).Value != "NC:BookmarksRoot")
|
||||
return true;
|
||||
return orientation == BookmarksUtils.DROP_BEFORE ? false : this.mOuter.treeBoxObject.view.isContainerOpen(0)
|
||||
},
|
||||
onDrop: function(row, orientation)
|
||||
{
|
||||
var dragSession = DS && DS.getCurrentSession();
|
||||
if (!dragSession)
|
||||
return;
|
||||
var selection = BookmarksUtils.getSelectionFromXferData(dragSession);
|
||||
var rItem = this.mOuter.getRowResource(row);
|
||||
var rParent = this.mOuter.getParentResource(row);
|
||||
var target;
|
||||
if (orientation == BookmarksUtils.DROP_AFTER &&
|
||||
this.mOuter.treeBoxObject.view.isContainer(row) &&
|
||||
this.mOuter.treeBoxObject.view.isContainerOpen(row) &&
|
||||
!this.mOuter.treeBoxObject.view.isContainerEmpty(row))
|
||||
target = { parent: rItem, index: 1 };
|
||||
else {
|
||||
target = this.mOuter.getTreeTarget(rItem, rParent, orientation);
|
||||
}
|
||||
const kDSIID = Components.interfaces.nsIDragService;
|
||||
const kCopyAction = kDSIID.DRAGDROP_ACTION_COPY + kDSIID.DRAGDROP_ACTION_LINK;
|
||||
if (dragSession.dragAction & kCopyAction)
|
||||
BookmarksUtils.insertSelection("drag", selection, target);
|
||||
else
|
||||
BookmarksUtils.moveSelection ("drag", selection, target);
|
||||
},
|
||||
|
||||
onToggleOpenState: function (aRow)
|
||||
{
|
||||
// update the open attribute of the selection
|
||||
var resource = this.mOuter.getRowResource(aRow);
|
||||
var selection = this.mOuter._selection;
|
||||
for (var i=0; i<selection.length; ++i) {
|
||||
if (selection.item[i] == resource) {
|
||||
selection.isExpanded[i] = !selection.isExpanded[i];
|
||||
break;
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
onCycleHeader: function (aColumnID, aHeaderElement) {},
|
||||
|
||||
onSelectionChanged: function ()
|
||||
{
|
||||
var selection = this.mOuter.getTreeSelection();
|
||||
this.mOuter._selection = selection;
|
||||
var selectionLength = selection.length;
|
||||
if (!selectionLength)
|
||||
this.mOuter._target = null;
|
||||
else {
|
||||
// Paste or create items into an expanded folder, otherwise after the selected item.
|
||||
var orient = selection.isExpanded[0] ? BookmarksUtils.DROP_ON : BookmarksUtils.DROP_AFTER;
|
||||
this.mOuter._target = this.mOuter.getTreeTarget(selection.item[0], selection.parent[0], orient);
|
||||
}
|
||||
this.mOuter.onCommandUpdate();
|
||||
const kStatusBar = document.getAnonymousElementByAttribute(this.mOuter, "anonid", "statusbar-text");
|
||||
var displayValue;
|
||||
if (kStatusBar && selectionLength == 1) {
|
||||
var protocol = selection.protocol[0];
|
||||
if (selection.isContainer[0] && protocol != "find" && protocol != "file") {
|
||||
RDFC.Init(this.mOuter.db, selection.item[0]);
|
||||
var count = RDFC.GetCount();
|
||||
displayValue = BookmarksUtils.getLocaleString("status_foldercount", String(count));
|
||||
}
|
||||
else if (selection.type[0] == "Bookmark")
|
||||
displayValue = BookmarksUtils.getProperty(selection.item[0], NC_NS+"URL", this.mOuter.db)
|
||||
else
|
||||
displayValue = "";
|
||||
kStatusBar.label = displayValue;
|
||||
}
|
||||
},
|
||||
|
||||
onCycleCell : function (aItemIndex, aColumnID) {},
|
||||
onPerformAction : function (aAction) {},
|
||||
onPerformActionOnRow : function (aAction, aItemIndex) {},
|
||||
onPerformActionOnCell: function (aAction, aItemIndex, aColumnID) {}
|
||||
|
||||
})
|
||||
]]></field>
|
||||
|
||||
<!-- nsIXULBuilderListener -->
|
||||
<field name="builderListener"><![CDATA[
|
||||
({
|
||||
mOuter: this,
|
||||
|
||||
willRebuild: function(aBuilder) {
|
||||
this.mOuter.saveSelection();
|
||||
},
|
||||
|
||||
didRebuild: function(aBuilder) {
|
||||
this.mOuter.restoreSelection();
|
||||
}
|
||||
})
|
||||
]]></field>
|
||||
|
||||
<!-- nsITransactionManager listener -->
|
||||
<field name="transactionListener"><![CDATA[
|
||||
({
|
||||
|
||||
mOuter: this,
|
||||
|
||||
willDo: function (aTxmgr, aTxn) {
|
||||
this.mOuter._itemToBeToggled = [];
|
||||
this.mOuter._parentToBeToggled = [];
|
||||
},
|
||||
|
||||
didDo: function (aTxmgr, aTxn) {
|
||||
this.mOuter.preUpdateTreeSelection(aTxn);
|
||||
},
|
||||
|
||||
willUndo: function (aTxmgr, aTxn) {
|
||||
this.mOuter._itemToBeToggled = [];
|
||||
this.mOuter._parentToBeToggled = [];
|
||||
},
|
||||
|
||||
didUndo: function (aTxmgr, aTxn) {
|
||||
this.mOuter.preUpdateTreeSelection(aTxn);
|
||||
},
|
||||
|
||||
willRedo: function (aTxmgr, aTxn) {
|
||||
this.mOuter._itemToBeToggled = [];
|
||||
this.mOuter._parentToBeToggled = [];
|
||||
},
|
||||
|
||||
didRedo: function (aTxmgr, aTxn) {
|
||||
this.mOuter.preUpdateTreeSelection(aTxn);
|
||||
},
|
||||
|
||||
didMerge : function (aTxmgr, aTxn) {},
|
||||
didBeginBatch : function (aTxmgr, aTxn) {},
|
||||
didEndBatch : function (aTxmgr, aTxn) {},
|
||||
willMerge : function (aTxmgr, aTxn) {},
|
||||
willBeginBatch : function (aTxmgr, aTxn) {},
|
||||
willEndBatch : function (aTxmgr, aTxn) {}
|
||||
})
|
||||
]]></field>
|
||||
</implementation>
|
||||
</binding>
|
||||
|
||||
<!-- Full Bookmarks Tree, multi-columned -->
|
||||
<!-- Localize column labels! -->
|
||||
<binding id="bookmarks-tree-full" extends="chrome://communicator/content/bookmarks/bookmarksTree.xml#bookmarks-tree">
|
||||
<xbl:content xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul" xmlns:xbl="http://www.mozilla.org/xbl"
|
||||
contextmenu="_child">
|
||||
<!-- XXXben need focus event handler for cmd update -->
|
||||
<!-- context menu -->
|
||||
<menupopup onpopupshowing="this.parentNode.createTreeContextMenu(event);"
|
||||
onpopuphidden="if (content) content.focus()"
|
||||
onclick="event.stopPropagation();"
|
||||
onkeypress="event.stopPropagation();"/>
|
||||
<vbox flex="1">
|
||||
<tree anonid="bookmarks-tree" flex="1" class="plain" enableColumnDrag="true"
|
||||
datasources="rdf:bookmarks rdf:internetsearch rdf:localsearch" ref="NC:BookmarksTopRoot" flags="dont-build-content"
|
||||
onkeypress="if (event.keyCode == 13) this.parentNode.parentNode.openItemKey(event);"
|
||||
onclick="this.parentNode.parentNode.openItemClick(event, 1);"
|
||||
ondblclick="this.parentNode.parentNode.openItemClick(event, 2);"
|
||||
ondraggesture="if (event.originalTarget.localName == 'treechildren') nsDragAndDrop.startDrag(event, this.parentNode.parentNode.DNDObserver);"
|
||||
onselect="this.treeBoxObject.view.selectionChanged();">
|
||||
<template xmlns:nc="http://home.netscape.com/NC-rdf#">
|
||||
<rule rdf:type="http://home.netscape.com/NC-rdf#BookmarkSeparator">
|
||||
<treechildren>
|
||||
<treeitem uri="rdf:*">
|
||||
<treerow properties="rdf:http://www.w3.org/1999/02/22-rdf-syntax-ns#type separator">
|
||||
<treecell properties="separator" label="rdf:http://home.netscape.com/NC-rdf#Name"/>
|
||||
</treerow>
|
||||
</treeitem>
|
||||
</treechildren>
|
||||
</rule>
|
||||
<rule nc:FolderGroup="true">
|
||||
<treechildren>
|
||||
<treeitem uri="rdf:*">
|
||||
<treerow properties="rdf:http://www.w3.org/1999/02/22-rdf-syntax-ns#type rdf:http://home.netscape.com/NC-rdf#loading rdf:http://home.netscape.com/WEB-rdf#status">
|
||||
<treecell properties="group" label="rdf:http://home.netscape.com/NC-rdf#Name" />
|
||||
<treecell label="rdf:http://home.netscape.com/NC-rdf#URL" />
|
||||
<treecell label="rdf:http://home.netscape.com/NC-rdf#ShortcutURL" />
|
||||
<treecell label="rdf:http://home.netscape.com/NC-rdf#Description" />
|
||||
<treecell label="rdf:http://home.netscape.com/NC-rdf#BookmarkAddDate" />
|
||||
<treecell label="rdf:http://home.netscape.com/WEB-rdf#LastModifiedDate" />
|
||||
<treecell label="rdf:http://home.netscape.com/WEB-rdf#LastVisitDate"/>
|
||||
</treerow>
|
||||
</treeitem>
|
||||
</treechildren>
|
||||
</rule>
|
||||
<rule>
|
||||
<treechildren>
|
||||
<treeitem uri="rdf:*">
|
||||
<treerow properties="rdf:http://www.w3.org/1999/02/22-rdf-syntax-ns#type rdf:http://home.netscape.com/NC-rdf#loading rdf:http://home.netscape.com/WEB-rdf#status">
|
||||
<treecell src="rdf:http://home.netscape.com/NC-rdf#Icon"
|
||||
properties="rdf:http://home.netscape.com/WEB-rdf#status"
|
||||
label="rdf:http://home.netscape.com/NC-rdf#Name"/>
|
||||
<treecell label="rdf:http://home.netscape.com/NC-rdf#URL" />
|
||||
<treecell label="rdf:http://home.netscape.com/NC-rdf#ShortcutURL" />
|
||||
<treecell label="rdf:http://home.netscape.com/NC-rdf#Description" />
|
||||
<treecell label="rdf:http://home.netscape.com/NC-rdf#BookmarkAddDate" />
|
||||
<treecell label="rdf:http://home.netscape.com/WEB-rdf#LastModifiedDate" />
|
||||
<treecell label="rdf:http://home.netscape.com/WEB-rdf#LastVisitDate"/>
|
||||
</treerow>
|
||||
</treeitem>
|
||||
</treechildren>
|
||||
</rule>
|
||||
</template>
|
||||
<treecols anonid="treecols">
|
||||
<treecol id="Name" flex="1" primary="true"
|
||||
label="&treecol.name.label;"
|
||||
tooltiptext="&treecol.name.tooltip;"
|
||||
sort="rdf:http://home.netscape.com/NC-rdf#Name"
|
||||
sortActive="true"
|
||||
persist="width hidden ordinal"/>
|
||||
<splitter class="tree-splitter" />
|
||||
<treecol id="URL" flex="1"
|
||||
label="&treecol.url.label;"
|
||||
tooltiptext="&treecol.url.tooltip;"
|
||||
sort="rdf:http://home.netscape.com/NC-rdf#URL"
|
||||
persist="width hidden ordinal"/>
|
||||
<splitter class="tree-splitter" />
|
||||
<treecol id="ShortcutURL" flex="1" hidden="true"
|
||||
label="&treecol.shortcut.label;"
|
||||
tooltiptext="&treecol.shortcut.tooltip;"
|
||||
sort="rdf:http://home.netscape.com/NC-rdf#ShortcutURL"
|
||||
persist="hidden width ordinal"/>
|
||||
<splitter class="tree-splitter"/>
|
||||
<treecol id="Description" flex="1"
|
||||
label="&treecol.description.label;"
|
||||
tooltiptext="&treecol.description.tooltip;"
|
||||
sort="rdf:http://home.netscape.com/NC-rdf#Description"
|
||||
persist="hidden width ordinal"/>
|
||||
<splitter class="tree-splitter"/>
|
||||
<treecol id="BookmarkAddDate" flex="1" hidden="true"
|
||||
label="&treecol.addedon.label;"
|
||||
tooltiptext="&treecol.addedon.tooltip;"
|
||||
sort="rdf:http://home.netscape.com/NC-rdf#BookmarkAddDate"
|
||||
persist="width hidden ordinal"/>
|
||||
<splitter class="tree-splitter" />
|
||||
<treecol id="LastModifiedDate" flex="1" hidden="true"
|
||||
label="&treecol.lastmod.label;"
|
||||
tooltiptext="&treecol.lastmod.tooltip;"
|
||||
sort="rdf:http://home.netscape.com/WEB-rdf#LastModifiedDate"
|
||||
persist="width hidden ordinal"/>
|
||||
<splitter class="tree-splitter" />
|
||||
<treecol id="LastVisitDate" flex="1" hidden="true"
|
||||
label="&treecol.lastvisit.label;"
|
||||
tooltiptext="&treecol.lastvisit.tooltip;"
|
||||
sort="rdf:http://home.netscape.com/WEB-rdf#LastVisitDate"
|
||||
persist="width hidden ordinal"/>
|
||||
</treecols>
|
||||
</tree>
|
||||
<statusbar class="chromeclass-status" xbl:inherits="hidden=hidestatusbar" hidden="false">
|
||||
<statusbarpanel anonid="statusbar-text" flex="1"/>
|
||||
</statusbar>
|
||||
</vbox>
|
||||
</xbl:content>
|
||||
<implementation>
|
||||
<field name="clickCount">2</field>
|
||||
</implementation>
|
||||
</binding>
|
||||
|
||||
<!-- Single column tree -->
|
||||
<binding id="bookmarks-tree-name" extends="chrome://communicator/content/bookmarks/bookmarksTree.xml#bookmarks-tree">
|
||||
<xbl:content xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
|
||||
xmlns:xbl="http://www.mozilla.org/xbl" contextmenu="_child">
|
||||
<!-- context menu -->
|
||||
<menupopup xbl:inherits="onpopupshowing"
|
||||
onpopupshowing="this.parentNode.createTreeContextMenu(event);"
|
||||
onpopuphidden="if (content) content.focus()"
|
||||
onclick="event.stopPropagation();"
|
||||
onkeypress="event.stopPropagation();"/>
|
||||
<tree anonid="bookmarks-tree" flex="1" class="plain" hidecolumnpicker="true"
|
||||
datasources="rdf:bookmarks rdf:internetsearch rdf:localsearch" ref="NC:BookmarksRoot" flags="dont-build-content"
|
||||
onselect="this.parentNode.treeBoxObject.view.selectionChanged();" seltype="single">
|
||||
<template xmlns:nc="http://home.netscape.com/NC-rdf#">
|
||||
<rule rdf:type="http://home.netscape.com/NC-rdf#BookmarkSeparator">
|
||||
<treechildren>
|
||||
<treeitem uri="rdf:*">
|
||||
<treerow properties="rdf:http://www.w3.org/1999/02/22-rdf-syntax-ns#type separator">
|
||||
<treecell properties="separator" label="rdf:http://home.netscape.com/NC-rdf#Name"/>
|
||||
</treerow>
|
||||
</treeitem>
|
||||
</treechildren>
|
||||
</rule>
|
||||
<rule nc:FolderGroup="true">
|
||||
<treechildren>
|
||||
<treeitem uri="rdf:*">
|
||||
<treerow properties="rdf:http://www.w3.org/1999/02/22-rdf-syntax-ns#type rdf:http://home.netscape.com/NC-rdf#loading rdf:http://home.netscape.com/WEB-rdf#status">
|
||||
<treecell properties="group hidetwisty" label="rdf:http://home.netscape.com/NC-rdf#Name" />
|
||||
</treerow>
|
||||
</treeitem>
|
||||
</treechildren>
|
||||
</rule>
|
||||
<rule>
|
||||
<treechildren>
|
||||
<treeitem uri="rdf:*">
|
||||
<treerow properties="rdf:http://www.w3.org/1999/02/22-rdf-syntax-ns#type rdf:http://home.netscape.com/NC-rdf#loading rdf:http://home.netscape.com/WEB-rdf#status">
|
||||
<treecell src="rdf:http://home.netscape.com/NC-rdf#Icon"
|
||||
properties="rdf:http://home.netscape.com/WEB-rdf#status"
|
||||
label="rdf:http://home.netscape.com/NC-rdf#Name"/>
|
||||
</treerow>
|
||||
</treeitem>
|
||||
</treechildren>
|
||||
</rule>
|
||||
</template>
|
||||
<treecols anonid="treecols">
|
||||
<treecol id="Name" flex="1" primary="true" hideheader="true"
|
||||
sort="rdf:http://home.netscape.com/NC-rdf#Name"
|
||||
sortActive="true" sortLocked="true"/>
|
||||
</treecols>
|
||||
</tree>
|
||||
</xbl:content>
|
||||
<implementation>
|
||||
<field name="clickCount">1</field>
|
||||
</implementation>
|
||||
</binding>
|
||||
|
||||
<!-- Tree with folders only -->
|
||||
<binding id="bookmarks-tree-folders" extends="chrome://communicator/content/bookmarks/bookmarksTree.xml#bookmarks-tree">
|
||||
<xbl:content xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul" xmlns:xbl="http://www.mozilla.org/xbl">
|
||||
<tree anonid="bookmarks-tree" flex="1" hidecolumnpicker="true"
|
||||
xbl:inherits="rows,seltype"
|
||||
datasources="rdf:bookmarks rdf:internetsearch rdf:localsearch" ref="NC:BookmarksTopRoot" flags="dont-build-content"
|
||||
onselect="this.parentNode.treeBoxObject.view.selectionChanged();">
|
||||
<template>
|
||||
<rule iscontainer="true">
|
||||
<treechildren>
|
||||
<treeitem uri="rdf:*">
|
||||
<treerow properties="rdf:http://www.w3.org/1999/02/22-rdf-syntax-ns#type rdf:http://home.netscape.com/NC-rdf#loading rdf:http://home.netscape.com/WEB-rdf#status">
|
||||
<treecell label="rdf:http://home.netscape.com/NC-rdf#Name" />
|
||||
</treerow>
|
||||
</treeitem>
|
||||
</treechildren>
|
||||
</rule>
|
||||
</template>
|
||||
<treecols anonid="treecols">
|
||||
<treecol id="Name" flex="1" primary="true" hideheader="true"
|
||||
sort="rdf:http://home.netscape.com/NC-rdf#Name"
|
||||
sortActive="true" sortLocked="true"/>
|
||||
</treecols>
|
||||
</tree>
|
||||
</xbl:content>
|
||||
<implementation>
|
||||
<field name="clickCount">2</field>
|
||||
</implementation>
|
||||
</binding>
|
||||
</bindings>
|
|
@ -1,90 +0,0 @@
|
|||
/* -*- Mode: Java; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
|
||||
/* ***** BEGIN LICENSE BLOCK *****
|
||||
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
|
||||
*
|
||||
* The contents of this file are subject to the Mozilla Public License Version
|
||||
* 1.1 (the "License"); you may not use this file except in compliance with
|
||||
* the License. You may obtain a copy of the License at
|
||||
* http://www.mozilla.org/MPL/
|
||||
*
|
||||
* Software distributed under the License is distributed on an "AS IS" basis,
|
||||
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||
* for the specific language governing rights and limitations under the
|
||||
* License.
|
||||
*
|
||||
* The Original Code is mozilla.org code.
|
||||
*
|
||||
* The Initial Developer of the Original Code is
|
||||
* Netscape Communications Corporation.
|
||||
* Portions created by the Initial Developer are Copyright (C) 1998
|
||||
* the Initial Developer. All Rights Reserved.
|
||||
*
|
||||
* Contributor(s):
|
||||
* Ben Goodger <ben@netscape.com> (Original Author)
|
||||
*
|
||||
* Alternatively, the contents of this file may be used under the terms of
|
||||
* either of the GNU General Public License Version 2 or later (the "GPL"),
|
||||
* or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
|
||||
* in which case the provisions of the GPL or the LGPL are applicable instead
|
||||
* of those above. If you wish to allow use of your version of this file only
|
||||
* under the terms of either the GPL or the LGPL, and not to allow others to
|
||||
* use your version of this file under the terms of the MPL, indicate your
|
||||
* decision by deleting the provisions above and replace them with the notice
|
||||
* and other provisions required by the GPL or the LGPL. If you do not delete
|
||||
* the provisions above, a recipient may use your version of this file under
|
||||
* the terms of any one of the MPL, the GPL or the LGPL.
|
||||
*
|
||||
* ***** END LICENSE BLOCK ***** */
|
||||
|
||||
var gOKButton;
|
||||
var gSearchField;
|
||||
function Startup()
|
||||
{
|
||||
initServices();
|
||||
initBMService();
|
||||
gOKButton = document.documentElement.getButton("accept");
|
||||
gOKButton.disabled = true;
|
||||
gSearchField = document.getElementById("searchField");
|
||||
gSearchField.focus();
|
||||
}
|
||||
var gCreatingNewWindow = false;
|
||||
function find()
|
||||
{
|
||||
// Build up a find URI from the search fields and open a new window
|
||||
// rooted on the URI.
|
||||
var match = document.getElementById("matchList");
|
||||
var method = document.getElementById("methodList");
|
||||
var searchURI = "find:datasource=rdf:bookmarks"
|
||||
searchURI += "&match=" + match.selectedItem.value;
|
||||
searchURI += "&method=" + method.selectedItem.value;
|
||||
searchURI += "&text=" + encodeURIComponent(gSearchField.value);
|
||||
var bmWindow = findMostRecentWindow("bookmarks:searchresults", "chrome://communicator/content/bookmarks/bookmarksManager.xul", searchURI);
|
||||
|
||||
// Update the root of the tree if we're using an existing search window.
|
||||
if (!gCreatingNewWindow)
|
||||
bmWindow.document.getElementById("bookmarks-view").tree.setAttribute("ref", searchURI);
|
||||
|
||||
bmWindow.focus();
|
||||
|
||||
if (document.getElementById("saveQuery").checked == true)
|
||||
{
|
||||
var bundle = document.getElementById("bookmarksBundle");
|
||||
var findTitle = BookmarksUtils.getLocaleString("ShortFindTitle", [gSearchField.value]);
|
||||
BMSVC.addBookmarkImmediately(searchURI, findTitle, BMSVC.BOOKMARK_FIND_TYPE, null);
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
function findMostRecentWindow(aType, aURI, aParam)
|
||||
{
|
||||
var topWindow = WINDOWSVC && WINDOWSVC.getMostRecentWindow(aType);
|
||||
if (!topWindow) gCreatingNewWindow = true;
|
||||
return topWindow || openDialog("chrome://communicator/content/bookmarks/bookmarksManager.xul",
|
||||
"", "chrome,all,dialog=no", aParam);
|
||||
}
|
||||
|
||||
function doEnabling()
|
||||
{
|
||||
gOKButton.disabled = !gSearchField.value;
|
||||
}
|
|
@ -1,86 +0,0 @@
|
|||
<?xml version="1.0"?>
|
||||
|
||||
<!-- -*- Mode: HTML; indent-tabs-mode: nil; -*- -->
|
||||
<!--
|
||||
|
||||
***** BEGIN LICENSE BLOCK *****
|
||||
Version: MPL 1.1/GPL 2.0/LGPL 2.1
|
||||
|
||||
The contents of this file are subject to the Mozilla Public License Version
|
||||
1.1 (the "License"); you may not use this file except in compliance with
|
||||
the License. You may obtain a copy of the License at
|
||||
http://www.mozilla.org/MPL/
|
||||
|
||||
Software distributed under the License is distributed on an "AS IS" basis,
|
||||
WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||
for the specific language governing rights and limitations under the
|
||||
License.
|
||||
|
||||
The Original Code is mozilla.org code.
|
||||
|
||||
The Initial Developer of the Original Code is
|
||||
Netscape Communications Corporation.
|
||||
Portions created by the Initial Developer are Copyright (C) 1998
|
||||
the Initial Developer. All Rights Reserved.
|
||||
|
||||
Contributor(s):
|
||||
Ben Goodger <ben@netscape.com> (Original Author)
|
||||
|
||||
Alternatively, the contents of this file may be used under the terms of
|
||||
either of the GNU General Public License Version 2 or later (the "GPL"),
|
||||
or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
|
||||
in which case the provisions of the GPL or the LGPL are applicable instead
|
||||
of those above. If you wish to allow use of your version of this file only
|
||||
under the terms of either the GPL or the LGPL, and not to allow others to
|
||||
use your version of this file under the terms of the MPL, indicate your
|
||||
decision by deleting the provisions above and replace them with the notice
|
||||
and other provisions required by the GPL or the LGPL. If you do not delete
|
||||
the provisions above, a recipient may use your version of this file under
|
||||
the terms of any one of the MPL, the GPL or the LGPL.
|
||||
|
||||
***** END LICENSE BLOCK ***** -->
|
||||
|
||||
<!--
|
||||
"Find Bookmarks" window
|
||||
-->
|
||||
|
||||
<?xml-stylesheet href="chrome://communicator/skin/"?>
|
||||
<!DOCTYPE dialog SYSTEM "chrome://communicator/locale/bookmarks/findBookmark.dtd">
|
||||
|
||||
<dialog id="findBookmarkWindow" style="width: 36em;"
|
||||
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
|
||||
title="&findBookmark.title;"
|
||||
onload="Startup();"
|
||||
ondialogaccept="return find();"
|
||||
buttonlabelaccept="&findButton.label;">
|
||||
|
||||
<stringbundle id="bookmarksBundle" src="chrome://communicator/locale/bookmarks/bookmarks.properties"/>
|
||||
|
||||
<script type="application/x-javascript" src="chrome://communicator/content/bookmarks/bookmarks.js"/>
|
||||
<script type="application/x-javascript" src="chrome://communicator/content/bookmarks/findBookmark.js"/>
|
||||
|
||||
<label value="&search.for.label;"/>
|
||||
<hbox align="center">
|
||||
<menulist id="matchList" class="menulist-toolbar">
|
||||
<menupopup>
|
||||
<menuitem value="http://home.netscape.com/NC-rdf#Name" label="&search.name.label;"/>
|
||||
<menuitem value="http://home.netscape.com/NC-rdf#URL" label="&search.url.label;"/>
|
||||
<menuitem value="http://home.netscape.com/NC-rdf#Description" label="&search.description.label;"/>
|
||||
<menuitem value="http://home.netscape.com/NC-rdf#ShortcutURL" label="&search.shortcut.label;"/>
|
||||
</menupopup>
|
||||
</menulist>
|
||||
<menulist id="methodList" class="menulist-toolbar">
|
||||
<menupopup>
|
||||
<menuitem value="contains" label="&search.contains.label;"/>
|
||||
<menuitem value="startswith" label="&search.startswith.label;"/>
|
||||
<menuitem value="endswith" label="&search.endswith.label;"/>
|
||||
<menuitem value="is" label="&search.is.label;"/>
|
||||
<menuitem value="isnot" label="&search.isnot.label;"/>
|
||||
<menuitem value="doesntcontain" label="&search.doesntcontain.label;"/>
|
||||
</menupopup>
|
||||
</menulist>
|
||||
<textbox id="searchField" flex="1" oninput="doEnabling();"/>
|
||||
</hbox>
|
||||
<checkbox id="saveQuery" label="&save.query.label;" />
|
||||
</dialog>
|
||||
|
|
@ -1,63 +0,0 @@
|
|||
# ***** BEGIN LICENSE BLOCK *****
|
||||
# Version: MPL 1.1/GPL 2.0/LGPL 2.1
|
||||
#
|
||||
# The contents of this file are subject to the Mozilla Public License Version
|
||||
# 1.1 (the "License"); you may not use this file except in compliance with
|
||||
# the License. You may obtain a copy of the License at
|
||||
# http://www.mozilla.org/MPL/
|
||||
#
|
||||
# Software distributed under the License is distributed on an "AS IS" basis,
|
||||
# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||
# for the specific language governing rights and limitations under the
|
||||
# License.
|
||||
#
|
||||
# The Original Code is mozilla.org code.
|
||||
#
|
||||
# The Initial Developer of the Original Code is
|
||||
# Netscape Communications Corporation.
|
||||
# Portions created by the Initial Developer are Copyright (C) 1998
|
||||
# the Initial Developer. All Rights Reserved.
|
||||
#
|
||||
# Contributor(s):
|
||||
#
|
||||
# Alternatively, the contents of this file may be used under the terms of
|
||||
# either of the GNU General Public License Version 2 or later (the "GPL"),
|
||||
# or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
|
||||
# in which case the provisions of the GPL or the LGPL are applicable instead
|
||||
# of those above. If you wish to allow use of your version of this file only
|
||||
# under the terms of either the GPL or the LGPL, and not to allow others to
|
||||
# use your version of this file under the terms of the MPL, indicate your
|
||||
# decision by deleting the provisions above and replace them with the notice
|
||||
# and other provisions required by the GPL or the LGPL. If you do not delete
|
||||
# the provisions above, a recipient may use your version of this file under
|
||||
# the terms of any one of the MPL, the GPL or the LGPL.
|
||||
#
|
||||
# ***** END LICENSE BLOCK *****
|
||||
|
||||
comm.jar:
|
||||
content/communicator/bookmarks/bookmarks.js
|
||||
content/communicator/bookmarks/bookmarks.css
|
||||
content/communicator/bookmarks/bookmarksMenu.js
|
||||
content/communicator/bookmarks/bookmarksTree.xml
|
||||
content/communicator/bookmarks/addBookmark.xul
|
||||
content/communicator/bookmarks/addBookmark.js
|
||||
content/communicator/bookmarks/bm-props.js
|
||||
content/communicator/bookmarks/bm-props.xul
|
||||
content/communicator/bookmarks/bookmarksManager.xul
|
||||
content/communicator/bookmarks/bookmarksManager.js
|
||||
content/communicator/bookmarks/bookmarksOverlay.xul
|
||||
content/communicator/bookmarks/bm-panel.xul
|
||||
content/communicator/bookmarks/bm-panel.js
|
||||
content/communicator/bookmarks/findBookmark.xul
|
||||
content/communicator/bookmarks/findBookmark.js
|
||||
content/communicator/bookmarks/sortFolder.xul
|
||||
content/communicator/bookmarks/sortFolder.js
|
||||
|
||||
en-US.jar:
|
||||
locale/en-US/communicator/bookmarks/addBookmark.dtd (locale/en-US/addBookmark.dtd)
|
||||
locale/en-US/communicator/bookmarks/bm-props.dtd (locale/en-US/bm-props.dtd)
|
||||
locale/en-US/communicator/bookmarks/bookmarks.dtd (locale/en-US/bookmarks.dtd)
|
||||
locale/en-US/communicator/bookmarks/bookmarks.properties (locale/en-US/bookmarks.properties)
|
||||
locale/en-US/communicator/bookmarks/bookmarksOverlay.dtd (locale/en-US/bookmarksOverlay.dtd)
|
||||
locale/en-US/communicator/bookmarks/findBookmark.dtd (locale/en-US/findBookmark.dtd)
|
||||
locale/en-US/communicator/bookmarks/sortFolder.dtd (locale/en-US/sortFolder.dtd)
|
|
@ -1,51 +0,0 @@
|
|||
<!-- ***** BEGIN LICENSE BLOCK *****
|
||||
- Version: MPL 1.1/GPL 2.0/LGPL 2.1
|
||||
-
|
||||
- The contents of this file are subject to the Mozilla Public License Version
|
||||
- 1.1 (the "License"); you may not use this file except in compliance with
|
||||
- the License. You may obtain a copy of the License at
|
||||
- http://www.mozilla.org/MPL/
|
||||
-
|
||||
- Software distributed under the License is distributed on an "AS IS" basis,
|
||||
- WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||
- for the specific language governing rights and limitations under the
|
||||
- License.
|
||||
-
|
||||
- The Original Code is Mozilla Communicator.
|
||||
-
|
||||
- The Initial Developer of the Original Code is
|
||||
- Netscape Communications Corp.
|
||||
- Portions created by the Initial Developer are Copyright (C) 1999
|
||||
- the Initial Developer. All Rights Reserved.
|
||||
-
|
||||
- Contributor(s):
|
||||
- Ben Goodger <ben@netscape.com> (Original Author)
|
||||
-
|
||||
- Alternatively, the contents of this file may be used under the terms of
|
||||
- either of the GNU General Public License Version 2 or later (the "GPL"),
|
||||
- or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
|
||||
- in which case the provisions of the GPL or the LGPL are applicable instead
|
||||
- of those above. If you wish to allow use of your version of this file only
|
||||
- under the terms of either the GPL or the LGPL, and not to allow others to
|
||||
- use your version of this file under the terms of the MPL, indicate your
|
||||
- decision by deleting the provisions above and replace them with the notice
|
||||
- and other provisions required by the GPL or the LGPL. If you do not delete
|
||||
- the provisions above, a recipient may use your version of this file under
|
||||
- the terms of any one of the MPL, the GPL or the LGPL.
|
||||
-
|
||||
- ***** END LICENSE BLOCK ***** -->
|
||||
|
||||
<!ENTITY newBookmark.title "File Bookmark">
|
||||
<!ENTITY selectFolder.title "Choose Folder">
|
||||
<!ENTITY name.label "Name:">
|
||||
<!ENTITY name.accesskey "N">
|
||||
<!ENTITY url.label "Location:">
|
||||
<!ENTITY url.accesskey "L">
|
||||
<!ENTITY shortcutURL.label "Keyword:">
|
||||
<!ENTITY shortcutURL.accesskey "K">
|
||||
<!ENTITY destination.label "Destination:">
|
||||
<!ENTITY destination.accesskey "D">
|
||||
<!ENTITY newFolder.label "New Folder...">
|
||||
<!ENTITY newFolder.accesskey "w">
|
||||
<!ENTITY addGroup.label "Bookmark this group of tabs">
|
||||
<!ENTITY addGroup.accesskey "B">
|
|
@ -1,108 +0,0 @@
|
|||
<!-- ***** BEGIN LICENSE BLOCK *****
|
||||
- Version: MPL 1.1/GPL 2.0/LGPL 2.1
|
||||
-
|
||||
- The contents of this file are subject to the Mozilla Public License Version
|
||||
- 1.1 (the "License"); you may not use this file except in compliance with
|
||||
- the License. You may obtain a copy of the License at
|
||||
- http://www.mozilla.org/MPL/
|
||||
-
|
||||
- Software distributed under the License is distributed on an "AS IS" basis,
|
||||
- WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||
- for the specific language governing rights and limitations under the
|
||||
- License.
|
||||
-
|
||||
- The Original Code is Mozilla Communicator.
|
||||
-
|
||||
- The Initial Developer of the Original Code is
|
||||
- Netscape Communications Corp.
|
||||
- Portions created by the Initial Developer are Copyright (C) 1999
|
||||
- the Initial Developer. All Rights Reserved.
|
||||
-
|
||||
- Contributor(s):
|
||||
- Stephen Lamm <slamm@netscape.com>
|
||||
- Robert John Churchill <rjc@netscape.com>
|
||||
- Ben Goodger <ben@netscape.com>
|
||||
-
|
||||
- Alternatively, the contents of this file may be used under the terms of
|
||||
- either of the GNU General Public License Version 2 or later (the "GPL"),
|
||||
- or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
|
||||
- in which case the provisions of the GPL or the LGPL are applicable instead
|
||||
- of those above. If you wish to allow use of your version of this file only
|
||||
- under the terms of either the GPL or the LGPL, and not to allow others to
|
||||
- use your version of this file under the terms of the MPL, indicate your
|
||||
- decision by deleting the provisions above and replace them with the notice
|
||||
- and other provisions required by the GPL or the LGPL. If you do not delete
|
||||
- the provisions above, a recipient may use your version of this file under
|
||||
- the terms of any one of the MPL, the GPL or the LGPL.
|
||||
-
|
||||
- ***** END LICENSE BLOCK ***** -->
|
||||
|
||||
<!ENTITY bookmarks.windowtitle.label "Properties for "**bm_title**"">
|
||||
|
||||
<!ENTITY generalInfo.label "General">
|
||||
<!ENTITY bookmarks.name.label "Name:">
|
||||
<!ENTITY bookmarks.name.accesskey "N">
|
||||
<!ENTITY bookmarks.location.label "Location:">
|
||||
<!ENTITY bookmarks.location.accesskey "L">
|
||||
<!ENTITY bookmarks.shortcut.label "Keyword:">
|
||||
<!ENTITY bookmarks.shortcut.accesskey "K">
|
||||
<!ENTITY bookmarks.description.label "Description:">
|
||||
<!ENTITY bookmarks.description.accesskey "D">
|
||||
|
||||
<!ENTITY checkforupdates.legend.label "Check this location for updates">
|
||||
<!ENTITY when.label "When:">
|
||||
<!ENTITY when.accesskey "W">
|
||||
<!ENTITY from.label "from:">
|
||||
<!ENTITY from.accesskey "f">
|
||||
<!ENTITY to.label "to: ">
|
||||
<!ENTITY to.accesskey "t">
|
||||
<!ENTITY every.label "every">
|
||||
<!ENTITY every.accesskey "e">
|
||||
<!ENTITY minutes.label "minute(s)">
|
||||
<!ENTITY notifications.legend.label "Notification">
|
||||
|
||||
<!ENTITY checknever.label "Never">
|
||||
<!ENTITY checkeveryday.label "Every day">
|
||||
<!ENTITY checkweekdays.label "Weekdays">
|
||||
<!ENTITY checkweekends.label "Weekends">
|
||||
<!ENTITY checkmondays.label "Mondays">
|
||||
<!ENTITY checktuesdays.label "Tuesdays">
|
||||
<!ENTITY checkwednesdays.label "Wednesdays">
|
||||
<!ENTITY checkthursdays.label "Thursdays">
|
||||
<!ENTITY checkfridays.label "Fridays">
|
||||
<!ENTITY checksaturdays.label "Saturdays">
|
||||
<!ENTITY checksundays.label "Sundays">
|
||||
|
||||
<!ENTITY midnight.label "Midnight">
|
||||
<!ENTITY AMone.label "1 AM">
|
||||
<!ENTITY AMtwo.label "2 AM">
|
||||
<!ENTITY AMthree.label "3 AM">
|
||||
<!ENTITY AMfour.label "4 AM">
|
||||
<!ENTITY AMfive.label "5 AM">
|
||||
<!ENTITY AMsix.label "6 AM">
|
||||
<!ENTITY AMseven.label "7 AM">
|
||||
<!ENTITY AMeight.label "8 AM">
|
||||
<!ENTITY AMnine.label "9 AM">
|
||||
<!ENTITY AMten.label "10 AM">
|
||||
<!ENTITY AMeleven.label "11 AM">
|
||||
<!ENTITY noon.label "Noon">
|
||||
<!ENTITY PMone.label "1 PM">
|
||||
<!ENTITY PMtwo.label "2 PM">
|
||||
<!ENTITY PMthree.label "3 PM">
|
||||
<!ENTITY PMfour.label "4 PM">
|
||||
<!ENTITY PMfive.label "5 PM">
|
||||
<!ENTITY PMsix.label "6 PM">
|
||||
<!ENTITY PMseven.label "7 PM">
|
||||
<!ENTITY PMeight.label "8 PM">
|
||||
<!ENTITY PMnine.label "9 PM">
|
||||
<!ENTITY PMten.label "10 PM">
|
||||
<!ENTITY PMeleven.label "11 PM">
|
||||
|
||||
<!ENTITY notification.icon.label "Change the bookmark's icon">
|
||||
<!ENTITY notification.icon.accesskey "C">
|
||||
<!ENTITY notification.sound.label "Play a sound">
|
||||
<!ENTITY notification.sound.accesskey "P">
|
||||
<!ENTITY notification.alert.label "Display an alert">
|
||||
<!ENTITY notification.alert.accesskey "r">
|
||||
<!ENTITY notification.window.label "Open web page in a new window">
|
||||
<!ENTITY notification.window.accesskey "O">
|
|
@ -1,121 +0,0 @@
|
|||
<!-- ***** BEGIN LICENSE BLOCK *****
|
||||
- Version: MPL 1.1/GPL 2.0/LGPL 2.1
|
||||
-
|
||||
- The contents of this file are subject to the Mozilla Public License Version
|
||||
- 1.1 (the "License"); you may not use this file except in compliance with
|
||||
- the License. You may obtain a copy of the License at
|
||||
- http://www.mozilla.org/MPL/
|
||||
-
|
||||
- Software distributed under the License is distributed on an "AS IS" basis,
|
||||
- WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||
- for the specific language governing rights and limitations under the
|
||||
- License.
|
||||
-
|
||||
- The Original Code is Mozilla Communicator.
|
||||
-
|
||||
- The Initial Developer of the Original Code is
|
||||
- Netscape Communications Corp.
|
||||
- Portions created by the Initial Developer are Copyright (C) 1999
|
||||
- the Initial Developer. All Rights Reserved.
|
||||
-
|
||||
- Contributor(s):
|
||||
- Stephen Lamm <slamm@netscape.com>
|
||||
- Blake Ross <blakeross@telocity.com>
|
||||
- Mike Kowalski <mikejk@ameritech.net>
|
||||
-
|
||||
- Alternatively, the contents of this file may be used under the terms of
|
||||
- either of the GNU General Public License Version 2 or later (the "GPL"),
|
||||
- or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
|
||||
- in which case the provisions of the GPL or the LGPL are applicable instead
|
||||
- of those above. If you wish to allow use of your version of this file only
|
||||
- under the terms of either the GPL or the LGPL, and not to allow others to
|
||||
- use your version of this file under the terms of the MPL, indicate your
|
||||
- decision by deleting the provisions above and replace them with the notice
|
||||
- and other provisions required by the GPL or the LGPL. If you do not delete
|
||||
- the provisions above, a recipient may use your version of this file under
|
||||
- the terms of any one of the MPL, the GPL or the LGPL.
|
||||
-
|
||||
- ***** END LICENSE BLOCK ***** -->
|
||||
|
||||
<!-- extracted from ./bookmarks.xul -->
|
||||
<!ENTITY menuBar.tooltip "Menu Bar">
|
||||
<!ENTITY bookmarkToolbar.tooltip "Bookmark Toolbar">
|
||||
<!ENTITY bookmarksSearch.tooltip "Bookmarks Search Toolbar">
|
||||
<!ENTITY menuitem.newBookmark.label "Bookmark">
|
||||
<!ENTITY command.newBookmark.accesskey "B">
|
||||
<!ENTITY menuitem.newFolder.label "Folder">
|
||||
<!ENTITY button.newFolder.label "New Folder">
|
||||
<!ENTITY button.newFolder.accesskey "N">
|
||||
<!ENTITY command.newFolder.accesskey "F">
|
||||
<!ENTITY menuitem.newSeparator.label "Separator">
|
||||
<!ENTITY button.newSeparator.label "New Separator">
|
||||
<!ENTITY button.newSeparator.accesskey "o">
|
||||
<!ENTITY command.newSeparator.accesskey "S">
|
||||
<!ENTITY menuitem.open.label "Open Bookmarks File...">
|
||||
<!ENTITY menuitem.open.accesskey "O">
|
||||
<!ENTITY menuitem.import.label "Import...">
|
||||
<!ENTITY menuitem.import.accesskey "i">
|
||||
<!ENTITY menuitem.export.label "Export...">
|
||||
<!ENTITY menuitem.export.accesskey "e">
|
||||
<!ENTITY menuitem.find.label "Search Bookmarks...">
|
||||
<!ENTITY command.findBookmarks.label "Search...">
|
||||
<!ENTITY menuitem.find.accesskey "S">
|
||||
<!ENTITY edit.find.keybinding "f">
|
||||
<!ENTITY command.properties.label "Properties...">
|
||||
<!ENTITY button.properties.accesskey "P">
|
||||
<!ENTITY command.properties.accesskey "o">
|
||||
<!ENTITY edit.properties.keybinding "i">
|
||||
<!ENTITY command.rename.label "Rename...">
|
||||
<!ENTITY button.rename.accesskey "R">
|
||||
<!ENTITY command.delete.label "Delete">
|
||||
<!ENTITY button.delete.accesskey "D">
|
||||
<!ENTITY command.moveBookmark.label "Move Bookmark(s)...">
|
||||
<!ENTITY command.moveBookmarkShort.label "Move...">
|
||||
<!ENTITY command.moveBookmark.accesskey "M">
|
||||
<!ENTITY command.addBookmark.label "Add...">
|
||||
<!ENTITY command.manageBookmarks.label "Manage">
|
||||
<!ENTITY command.sortFolder.label "Sort Folder...">
|
||||
<!ENTITY command.sortFolder.accesskey "S">
|
||||
<!ENTITY edit.sortFolder.keybinding "S">
|
||||
<!ENTITY command.sortFolderByName.label "Sort Folder by Name">
|
||||
<!ENTITY command.sortFolderByName.accesskey "N">
|
||||
|
||||
<!ENTITY menuitem.view.command.toolbar.label "Toolbar">
|
||||
<!ENTITY menuitem.view.command.toolbar.accesskey "t">
|
||||
<!ENTITY menuitem.view.command.searchbar.label "Search bar">
|
||||
<!ENTITY menuitem.view.command.searchbar.accesskey "S">
|
||||
<!ENTITY menuitem.view.show_columns.label "Show columns">
|
||||
<!ENTITY menuitem.view.show_columns.accesskey "c">
|
||||
<!ENTITY menuitem.newbookmarkfolder.label "Set as New Bookmark Folder">
|
||||
<!ENTITY menuitem.newbookmarkfolder.accesskey "b">
|
||||
<!ENTITY menuitem.newinternetsearchfolder.label "Set as New Internet Search Folder">
|
||||
<!ENTITY menuitem.newinternetsearchfolder.accesskey "i">
|
||||
<!ENTITY menuitem.personaltoolbarfolder.label "Set as Personal Toolbar Folder">
|
||||
<!ENTITY menuitem.personaltoolbarfolder.accesskey "p">
|
||||
|
||||
<!ENTITY treecol.name.label "Name">
|
||||
<!ENTITY treecol.name.accesskey "n">
|
||||
<!ENTITY treecol.name.tooltip "Click to sort by name">
|
||||
<!ENTITY treecol.url.label "Location">
|
||||
<!ENTITY treecol.url.accesskey "l">
|
||||
<!ENTITY treecol.url.tooltip "Click to sort by location">
|
||||
<!ENTITY treecol.shortcut.label "Keyword">
|
||||
<!ENTITY treecol.shortcut.accesskey "k">
|
||||
<!ENTITY treecol.shortcut.tooltip "Click to sort by keyword">
|
||||
<!ENTITY treecol.description.label "Description">
|
||||
<!ENTITY treecol.description.accesskey "d">
|
||||
<!ENTITY treecol.description.tooltip "Click to sort by description">
|
||||
<!ENTITY treecol.addedon.label "Added">
|
||||
<!ENTITY treecol.addedon.accesskey "a">
|
||||
<!ENTITY treecol.addedon.tooltip "Click to sort by added">
|
||||
<!ENTITY treecol.lastmod.label "Last Modified">
|
||||
<!ENTITY treecol.lastmod.accesskey "m">
|
||||
<!ENTITY treecol.lastmod.tooltip "Click to sort by last modified">
|
||||
<!ENTITY treecol.lastvisit.label "Last Visited">
|
||||
<!ENTITY treecol.lastvisit.accesskey "b">
|
||||
<!ENTITY treecol.lastvisit.tooltip "Click to sort by last visit">
|
||||
|
||||
<!ENTITY bookmarksWindowTitle.label "Bookmark Manager">
|
||||
|
||||
<!ENTITY search.label "Search">
|
||||
<!ENTITY search.accesskey "S">
|
|
@ -1,100 +0,0 @@
|
|||
# ***** BEGIN LICENSE BLOCK *****
|
||||
# Version: MPL 1.1/GPL 2.0/LGPL 2.1
|
||||
#
|
||||
# The contents of this file are subject to the Mozilla Public License Version
|
||||
# 1.1 (the "License"); you may not use this file except in compliance with
|
||||
# the License. You may obtain a copy of the License at
|
||||
# http://www.mozilla.org/MPL/
|
||||
#
|
||||
# Software distributed under the License is distributed on an "AS IS" basis,
|
||||
# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||
# for the specific language governing rights and limitations under the
|
||||
# License.
|
||||
#
|
||||
# The Original Code is mozilla.org code.
|
||||
#
|
||||
# The Initial Developer of the Original Code is
|
||||
# Netscape Communications Corporation.
|
||||
# Portions created by the Initial Developer are Copyright (C) 1998
|
||||
# the Initial Developer. All Rights Reserved.
|
||||
#
|
||||
# Contributor(s):
|
||||
#
|
||||
# Alternatively, the contents of this file may be used under the terms of
|
||||
# either of the GNU General Public License Version 2 or later (the "GPL"),
|
||||
# or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
|
||||
# in which case the provisions of the GPL or the LGPL are applicable instead
|
||||
# of those above. If you wish to allow use of your version of this file only
|
||||
# under the terms of either the GPL or the LGPL, and not to allow others to
|
||||
# use your version of this file under the terms of the MPL, indicate your
|
||||
# decision by deleting the provisions above and replace them with the notice
|
||||
# and other provisions required by the GPL or the LGPL. If you do not delete
|
||||
# the provisions above, a recipient may use your version of this file under
|
||||
# the terms of any one of the MPL, the GPL or the LGPL.
|
||||
#
|
||||
# ***** END LICENSE BLOCK *****
|
||||
|
||||
cmd_bm_open = Open
|
||||
cmd_bm_expandfolder = Expand
|
||||
cmd_bm_collapsefolder = Collapse
|
||||
cmd_bm_managefolder = Open in New Window
|
||||
cmd_bm_find = Find a Bookmark...
|
||||
cmd_bm_cut = Cut
|
||||
cmd_bm_copy = Copy
|
||||
cmd_bm_paste = Paste
|
||||
cmd_bm_delete = Delete
|
||||
cmd_bm_movebookmark = Move Bookmark(s)...
|
||||
cmd_bm_selectAll = Select All
|
||||
cmd_bm_rename = Rename...
|
||||
cmd_bm_renamebookmark2 = Change Location...
|
||||
cmd_bm_properties = Properties
|
||||
cmd_bm_sortfolderbyname = Sort Folder by Name
|
||||
cmd_bm_sortfolder = Sort Folder...
|
||||
|
||||
cmd_bm_openinnewwindow = Open in New Window
|
||||
cmd_bm_openinnewtab = Open in New Tab
|
||||
cmd_bm_newfolder = New Folder...
|
||||
cmd_bm_newbookmark = New Bookmark...
|
||||
cmd_bm_newseparator = New Separator
|
||||
cmd_bm_setnewbookmarkfolder = Set as New Bookmark folder
|
||||
cmd_bm_setpersonaltoolbarfolder = Set as Personal Toolbar folder
|
||||
cmd_bm_setnewsearchfolder = Set as Saved Search Results folder
|
||||
|
||||
ile_newfolder = New Folder
|
||||
ile_newbookmark = New Bookmark
|
||||
newfolder_dialog_title = Create New Folder
|
||||
newfolder_dialog_msg = Create a New Folder named:
|
||||
|
||||
window_title = %S - Bookmarks
|
||||
search_results_title = Search Results
|
||||
|
||||
file_in = File in "%S"
|
||||
|
||||
bookmarks_default_root = Bookmarks
|
||||
bookmarks_root = Bookmarks for %S
|
||||
bookmarks_title = Bookmark Manager
|
||||
status_foldercount = %S object(s)
|
||||
|
||||
WebPageUpdated = The following web page has been updated:
|
||||
WebPageTitle = Title:
|
||||
WebPageURL = URL:
|
||||
WebPageAskDisplay = Would you like to display it?
|
||||
WebPageAskStopOption = Stop checking for updates on this web page
|
||||
|
||||
pleaseEnterALocation = Please enter a location
|
||||
pleaseEnterADuration = Please enter a duration.
|
||||
pleaseSelectANotification = Please enter at least one notification method.
|
||||
|
||||
SortMenuItem = Sorted by %S
|
||||
|
||||
ShortFindTitle = Find: '%S'
|
||||
FindTitle = Find: %S %S '%S' in %S
|
||||
|
||||
ImportedIEFavorites = Imported IE Favorites
|
||||
ImportedIEStaticFavorites = Imported IE Favorites
|
||||
ImportedNetPositiveBookmarks = Imported NetPositive Bookmarks
|
||||
DefaultPersonalToolbarFolder = Personal Toolbar Folder
|
||||
|
||||
SelectOpen = Open Bookmarks File
|
||||
SelectImport = Import Bookmarks File
|
||||
EnterExport = Export Bookmarks File
|
|
@ -1,22 +0,0 @@
|
|||
|
||||
<!ENTITY findABookmark.label "Find a Bookmark...">
|
||||
<!ENTITY findABookmark.accesskey "f">
|
||||
<!ENTITY newBookmark.label "New Bookmark...">
|
||||
<!ENTITY newBookmark.accesskey "n">
|
||||
<!ENTITY newFolder.label "New Folder...">
|
||||
<!ENTITY newFolder.accesskey "e">
|
||||
<!ENTITY newSeparator.label "New Separator">
|
||||
<!ENTITY newSeparator.accesskey "s">
|
||||
<!ENTITY setAsNewBookmarkFolder.label "Set as new Bookmark folder">
|
||||
<!ENTITY setAsNewBookmarkFolder.accesskey "b">
|
||||
<!ENTITY setAsNewSearchFolder.label "Set as new Search Results folder">
|
||||
<!ENTITY setAsNewSearchFolder.accesskey "r">
|
||||
<!ENTITY setAsNewToolbarFolder.label "Set as new Personal Toolbar folder">
|
||||
<!ENTITY setAsNewToolbarFolder.accesskey "p">
|
||||
<!ENTITY exportBookmarks.label "Export...">
|
||||
<!ENTITY exportBookmarks.accesskey "x">
|
||||
<!ENTITY importBookmarks.label "Import...">
|
||||
<!ENTITY importBookmarks.accesskey "i">
|
||||
|
||||
|
||||
|
|
@ -1,15 +0,0 @@
|
|||
|
||||
<!ENTITY search.name.label "name">
|
||||
<!ENTITY search.url.label "location">
|
||||
<!ENTITY search.shortcut.label "keyword">
|
||||
<!ENTITY search.description.label "description">
|
||||
<!ENTITY search.startswith.label "starts with">
|
||||
<!ENTITY search.endswith.label "ends with">
|
||||
<!ENTITY search.is.label "is">
|
||||
<!ENTITY search.isnot.label "is not">
|
||||
<!ENTITY search.contains.label "contains">
|
||||
<!ENTITY search.doesntcontain.label "doesn't contain">
|
||||
<!ENTITY save.query.label "Save query in bookmarks">
|
||||
<!ENTITY search.for.label "Find Bookmarks whose">
|
||||
<!ENTITY findBookmark.title "Find Bookmarks">
|
||||
<!ENTITY findButton.label "Find">
|
|
@ -1,20 +0,0 @@
|
|||
<!ENTITY window.title "Sort Folder">
|
||||
|
||||
<!ENTITY sortOptions.label "Sort options">
|
||||
<!ENTITY description.label "&brandShortName; can sort individual folders. Use these options to customize the sorting for this Folder.">
|
||||
|
||||
<!ENTITY sortBy.label "Sort by:">
|
||||
<!ENTITY sortBy.name.label "Name">
|
||||
<!ENTITY sortBy.url.label "Location">
|
||||
<!ENTITY sortBy.shortcutUrl.label "Keyword">
|
||||
<!ENTITY sortBy.description.label "Description">
|
||||
<!ENTITY sortBy.bookmarkAddDate.label "Added">
|
||||
<!ENTITY sortBy.lastModifiedDate.label "Last Modified">
|
||||
<!ENTITY sortBy.lastVisitDate.label "Last Visited">
|
||||
|
||||
<!ENTITY sortOrder.label "Sort order:">
|
||||
<!ENTITY sortAscending.label "Ascending">
|
||||
<!ENTITY sortDescending.label "Descending">
|
||||
|
||||
<!ENTITY sortFoldersFirst.label "Sort folders first">
|
||||
<!ENTITY sortRecursively.label "Sort recursively">
|
|
@ -1,51 +0,0 @@
|
|||
/* ***** BEGIN LICENSE BLOCK *****
|
||||
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
|
||||
*
|
||||
* The contents of this file are subject to the Mozilla Public License Version
|
||||
* 1.1 (the "License"); you may not use this file except in compliance with
|
||||
* the License. You may obtain a copy of the License at
|
||||
* http://www.mozilla.org/MPL/
|
||||
*
|
||||
* Software distributed under the License is distributed on an "AS IS" basis,
|
||||
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||
* for the specific language governing rights and limitations under the
|
||||
* License.
|
||||
*
|
||||
* The Original Code is mozilla.org code.
|
||||
*
|
||||
* The Initial Developer of the Original Code is
|
||||
* Netscape Communications Corporation.
|
||||
* Portions created by the Initial Developer are Copyright (C) 2002
|
||||
* the Initial Developer. All Rights Reserved.
|
||||
*
|
||||
* Contributor(s):
|
||||
* Jan Varga <varga@ku.sk>
|
||||
*
|
||||
* Alternatively, the contents of this file may be used under the terms of
|
||||
* either the GNU General Public License Version 2 or later (the "GPL"), or
|
||||
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
|
||||
* in which case the provisions of the GPL or the LGPL are applicable instead
|
||||
* of those above. If you wish to allow use of your version of this file only
|
||||
* under the terms of either the GPL or the LGPL, and not to allow others to
|
||||
* use your version of this file under the terms of the MPL, indicate your
|
||||
* decision by deleting the provisions above and replace them with the notice
|
||||
* and other provisions required by the GPL or the LGPL. If you do not delete
|
||||
* the provisions above, a recipient may use your version of this file under
|
||||
* the terms of any one of the MPL, the GPL or the LGPL.
|
||||
*
|
||||
* ***** END LICENSE BLOCK ***** */
|
||||
|
||||
function onAccept() {
|
||||
var sortOptions = window.arguments[0];
|
||||
sortOptions.accepted = true;
|
||||
sortOptions.sortBy = document.getElementById("sortBy").value;
|
||||
sortOptions.sortOrder = document.getElementById("sortOrder").value;
|
||||
sortOptions.sortFoldersFirst = document.getElementById("sortFoldersFirst").checked;
|
||||
sortOptions.sortRecursively = document.getElementById("sortRecursively").checked;
|
||||
}
|
||||
|
||||
function onSortByChanged() {
|
||||
var sortBy = document.getElementById("sortBy");
|
||||
var sortFoldersFirst = document.getElementById("sortFoldersFirst");
|
||||
sortFoldersFirst.checked = sortBy.value == "Name";
|
||||
}
|
|
@ -1,113 +0,0 @@
|
|||
<?xml version="1.0"?>
|
||||
|
||||
<!-- ***** BEGIN LICENSE BLOCK *****
|
||||
- Version: MPL 1.1/GPL 2.0/LGPL 2.1
|
||||
-
|
||||
- The contents of this file are subject to the Mozilla Public License Version
|
||||
- 1.1 (the "License"); you may not use this file except in compliance with
|
||||
- the License. You may obtain a copy of the License at
|
||||
- http://www.mozilla.org/MPL/
|
||||
-
|
||||
- Software distributed under the License is distributed on an "AS IS" basis,
|
||||
- WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||
- for the specific language governing rights and limitations under the
|
||||
- License.
|
||||
-
|
||||
- The Original Code is mozilla.org code.
|
||||
-
|
||||
- The Initial Developer of the Original Code is
|
||||
- Netscape Communications Corp.
|
||||
- Portions created by the Initial Developer are Copyright (C) 2003
|
||||
- the Initial Developer. All Rights Reserved.
|
||||
-
|
||||
- Contributor(s):
|
||||
- Jan Varga <varga@ku.sk>
|
||||
-
|
||||
- Alternatively, the contents of this file may be used under the terms of
|
||||
- either the GNU General Public License Version 2 or later (the "GPL"), or
|
||||
- the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
|
||||
- in which case the provisions of the GPL or the LGPL are applicable instead
|
||||
- of those above. If you wish to allow use of your version of this file only
|
||||
- under the terms of either the GPL or the LGPL, and not to allow others to
|
||||
- use your version of this file under the terms of the MPL, indicate your
|
||||
- decision by deleting the provisions above and replace them with the notice
|
||||
- and other provisions required by the LGPL or the GPL. If you do not delete
|
||||
- the provisions above, a recipient may use your version of this file under
|
||||
- the terms of any one of the MPL, the GPL or the LGPL.
|
||||
-
|
||||
- ***** END LICENSE BLOCK ***** -->
|
||||
|
||||
<?xml-stylesheet href="chrome://global/skin/" type="text/css"?>
|
||||
|
||||
<!DOCTYPE dialog [
|
||||
<!ENTITY % brandDTD SYSTEM "chrome://branding/locale/brand.dtd" >
|
||||
%brandDTD;
|
||||
<!ENTITY % sortFolderDTD SYSTEM "chrome://communicator/locale/bookmarks/sortFolder.dtd">
|
||||
%sortFolderDTD;
|
||||
]>
|
||||
|
||||
<dialog id="sortFolder"
|
||||
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
|
||||
title="&window.title;"
|
||||
style="width: 30em;"
|
||||
buttons="accept,cancel"
|
||||
ondialogaccept="return onAccept();">
|
||||
|
||||
<script type="application/x-javascript" src="chrome://communicator/content/bookmarks/sortFolder.js"/>
|
||||
|
||||
<tabbox>
|
||||
<tabs>
|
||||
<tab label="&sortOptions.label;"/>
|
||||
</tabs>
|
||||
<tabpanels>
|
||||
<vbox>
|
||||
<separator class="thin"/>
|
||||
<hbox align="start">
|
||||
<image class="message-icon"/>
|
||||
<separator class="thin" orient="vertical"/>
|
||||
<description flex="1">
|
||||
&description.label;
|
||||
</description>
|
||||
</hbox>
|
||||
<separator class="thin"/>
|
||||
<grid>
|
||||
<columns>
|
||||
<column/>
|
||||
<column flex="1"/>
|
||||
</columns>
|
||||
<rows>
|
||||
<row align="center">
|
||||
<label value="&sortBy.label;"/>
|
||||
<menulist id="sortBy" oncommand="onSortByChanged()">
|
||||
<menupopup>
|
||||
<menuitem value="Name" label="&sortBy.name.label;"/>
|
||||
<menuitem value="URL" label="&sortBy.url.label;"/>
|
||||
<menuitem value="ShortcutURL" label="&sortBy.shortcutUrl.label;"/>
|
||||
<menuitem value="Description" label="&sortBy.description.label;"/>
|
||||
<menuitem value="BookmarkAddDate" label="&sortBy.bookmarkAddDate.label;"/>
|
||||
<menuitem value="LastModifiedDate" label="&sortBy.lastModifiedDate.label;"/>
|
||||
<menuitem value="LastVisitDate" label="&sortBy.lastVisitDate.label;"/>
|
||||
</menupopup>
|
||||
</menulist>
|
||||
</row>
|
||||
<row align="center">
|
||||
<label value="&sortOrder.label;"/>
|
||||
<menulist id="sortOrder">
|
||||
<menupopup>
|
||||
<menuitem value="ascending" label="&sortAscending.label;"/>
|
||||
<menuitem value="descending" label="&sortDescending.label;"/>
|
||||
</menupopup>
|
||||
</menulist>
|
||||
</row>
|
||||
</rows>
|
||||
</grid>
|
||||
<separator class="thin"/>
|
||||
<checkbox id="sortFoldersFirst" label="&sortFoldersFirst.label;"
|
||||
checked="true"/>
|
||||
<checkbox id="sortRecursively" label="&sortRecursively.label;"/>
|
||||
<separator class="thin"/>
|
||||
</vbox>
|
||||
</tabpanels>
|
||||
</tabbox>
|
||||
|
||||
</dialog>
|
Загрузка…
Ссылка в новой задаче