17920, r=hyatt, sr=sfraser, scc

This commit is contained in:
ben%netscape.com 2001-04-18 04:52:46 +00:00
Родитель 9de468a218
Коммит 00e0ceb9d7
21 изменённых файлов: 1275 добавлений и 1192 удалений

Просмотреть файл

@ -6,7 +6,12 @@
.button-toolbar.bookmark-item,
.button-toolbar.bookmark-item:hover,
.button-toolbar.bookmark-item:hover:active,
.button-toolbar.bookmark-item:hover:active
{
border : none !important;
vertical-align : middle;
}
.button-toolbar.bookmark-item > .button-internal-box,
.button-toolbar.bookmark-item:hover > .button-internal-box,
.button-toolbar.bookmark-item:hover:active > .button-internal-box,
@ -18,23 +23,41 @@
> .menubutton-toolbar-single-internal-box
{
border : none !important;
vertical-align : middle;
padding : 1px 2px 1px 2px;
}
.button-toolbar.bookmark-item[mode="edit"] > .button-internal-box,
.button-toolbar.bookmark-item[mode="edit"]:hover > .button-internal-box,
.button-toolbar.bookmark-item[mode="edit"]:hover:active > .button-internal-box,
.button-toolbar.bookmark-item[mode="edit"]
> .menubutton-toolbar-single-internal-box,
.button-toolbar.bookmark-item[mode="edit"]:hover
> .menubutton-toolbar-single-internal-box,
.button-toolbar.bookmark-item[mode="edit"]:hover:active
> .menubutton-toolbar-single-internal-box
{
padding : 1px 2px 0px 2px;
}
.bookmark-item.button-toolbar
{
cursor : pointer;
-moz-binding : url("chrome://global/content/xulBindings.xml#buttonleft-ile");
}
.bookmark-item.button-toolbar[container="true"],
.bookmark-item.button-toolbar[container="true"]:hover,
.bookmark-item.button-toolbar[container="true"]:hover:active
{
-moz-binding : url("chrome://communicator/skin/menubuttonBindings.xml#menubutton-toolbar-single-ile");
cursor : default;
background-color : transparent;
color : inherit;
text-decoration : none;
vertical-align : middle;
}
.bookmark-item.button-toolbar
{
cursor : pointer;
}
.bookmark-item > .menubutton-toolbar-single-internal-box > .menubutton-toolbar-single-dropmarker
{
display : none;
@ -42,15 +65,9 @@
.button-toolbar.bookmark-item
{
max-width : 10em;
max-width : 13em !important;
}
.button-toolbar.bookmark-item > .menubutton-toolbar-single-internal-box
> .menubutton-toolbar-single-text
{
max-width : 8em !important;
}
.bookmark-item.button-toolbar:hover
{
color : #0000FF;

Просмотреть файл

Просмотреть файл

@ -0,0 +1,29 @@
/**
* Bookmarks tree
**/
.bookmarks-window-tree
{
border-top : 1px solid #000000 !important;
border-bottom : 1px solid #DDDDDD;
border-left : 1px solid #9D9D9D;
border-right : 1px solid #FFFFFF;
}
.bookmarks-window-tree > .tree-container-treerows
{
border-left : 1px solid #000000;
border-right : 1px solid #DDDDDD;
}
.bookmarks-panel-tree, .bookmarks-panel-tree > .tree-container-treerows
{
border : none;
}
#panel-bar
{
border-top : 1px solid #FFFFFF;
border-bottom : 1px solid #9D9D9D;
}

Просмотреть файл

@ -35,7 +35,8 @@
.button-toolbar > .button-internal-box
{
border : 1px solid transparent;
padding : 1px 3px;
padding : 1px 3px;
vertical-align : middle;
}
.button-toolbar-1 > .button-internal-box,

Просмотреть файл

@ -207,6 +207,7 @@
{
border : 1px solid transparent;
padding : 1px 3px 1px 3px;
vertical-align : middle;
}
menubutton.button-toolbar > .menubutton-toolbar-single-internal-box > .menubutton-toolbar-single-icon

Просмотреть файл

@ -9,22 +9,39 @@
<content>
<xul:button class="menubutton-dual-button button-toolbar-1 top" allowevents="true"
inherits="tooltiptext=buttontooltiptext,oncommand=buttonaction,src,label,crop,accesskey,disabled"/>
<xul:box class="menubutton-dual-dropmarker-box" autostretch="never" valign="middle" flex="1">
<xul:hbox class="menubutton-dual-dropmarker-box" autostretch="never" valign="middle" flex="1">
<xul:image class="menubutton-dual-dropmarker" inherits="disabled"/>
</xul:box>
</xul:hbox>
<children includes="menupopup"/>
</content>
</binding>
<binding id="menubutton-toolbar-single" extends="chrome://global/content/menulistBindings.xml#menubutton-single-left">
<content>
<xul:box class="menubutton-toolbar-single-internal-box" flex="1" autostretch="never">
<xul:hbox class="menubutton-toolbar-single-internal-box" flex="1" autostretch="never">
<xul:image class="menubutton-toolbar-single-icon" inherits="src,disabled"/>
<xul:text class="menubutton-toolbar-single-text" inherits="value=label,accesskey,crop,disabled,dragover-top" flex="1"/>
<xul:image class="menubutton-toolbar-single-dropmarker" inherits="menubuttontype,disabled"/>
</xul:box>
</xul:hbox>
<children includes="menupopup"/>
</content>
</binding>
</bindings>
<binding id="menubutton-toolbar-single-ile" extends="chrome://global/content/xulBindings.xml#inline-edit-base" display="xul:menu">
<content>
<xul:hbox class="menubutton-toolbar-single-internal-box" flex="1" autostretch="never">
<xul:image class="menubutton-toolbar-single-icon" inherits="src,disabled"/>
<xul:hbox class="menubutton-toolbar-single-ile-text-container"
flex="1" ileattr="text-container" autostretch="never">
<xul:text class="menubutton-toolbar-single-ile-text"
inherits="value=label,accesskey,crop,disabled,dragover-top"
ileattr="text" rootcontent="menubutton" flex="1"/>
</xul:hbox>
<xul:image class="menubutton-toolbar-single-dropmarker" inherits="menubuttontype,disabled"/>
</xul:hbox>
<children includes="menupopup"/>
</content>
</binding>
</bindings>

Просмотреть файл

@ -243,7 +243,7 @@
menubutton.button-toolbar-4
{
-moz-binding : url("chrome://global/content/menulistBindings.xml#menubutton-single-right");
-moz-binding : url("chrome://global/content/menulistBindings.xml#menubutton-single-right");
}
/** Low profile rollover buttons, e.g. "search"
@ -251,17 +251,17 @@
.button-toolbar-3
{
-moz-binding : url("chrome://global/content/xulBindings.xml#buttonleft");
margin : 0px 0px 1px 3px !important;
min-width : 0px;
background-color : transparent;
color : -moz-DialogText;
-moz-user-focus : ignore;
-moz-binding : url("chrome://global/content/xulBindings.xml#buttonleft");
margin : 0px 0px 1px 3px !important;
min-width : 0px;
background-color : transparent;
color : -moz-DialogText;
-moz-user-focus : ignore;
}
.button-toolbar-3 > .button-internal-box
{
background-color : -moz-Dialog;
background-color : -moz-Dialog;
color : inherit;
}
@ -269,12 +269,12 @@
.button-toolbar-3[disabled="true"]:hover,
.button-toolbar-3[disabled="true"]:hover:active
{
border : 1px solid transparent;
border : 1px solid transparent;
}
.button-toolbar-3:hover, .button-toolbar-3:hover:active
{
border-color : ThreeDDarkShadow;
border-color : ThreeDDarkShadow;
}
.button-toolbar-3 > .button-internal-box,
@ -282,28 +282,33 @@
.button-toolbar-3[disabled="true"]:hover > .button-internal-box,
.button-toolbar-3[disabled="true"]:hover:active > .button-internal-box
{
border-left : 1px solid ThreeDHighlight !important;
border-top : 1px solid ThreeDHighlight !important;
border-right : 1px solid ThreeDShadow !important;
border-bottom : 1px solid ThreeDShadow !important;
padding : 1px 4px 1px 4px;
border-left : 1px solid ThreeDHighlight !important;
border-top : 1px solid ThreeDHighlight !important;
border-right : 1px solid ThreeDShadow !important;
border-bottom : 1px solid ThreeDShadow !important;
padding : 1px 4px 1px 4px;
}
.button-toolbar-3:hover:active > .button-internal-box
{
border-left : 1px solid ThreeDShadow !important;
border-top : 1px solid ThreeDShadow !important;
border-bottom : 1px solid ThreeDHighlight !important;
border-right : 1px solid ThreeDHighlight !important;
padding : 2px 3px 0px 5px;
border-left : 1px solid ThreeDShadow !important;
border-top : 1px solid ThreeDShadow !important;
border-bottom : 1px solid ThreeDHighlight !important;
border-right : 1px solid ThreeDHighlight !important;
padding : 2px 3px 0px 5px;
}
.button-toolbar-3 > .button-internal-box > .button-icon,
.button-toolbar-3 > .button-internal-box > .button-text
{
margin-right : 2px;
margin-right : 2px;
}
.button-toolbar > .button-internal-box > .button-icon
{
margin-right : 5px;
}
/** Expanding Region Button **/
/* outer frame */

Просмотреть файл

@ -258,6 +258,7 @@
{
border : 1px solid transparent;
padding : 1px 3px 1px 3px;
vertical-align : middle;
}
menubutton.button-toolbar > .menubutton-toolbar-single-internal-box > .menubutton-toolbar-single-icon

Просмотреть файл

@ -29,6 +29,7 @@
.bookmark-item.button-toolbar {
cursor: pointer;
-moz-binding: url("chrome://global/content/xulBindings.xml#buttonleft-ile");
}
.bookmark-item.button-toolbar:hover {
@ -49,5 +50,6 @@
.bookmark-item.button-toolbar[container="true"]:hover {
cursor: default;
text-decoration: none;
-moz-binding: url("chrome://communicator/skin/widgetBindings.xml#menubutton-toolbar-single-ile");
}

Просмотреть файл

@ -45,6 +45,7 @@
.button-toolbar[disabled="true"]:hover:active > .button-internal-box,
.button-toolbar[toggled="true"]:hover:active > .button-internal-box {
padding: 1px 2px 1px 2px;
vertical-align: middle;
}
.button-toolbar[label] > .button-internal-box > .button-icon {

Просмотреть файл

@ -33,6 +33,11 @@ menubutton.button-toolbar {
-moz-binding: url("chrome://communicator/skin/widgetBindings.xml#menubutton-toolbar-single");
}
.button-toolbar > .menubutton-toolbar-single-internal-box
{
vertical-align: middle;
}
.menubutton-internal-box,
.button-toolbar[disabled="true"]:hover > .menubutton-internal-box,
.button-toolbar-4[disabled="true"]:hover > .menubutton-internal-box,

Просмотреть файл

@ -56,4 +56,19 @@
</content>
</binding>
<binding id="menubutton-toolbar-single-ile" extends="chrome://global/content/xulBindings.xml#inline-edit-base" display="xul:menu">
<content>
<xul:hbox class="menubutton-toolbar-single-internal-box" flex="1" autostretch="never">
<xul:image class="menubutton-toolbar-single-icon" inherits="src,disabled"/>
<xul:hbox class="menubutton-toolbar-single-ile-text-container"
flex="1" ileattr="text-container" autostretch="never">
<xul:text class="menubutton-toolbar-single-ile-text"
inherits="value=label,accesskey,crop,disabled,dragover-top"
ileattr="text" rootcontent="menubutton" flex="1"/>
</xul:hbox>
</xul:hbox>
<children includes="menupopup"/>
</content>
</binding>
</bindings>

Просмотреть файл

@ -31,6 +31,7 @@ Contributor(s): ______________________________________. -->
<?xul-overlay href="chrome://communicator/content/securityOverlay.xul"?>
<?xul-overlay href="chrome://communicator/content/communicatorOverlay.xul"?>
<?xul-overlay href="chrome://communicator/content/contentAreaContextOverlay.xul"?>
<?xul-overlay href="chrome://communicator/content/bookmarks/bookmarksOverlay.xul"?>
<!DOCTYPE window [
<!ENTITY % brandDTD SYSTEM "chrome://global/locale/brand.dtd" >
@ -54,31 +55,39 @@ Contributor(s): ______________________________________. -->
screenX="10" screenY="10"
persist="screenX screenY width height sizemode">
<script type="application/x-javascript" src="chrome://global/content/nsJSSupportsUtils.js"/>
<script type="application/x-javascript" src="chrome://global/content/nsUserSettings.js"/>
<script type="application/x-javascript" src="chrome://global/content/nsTransferable.js"/>
<script type="application/x-javascript" src="chrome://global/content/nsClipboard.js"/>
<script type="application/x-javascript" src="chrome://global/content/nsDragAndDrop.js"/>
<script type="application/x-javascript" src="chrome://global/content/strres.js"/>
<script type="application/x-javascript" src="chrome://communicator/content/contentAreaClick.js"/>
<script type="application/x-javascript" src="chrome://communicator/content/contentAreaDD.js"/>
<script type="application/x-javascript" src="chrome://communicator/content/bookmarks/bookmarksOverlay.js"/>
<script type="application/x-javascript" src="chrome://navigator/content/navigator.js"/>
<script type="application/x-javascript" src="chrome://navigator/content/nsBrowserStatusHandler.js"/>
<script type="application/x-javascript" src="tooltip.js"/>
<script type="application/x-javascript" src="navigatorDD.js"/>
<!-- UI services -->
<script type="application/x-javascript" src="chrome://navigator/content/sessionHistoryUI.js"/>
<!-- Generic Utility -->
<script type="application/x-javascript" src="chrome://global/content/nsJSSupportsUtils.js"/>
<script type="application/x-javascript" src="chrome://global/content/nsJSComponentManager.js"/>
<script type="application/x-javascript" src="chrome://global/content/nsUserSettings.js"/>
<script type="application/x-javascript" src="chrome://global/content/nsTransferable.js"/>
<script type="application/x-javascript" src="chrome://global/content/nsClipboard.js"/>
<script type="application/x-javascript" src="chrome://global/content/nsDragAndDrop.js"/>
<script type="application/x-javascript" src="chrome://global/content/strres.js"/>
<!-- Content Area -->
<script type="application/x-javascript" src="chrome://navigator/content/nsBrowserStatusHandler.js"/>
<script type="application/x-javascript" src="chrome://communicator/content/contentAreaClick.js"/>
<script type="application/x-javascript" src="chrome://communicator/content/contentAreaDD.js"/>
<!-- Shared Bookmarks Utility Library -->
<script type="application/x-javascript" src="chrome://communicator/content/bookmarks/bookmarksOverlay.js"/>
<script type="application/x-javascript" src="chrome://navigator/content/personalToolbar.js"/>
<!-- Navigator -->
<script type="application/x-javascript" src="chrome://navigator/content/navigator.js"/>
<script type="application/x-javascript" src="tooltip.js"/>
<script type="application/x-javascript" src="navigatorDD.js"/>
<script type="application/x-javascript" src="chrome://navigator/content/sessionHistoryUI.js"/>
<!-- hook for stringbundle overlays -->
<stringbundleset id="navStringBundles">
<stringbundleset id="stringbundleset">
<stringbundle id="bundle_navigator" src="chrome://navigator/locale/navigator.properties"/>
<stringbundle id="bundle_brand" src="chrome://global/locale/brand.properties"/>
<stringbundle id="bundle_navigator_region" src="chrome://navigator-region/locale/region.properties"/>
<stringbundle id="bundle_brand_region" src="chrome://global-region/locale/region.properties"/>
</stringbundleset>
<commandset id="navCommands">
<commandset id="commands">
<commandset id="globalEditMenuItems"/>
<commandset id="selectEditMenuItems"/>
<commandset id="undoEditMenuItems"/>
@ -101,18 +110,18 @@ Contributor(s): ______________________________________. -->
<popup id="aHTMLTooltip" class="tooltip" oncreate="return FillInHTMLTooltip(document.tooltipNode);" >
<box id="HTML_TOOLTIP_tooltipBox" orient="vertical"/>
</popup>
</popupset>
<popupset id="popupset">
<popup id="backMenu" oncreate="BrowserBackMenu(event);" oncommand="gotoHistoryIndex(event);"/>
<popup id="forwardMenu" oncreate="BrowserForwardMenu(event);" oncommand="gotoHistoryIndex(event);"/>
<popup id="contextual" oncreate="return fillContextMenu('contextual', 'innermostBox');" >
<menu />
</popup>
<!-- context menu -->
<popupset id="contentAreaContextSet"/>
<!-- tooltips -->
<popupset id="aTooltipSet"/>
</popupset>
<!-- context menu -->
<popupset id="contentAreaContextSet"/>
<!-- tooltips -->
<popupset id="aTooltipSet"/>
<script type="application/x-javascript">
var gBookmarkPopup = null;
@ -191,97 +200,109 @@ Contributor(s): ______________________________________. -->
grippytooltip="aTooltip" grippytooltiptext="&personalBar.tooltip;"
tbautostretch="always">
<button class="button-toolbar bookmark-item" id="home-button" label="&homeButton.label;"
tooltip="aTooltip" persist="hidden"
ondraggesture="nsDragAndDrop.startDrag(event, homeButtonObserver);"
ondragover="nsDragAndDrop.dragOver(event, homeButtonObserver);"
ondragdrop="nsDragAndDrop.drop(event, homeButtonObserver);"
ondragexit="nsDragAndDrop.dragExit(event, homeButtonObserver);"
oncommand="BrowserHome(); event.preventBubble();"/>
<!-- "Bookmarks" button on personal toolbar -->
<menubutton class="button-toolbar bookmark-item" id="bookmarks-button"
persist="hidden" label="&bookmarksButton.label;" hidden="false"
datasources="rdf:bookmarks rdf:files rdf:localsearch rdf:internetsearch rdf:httpindex"
ref="NC:BookmarksRoot" container="true" flags="dont-test-empty"
oncommand="OpenBookmarkURL(event.target,document.getElementById('BookmarksMenu').database)" >
<template>
<rule iscontainer="true">
<menupopup>
<menu class="menu-iconic bookmark-item" uri="rdf:*"
label="rdf:http://home.netscape.com/NC-rdf#Name" >
<menupopup/>
</menu>
</menupopup>
</rule>
<rule rdf:type="http://home.netscape.com/NC-rdf#BookmarkSeparator">
<menupopup>
<menuseparator uri="rdf:*"/>
</menupopup>
</rule>
<rule>
<menupopup>
<menuitem class="menuitem-iconic bookmark-item" uri="rdf:*"
label="rdf:http://home.netscape.com/NC-rdf#Name" />
</menupopup>
</rule>
</template>
oncommand="OpenBookmarkURL(event.target,document.getElementById('BookmarksMenu').database)"
template="bookmarksMenuTemplate">
<menupopup>
<menuitem label="&addCurPageCmd.label;" accesskey="&addCurPageCmd.accesskey;"
key="addBookmarkKb" command="Browser:AddBookmark"/>
<menuitem label="&manBookmarksCmd.label;" accesskey="&manBookmarksCmd.accesskey;"
key="manBookmarkKb" command="Browser:ManageBookmark"/>
<menuitem accesskey="&addCurPageCmd.accesskey;" key="addBookmarkKb" observes="Browser:AddBookmark"/>
<menuitem accesskey="&addCurPageAsCmd.accesskey;" key="addBookmarkAsKb" observes="Browser:AddBookmarkAs"/>
<menuseparator/>
<menuitem accesskey="&manBookmarksCmd.accesskey;" key="manBookmarkKb" observes="Browser:ManageBookmark"/>
<menuseparator/>
</menupopup>
</menubutton>
<toolbarseparator/>
<!-- Personal toolbar items -->
<hbox id="innermostBox" flex="1" style="min-width: 1px;" context="contextual"
<hbox id="innermostBox" flex="1" style="min-width: 1px;" context="bmContext"
datasources="rdf:bookmarks rdf:files rdf:localsearch rdf:internetsearch rdf:httpindex"
ref="NC:PersonalToolbarFolder" flags="dont-test-empty"
type="http://home.netscape.com/NC-rdf#Folder"
oncommand="OpenBookmarkURL(event.target, document.getElementById('innermostBox').database)">
<template>
<rule parent="hbox" rdf:type="http://home.netscape.com/NC-rdf#BookmarkSeparator">
<toolbarseparator uri="rdf:*"
type="rdf:http://www.w3.org/1999/02/22-rdf-syntax-ns#type"/>
</rule>
<!-- yes, the type attribute is necessary otherwise all leaves are
treated as containers for some reason -->
<rule parent="hbox" iscontainer="true" isempty="true"
rdf:type="http://home.netscape.com/NC-rdf#Folder">
<menubutton class="button-toolbar bookmark-item" uri="rdf:*" editable="true"
type="rdf:http://www.w3.org/1999/02/22-rdf-syntax-ns#type"
label="rdf:http://home.netscape.com/NC-rdf#Name">
<menupopup>
<menuitem label="&emptyItem.label;" disabled="true"/>
</menupopup>
</menubutton>
</rule>
<rule parent="hbox" iscontainer="true">
<menubutton class="button-toolbar bookmark-item" uri="rdf:*"
tooltip="aTooltip" tooltiptext="rdf:http://home.netscape.com/NC-rdf#URL"
<menubutton class="button-toolbar bookmark-item" uri="rdf:*" editable="true"
type="rdf:http://www.w3.org/1999/02/22-rdf-syntax-ns#type"
label="rdf:http://home.netscape.com/NC-rdf#Name">
<menupopup/>
</menubutton>
</rule>
<rule parent="hbox" rdf:type="http://home.netscape.com/NC-rdf#BookmarkSeparator">
<toolbarseparator uri="rdf:*"/>
<rule parent="hbox">
<button class="button-toolbar bookmark-item" uri="rdf:*" editable="true"
tooltip="aTooltip" tooltiptext="rdf:http://home.netscape.com/NC-rdf#URL"
type="rdf:http://www.w3.org/1999/02/22-rdf-syntax-ns#type"
label="rdf:http://home.netscape.com/NC-rdf#Name" crop="right"/>
</rule>
<rule parent="hbox">
<button class="button-toolbar bookmark-item" uri="rdf:*"
tooltip="aTooltip" tooltiptext="rdf:http://home.netscape.com/NC-rdf#URL"
label="rdf:http://home.netscape.com/NC-rdf#Name" crop="right"/>
<rule iscontainer="true" isempty="true"
rdf:type="http://home.netscape.com/NC-rdf#Folder">
<menupopup>
<menu class="menu-iconic bookmark-item" uri="rdf:*"
type="rdf:http://www.w3.org/1999/02/22-rdf-syntax-ns#type"
label="rdf:http://home.netscape.com/NC-rdf#Name">
<menupopup>
<menuitem label="&emptyItem.label;" disabled="true"/>
</menupopup>
</menu>
</menupopup>
</rule>
<rule iscontainer="true">
<menupopup>
<menu class="menu-iconic bookmark-item" uri="rdf:*"
type="rdf:http://www.w3.org/1999/02/22-rdf-syntax-ns#type"
label="rdf:http://home.netscape.com/NC-rdf#Name">
<menupopup/>
</menu>
</menupopup>
</rule>
<rule rdf:type="http://home.netscape.com/NC-rdf#BookmarkSeparator">
<menupopup>
<menuseparator uri="rdf:*" />
<menuseparator uri="rdf:*"
type="rdf:http://www.w3.org/1999/02/22-rdf-syntax-ns#type"/>
</menupopup>
</rule>
<rule>
<menupopup>
<menuitem class="menuitem-iconic bookmark-item" uri="rdf:*"
type="rdf:http://www.w3.org/1999/02/22-rdf-syntax-ns#type"
label="rdf:http://home.netscape.com/NC-rdf#Name"/>
</menupopup>
</rule>
</template>
<button class="button-toolbar bookmark-item" id="home-button" label="&homeButton.label;"
tooltip="aTooltip" persist="hidden"
ondraggesture="nsDragAndDrop.startDrag(event, homeButtonObserver);"
ondragover="nsDragAndDrop.dragOver(event, homeButtonObserver);"
ondragdrop="nsDragAndDrop.drop(event, homeButtonObserver);"
ondragexit="nsDragAndDrop.dragExit(event, homeButtonObserver);"
oncommand="BrowserHome(); event.preventBubble();"/>
<toolbarseparator/>
</hbox>
</toolbar>

Просмотреть файл

@ -43,127 +43,130 @@
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
<stringbundleset id="navStringBundles">
<stringbundle id="bundle_viewZoom"/>
</stringbundleset>
<stringbundleset id="stringbundleset">
<stringbundle id="bundle_viewZoom"/>
</stringbundleset>
<!-- Keysets -->
<keyset id="navKeys">
<!-- File Menu -->
<key id="key_newNavigator"/>
<key id="key_newBlankPage"/>
<key id="focusURLBar" key="&openCmd.commandkey;" oncommand="ShowAndSelectContentsOfURLBar();"
modifiers="accel"/>
<key id="openLocationKb" key="&openCmd.commandkey;" command="Browser:Open" modifiers="accel,shift"/>
<key id="openFileKb" key="&openFileCmd.commandkey;" command="Browser:OpenFile" modifiers="accel"/>
<key id="key_savePage" key="&savePageCmd.commandkey;" command="Browser:SavePage" modifiers="accel"/>
<key id="key_editPage" key="&editPageCmd.commandkey;" command="Browser:EditPage" modifiers="accel"/>
<key id="printKb" key="&printCmd.commandkey;" command="Browser:Print" modifiers="accel"/>
<key id="key_close"/>
<key id="key_quit"/>
<!-- Keysets -->
<keyset id="navKeys">
<!-- File Menu -->
<key id="key_newNavigator"/>
<key id="key_newBlankPage"/>
<key id="focusURLBar" key="&openCmd.commandkey;" oncommand="ShowAndSelectContentsOfURLBar();"
modifiers="accel"/>
<key id="openLocationKb" key="&openCmd.commandkey;" command="Browser:Open" modifiers="accel,shift"/>
<key id="openFileKb" key="&openFileCmd.commandkey;" command="Browser:OpenFile" modifiers="accel"/>
<key id="key_savePage" key="&savePageCmd.commandkey;" command="Browser:SavePage" modifiers="accel"/>
<key id="key_editPage" key="&editPageCmd.commandkey;" command="Browser:EditPage" modifiers="accel"/>
<key id="printKb" key="&printCmd.commandkey;" command="Browser:Print" modifiers="accel"/>
<key id="key_close"/>
<key id="key_quit"/>
<!-- Edit Menu -->
<key id="key_undo"/>
<key id="key_redo"/>
<key id="key_cut"/>
<key id="key_copy"/>
<key id="key_paste"/>
<key id="key_delete"/>
<key id="key_selectAll"/>
<!-- Edit Menu -->
<key id="key_undo"/>
<key id="key_redo"/>
<key id="key_cut"/>
<key id="key_copy"/>
<key id="key_paste"/>
<key id="key_delete"/>
<key id="key_selectAll"/>
<!-- View Menu -->
<key id="key_reload" key="&reloadCmd.commandkey;" oncommand="BrowserReload();" modifiers="accel"/>
<key key="&reloadCmd.commandkey;" oncommand="BrowserReloadSkipCache();" modifiers="accel,shift"/>
<key id="key_viewSource" key="&pageSourceCmd.commandkey;" command="View:PageSource" modifiers="accel"/>
<key id="key_viewInfo" key="&pageInfoCmd.commandkey;" command="View:PageInfo" modifiers="accel"/>
<!-- View Menu -->
<key id="key_reload" key="&reloadCmd.commandkey;" oncommand="BrowserReload();" modifiers="accel"/>
<key key="&reloadCmd.commandkey;" oncommand="BrowserReloadSkipCache();" modifiers="accel,shift"/>
<key id="key_viewSource" key="&pageSourceCmd.commandkey;" command="View:PageSource" modifiers="accel"/>
<key id="key_viewInfo" key="&pageInfoCmd.commandkey;" command="View:PageInfo" modifiers="accel"/>
<!-- Search Menu -->
<key id="key_find" key="&findOnCmd.commandkey;" command="Browser:Find" modifiers="accel"/>
<key id="key_findAgain" key="&findAgainCmd.commandkey;" command="Browser:FindAgain" modifiers="accel"/>
<!-- Search Menu -->
<key id="key_find" key="&findOnCmd.commandkey;" command="Browser:Find" modifiers="accel"/>
<key id="key_findAgain" key="&findAgainCmd.commandkey;" command="Browser:FindAgain" modifiers="accel"/>
<!-- Go Menu -->
<!-- Go Menu -->
<!-- Bookmarks Menu -->
<key id="addBookmarkKb" key="&addCurPageCmd.commandkey;" command="Browser:AddBookmark" modifiers="accel"/>
<key id="manBookmarkKb" key="&manBookmarksCmd.commandkey;" command="Browser:ManageBookmark" modifiers="accel"/>
<!-- Bookmarks Menu -->
<key id="addBookmarkKb" key="&addCurPageCmd.commandkey;" command="Browser:AddBookmark" modifiers="accel"/>
<key id="addBookmarkAsKb" key="&addCurPageCmd.commandkey;" command="Browser:AddBookmarkAs" modifiers="accel,shift"/>
<key id="manBookmarkKb" key="&manBookmarksCmd.commandkey;" command="Browser:ManageBookmark" modifiers="accel"/>
<!-- Misc -->
<key id="key_stop" keycode="VK_ESCAPE" oncommand="BrowserStop();"/>
<!-- the amazing fishcam dept. -->
<key key="f" modifiers="control,alt" oncommand="window._content.location.href='http://home.netscape.com/fishcam/fishcam.html'"/>
<keyset id="viewZoomKeys"/>
<keyset id="navigationKeys"/>
<keyset id="tasksKeys"/>
</keyset>
<!-- Misc -->
<key id="key_stop" keycode="VK_ESCAPE" oncommand="BrowserStop();"/>
<!-- the amazing fishcam dept. -->
<key key="f" modifiers="control,alt" oncommand="window._content.location.href='http://home.netscape.com/fishcam/fishcam.html'"/>
<keyset id="viewZoomKeys"/>
<keyset id="navigationKeys"/>
<keyset id="tasksKeys"/>
</keyset>
<commandset id="navCommands">
<command id="cmd_newNavigator"/>
<command id="cmd_newEditor"/>
<!-- NOT IMPLEMENTED
<command id="cmd_newEditorTemplate"/>
<command id="cmd_newEditorDraft"/>
<command id="Browser:PrintSetup" disabled ="true" oncommand=""/>
<command id="Browser:PrintPreview" disabled="true" oncommand=""/> -->
<command id="Browser:OpenFile" oncommand="BrowserOpenFileWindow();"/>
<command id="Browser:SavePage" oncommand="savePage();"/>
<command id="Browser:EditPage" oncommand="editPage(window._content.location.href,window, false);"/>
<command id="Browser:Open" oncommand="BrowserOpenWindow();"/>
<command id="Browser:Print" oncommand="BrowserPrint();"/>
<command id="cmd_quit"/>
<command id="cmd_close" oncommand="BrowserClose()"/>
<commandset id="commands">
<command id="cmd_newNavigator"/>
<command id="cmd_newEditor"/>
<!-- NOT IMPLEMENTED
<command id="cmd_newEditorTemplate"/>
<command id="cmd_newEditorDraft"/>
<command id="Browser:PrintSetup" disabled ="true" oncommand=""/>
<command id="Browser:PrintPreview" disabled="true" oncommand=""/> -->
<command id="Browser:OpenFile" oncommand="BrowserOpenFileWindow();"/>
<command id="Browser:SavePage" oncommand="savePage();"/>
<command id="Browser:EditPage" oncommand="editPage(window._content.location.href,window, false);"/>
<command id="Browser:Open" oncommand="BrowserOpenWindow();"/>
<command id="Browser:Print" oncommand="BrowserPrint();"/>
<command id="cmd_quit"/>
<command id="cmd_close" oncommand="BrowserClose()"/>
<!-- Edit Menu -->
<command id="cmd_undo"/>
<command id="cmd_redo"/>
<command id="cmd_cut"/>
<command id="cmd_copy"/>
<command id="cmd_paste"/>
<command id="cmd_delete"/>
<command id="cmd_selectAll"/>
<!-- Edit Menu -->
<command id="cmd_undo"/>
<command id="cmd_redo"/>
<command id="cmd_cut"/>
<command id="cmd_copy"/>
<command id="cmd_paste"/>
<command id="cmd_delete"/>
<command id="cmd_selectAll"/>
<!-- View Menu -->
<command id="View:PageSource" oncommand="BrowserViewSource();"/>
<command id="View:PageInfo" oncommand="BrowserPageInfo();"/>
<!-- View Menu -->
<command id="View:PageSource" oncommand="BrowserViewSource();"/>
<command id="View:PageInfo" oncommand="BrowserPageInfo();"/>
<!-- Search Menu -->
<command id="Browser:Find" oncommand="BrowserFind();" />
<command id="Browser:FindAgain" oncommand="BrowserFindAgain();" />
<!-- Search Menu -->
<command id="Browser:Find" oncommand="BrowserFind();" />
<command id="Browser:FindAgain" oncommand="BrowserFindAgain();" />
<!-- Bookmarks Menu -->
<command id="Browser:AddBookmark"
oncommand="BookmarksUtils.addBookmarkForBrowser(document.getElementById('content').webNavigation);"/>
<command id="Browser:ManageBookmark" oncommand="BrowserEditBookmarks();" />
<!-- Bookmarks Menu -->
<command id="Browser:AddBookmark" label="&addCurPageCmd.label;" accesskey="&addCurPageCmd.accesskey;"
oncommand="BookmarksUtils.addBookmarkForBrowser(document.getElementById('content').webNavigation, false);"/>
<command id="Browser:AddBookmarkAs" label="&addCurPageAsCmd.label;" accesskey="&addCurPageAsCmd.accesskey;"
oncommand="BookmarksUtils.addBookmarkForBrowser(document.getElementById('content').webNavigation, true);"/>
<command id="Browser:ManageBookmark" label="&manBookmarksCmd.label;" accesskey="&manBookmarksCmd.accesskey;"
oncommand="BrowserEditBookmarks();" />
<!-- Go Menu -->
<command id="Browser:Home" oncommand="BrowserHome();"/>
<command id="Browser:Back" oncommand="BrowserBack();" observes="canGoBack"/>
<command id="Browser:Forward" oncommand="BrowserForward();" observes="canGoForward"/>
<commandset id="viewZoomCommands"/>
<commandset id="tasksCommands"/>
</commandset>
<!-- Go Menu -->
<command id="Browser:Home" oncommand="BrowserHome();"/>
<command id="Browser:Back" oncommand="BrowserBack();" observes="canGoBack"/>
<command id="Browser:Forward" oncommand="BrowserForward();" observes="canGoForward"/>
<commandset id="viewZoomCommands"/>
<commandset id="tasksCommands"/>
</commandset>
<broadcasterset id="navBroadcasters">
<broadcaster id="canGoBack" disabled="true"/>
<broadcaster id="canGoForward" disabled="true"/>
<broadcaster id="Communicator:WorkMode"/>
<broadcaster id="cmd_viewnavbar" oncommand="goToggleToolbar( 'nav-bar','cmd_viewnavbar');" checked="true"/>
<broadcaster id="cmd_viewpersonaltoolbar" oncommand="goToggleToolbar('PersonalToolbar','cmd_viewpersonaltoolbar');" checked="true"/>
<broadcaster id="cmd_viewtaskbar" oncommand="goToggleToolbar('taskbar','cmd_viewtaskbar');" checked="true"/>
<broadcasterset id="navBroadcasters">
<broadcaster id="canGoBack" disabled="true"/>
<broadcaster id="canGoForward" disabled="true"/>
<broadcaster id="Communicator:WorkMode"/>
<broadcaster id="cmd_viewnavbar" oncommand="goToggleToolbar( 'nav-bar','cmd_viewnavbar');" checked="true"/>
<broadcaster id="cmd_viewpersonaltoolbar" oncommand="goToggleToolbar('PersonalToolbar','cmd_viewpersonaltoolbar');" checked="true"/>
<broadcaster id="cmd_viewtaskbar" oncommand="goToggleToolbar('taskbar','cmd_viewtaskbar');" checked="true"/>
</broadcasterset>
</broadcasterset>
<!-- Menu -->
<menubar id="main-menubar" class="chromeclass-menubar">
<menu id="menu_File">
<menupopup id="menu_FilePopup">
<menuitem label="&browserCmd.label;" accesskey="&browserCmd.accesskey;" key="key_newNavigator" command="cmd_newNavigator"/>
<menu id="menu_New">
<menupopup id="menu_NewPopup">
<!-- From globalOverlay.xul -->
<menuitem id="menu_newNavigator" command="cmd_newNavigator"/>
<menuitem id="menu_newEditor" command="cmd_newEditor"/>
</menupopup>
</menu>
<!-- Menu -->
<menubar id="main-menubar" class="chromeclass-menubar">
<menu id="menu_File">
<menupopup id="menu_FilePopup">
<menuitem label="&browserCmd.label;" accesskey="&browserCmd.accesskey;" key="key_newNavigator" command="cmd_newNavigator"/>
<menu id="menu_New">
<menupopup id="menu_NewPopup">
<!-- From globalOverlay.xul -->
<menuitem id="menu_newNavigator" command="cmd_newNavigator"/>
<menuitem id="menu_newEditor" command="cmd_newEditor"/>
</menupopup>
</menu>
<menuitem label="&openCmd.label;" accesskey="&openCmd.accesskey;" key="openLocationKb" command="Browser:Open"/>
<menuitem label="&openFileCmd.label;" accesskey="&openFileCmd.accesskey;" key="openFileKb" command="Browser:OpenFile"/>
<menuseparator/>
@ -173,161 +176,169 @@
<menuseparator/>
<menuitem label="&editPageCmd.label;" accesskey="&editPageCmd.accesskey;" key="key_editPage" command="Browser:EditPage" />
<menuseparator/>
<!-- NOT IMPLEMENTED
<menuitem label="&printSetupCmd.label;" accesskey="&printSetupCmd.accesskey;" command="Browser:PrintSetup"/>
<menuitem label="&printPreviewCmd.label;" accesskey="&printPreviewCmd.accesskey;" command="Browser:PrintPreview"/> -->
<menuitem label="&printCmd.label;" accesskey="&printCmd.accesskey;" key="printKb" command="Browser:Print"/>
<menuseparator />
<menuitem id="offlineGoOfflineCmd"/>
<menuseparator />
</menupopup>
</menu>
</menupopup>
</menu>
<menu id="menu_Edit">
<menupopup id="menu_Edit_Popup">
<menuitem id="menu_undo"/>
<menuitem id="menu_redo"/>
<menuseparator/>
<menuitem id="menu_cut"/>
<menuitem id="menu_copy"/>
<menuitem id="menu_paste"/>
<menuitem id="menu_delete"/>
<menuseparator/>
<menuitem id="menu_selectAll"/>
<menuseparator />
<menuitem id="menu_preferences" oncommand="goPreferences('navigator.xul', 'chrome://communicator/content/pref/pref-navigator.xul', 'navigator')"/>
</menupopup>
</menu>
<menu id="menu_Edit">
<menupopup id="menu_Edit_Popup">
<menuitem id="menu_undo"/>
<menuitem id="menu_redo"/>
<menuseparator/>
<menuitem id="menu_cut"/>
<menuitem id="menu_copy"/>
<menuitem id="menu_paste"/>
<menuitem id="menu_delete"/>
<menuseparator/>
<menuitem id="menu_selectAll"/>
<menuseparator />
<menuitem id="menu_preferences" oncommand="goPreferences('navigator.xul', 'chrome://communicator/content/pref/pref-navigator.xul', 'navigator')"/>
</menupopup>
</menu>
<menu id="menu_View" accesskey="&viewMenu.accesskey;" label="&viewMenu.label;">
<menupopup id="menu_View_Popup">
<menu label="&toolbarsCmd.label;" accesskey="&toolbarsCmd.accesskey;" id="view_toolbars">
<menupopup id="view_toolbars_popup">
<menuitem label="&navbarCmd.label;" accesskey="&navbarCmd.accesskey;" class="menuitem-iconic" type="checkbox" observes="cmd_viewnavbar" />
<menuitem label="&personalbarCmd.label;" accesskey="&personalbarCmd.accesskey;" class="menuitem-iconic" type="checkbox" observes="cmd_viewpersonaltoolbar" />
<menuitem label="&taskbarCmd.label;" accesskey="&taskbarCmd.accesskey;" class="menuitem-iconic" type="checkbox" observes="cmd_viewtaskbar" />
</menupopup>
</menu>
<menuseparator />
<!-- overlayed from viewZoomOverlay.xul -->
<menu id="menu_textZoom"/>
<menu label="&useStyleSheetMenu.label;" accesskey="&useStyleSheetMenu.accesskey;" disabled="false">
<menupopup oncreate="stylesheetFillPopup(window._content.document, this, document.getElementById('authssnoopt'))">
<menuitem label="&useStyleSheetNone.label;" id="authssnoopt" type="radio" name="authorstyle" oncommand="stylesheetSwitch(window._content.document, '')"/>
</menupopup>
</menu>
<menuseparator />
<menuitem accesskey="&reloadCmd.accesskey;" key="key_reload" label="&reloadCmd.label;" oncommand="BrowserReload();"/>
<menuitem label="&showImagesCmd.label;" accesskey="&showImagesCmd.accesskey;" disabled="true" oncommand="BrowserReload();"/>
<menuitem label="&stopCmd.label;" accesskey="&stopCmd.accesskey;" id="menuitem-stop" oncommand="BrowserStop();" key="key_stop"/>
<menuseparator />
<menuitem accesskey="&pageSourceCmd.accesskey;" label="&pageSourceCmd.label;" key="key_viewSource" command="View:PageSource"/>
<menuitem accesskey="&pageInfoCmd.accesskey;" label="&pageInfoCmd.label;" key="key_viewInfo" command="View:PageInfo"/>
<menuseparator />
<menuitem accesskey="&translateMenu.accesskey;" label="&translateMenu.label;" oncommand="Translate();"/>
<menu label="&webContentMenu.label;"
accesskey="&webContentMenu.accesskey;"
datasources="rdf:chrome"
ref="urn:mozilla:locale:root"
sortResource="http://www.mozilla.org/rdf/chrome#name"
sortDirection="ascending"
oncommand="selectLocale(event)">
<menupopup>
<menuitem label="&downloadMore.label;"
accesskey="&downloadMore.accesskey;"
oncommand="loadXURL('urn:clienturl:viewmenu:intlwebcontent');"/>
<menuseparator />
</menupopup>
<template>
<rule>
<menupopup>
<menuitem class="standard" uri="rdf:*"
label="rdf:http://www.mozilla.org/rdf/chrome#displayName"
value="rdf:http://www.mozilla.org/rdf/chrome#name"
/>
</menupopup>
</rule>
</template>
</menu>
<menu id = "charsetMenu" />
<menuseparator/>
<menu label="&applyTheme.label;"
accesskey="&applyTheme.accesskey;">
<menupopup datasources="rdf:chrome" ref="urn:mozilla:skin:root" oncommand="applyTheme(event.target)">
<menuitem label="&themePreferencesCmd.label;" accesskey="&themePreferencesCmd.accesskey;"
oncommand="goPreferences('pref-themes.xul','chrome://communicator/content/pref/pref-themes.xul')"/>
<menuitem label="&getNewThemesCmd.label;" accesskey="&getNewThemesCmd.accesskey;" oncommand="getNewThemes();"/>
<menuseparator/>
<template>
<menuitem uri="..." label="rdf:http://www.mozilla.org/rdf/chrome#displayName" name="rdf:http://www.mozilla.org/rdf/chrome#name"/>
</template>
</menupopup>
</menu>
</menupopup>
</menu>
<menu accesskey="&searchMenu.accesskey;" label="&searchMenu.label;">
<menupopup>
<menuitem label="&findOnCmd.label;" accesskey="&findOnCmd.accesskey;" key="key_find" command="Browser:Find"/>
<menuitem label="&findAgainCmd.label;" accesskey="&findAgainCmd.accesskey;" key="key_findAgain" command="Browser:FindAgain"/>
<menuseparator />
<menuitem label="&searchInternetCmd.label;" accesskey="&searchInternetCmd.accesskey;" oncommand="loadXURL('urn:clienturl:srchmenu:srchinternet');"/>
<menuitem label="&searchBookmarksHistoryCmd.label;" accesskey="&searchBookmarksHistoryCmd.accesskey;" oncommand="window.openDialog('chrome://communicator/content/bookmarks/bm-find.xul', 'FindBookmarksWindow', 'dialog=no,close,chrome,resizable', 'bookmarks');"/>
<menuseparator />
<menu label="&searchOptions.label;">
<menupopup>
<menuitem id="simpleSearch" type="radio" label="&simpleMode.label;" oncommand="setBrowserSearchMode(0);" />
<menuitem id="advancedSearch" type="radio" label="&advancedMode.label;" oncommand="setBrowserSearchMode(1);" />
<menu id="menu_View" accesskey="&viewMenu.accesskey;" label="&viewMenu.label;">
<menupopup id="menu_View_Popup">
<menu label="&toolbarsCmd.label;" accesskey="&toolbarsCmd.accesskey;" id="view_toolbars">
<menupopup id="view_toolbars_popup">
<menuitem label="&navbarCmd.label;" accesskey="&navbarCmd.accesskey;" class="menuitem-iconic" type="checkbox" observes="cmd_viewnavbar" />
<menuitem label="&personalbarCmd.label;" accesskey="&personalbarCmd.accesskey;" class="menuitem-iconic" type="checkbox" observes="cmd_viewpersonaltoolbar" />
<menuitem label="&taskbarCmd.label;" accesskey="&taskbarCmd.accesskey;" class="menuitem-iconic" type="checkbox" observes="cmd_viewtaskbar" />
</menupopup>
</menu>
</menupopup>
</menu>
<menu accesskey="&goMenu.accesskey;" label="&goMenu.label;" oncommand="gotoHistoryIndex(event);">
<menupopup oncreate="updateGoMenu(event);">
<menuitem label="&goBackCmd.label;" accesskey="&goBackCmd.accesskey;" key="goBackKb" command="Browser:Back"/>
<menuitem label="&goForwardCmd.label;" accesskey="&goForwardCmd.accesskey;" key="goForwardKb" command="Browser:Forward"/>
<menuitem label="&goHomeCmd.label;" accesskey="&goHomeCmd.accesskey;" command="Browser:Home" key="goHome"/>
<menuseparator hidden="true"/>
</menupopup>
</menu>
</menu>
<menuseparator />
<menu accesskey="&bookmarksMenu.accesskey;" label="&bookmarksMenu.label;"
datasources="rdf:bookmarks rdf:files rdf:localsearch rdf:internetsearch" id="BookmarksMenu" ref="NC:BookmarksRoot" flags="dont-test-empty" oncommand="OpenBookmarkURL(event.target, document.getElementById('BookmarksMenu').database)">
<template>
<rule iscontainer="true">
<menupopup>
<menu class="menu-iconic bookmark-item" uri="rdf:*" label="rdf:http://home.netscape.com/NC-rdf#Name">
<menupopup />
</menu>
</menupopup>
</rule>
<rule rdf:type="http://home.netscape.com/NC-rdf#BookmarkSeparator">
<menupopup>
<menuseparator uri="rdf:*" />
</menupopup>
</rule>
<rule>
<menupopup>
<menuitem class="menuitem-iconic bookmark-item" uri="rdf:*" label="rdf:http://home.netscape.com/NC-rdf#Name" />
</menupopup>
</rule>
</template>
<menupopup>
<menuitem label="&addCurPageCmd.label;" accesskey="&addCurPageCmd.accesskey;" key="addBookmarkKb" command="Browser:AddBookmark"/>
<menuitem label="&manBookmarksCmd.label;" accesskey="&manBookmarksCmd.accesskey;" key="manBookmarkKb" command="Browser:ManageBookmark"/>
<menuseparator/>
</menupopup>
<!-- overlayed from viewZoomOverlay.xul -->
<menu id="menu_textZoom"/>
<menu label="&useStyleSheetMenu.label;" accesskey="&useStyleSheetMenu.accesskey;" disabled="false">
<menupopup oncreate="stylesheetFillPopup(window._content.document, this, document.getElementById('authssnoopt'))">
<menuitem label="&useStyleSheetNone.label;" id="authssnoopt" type="radio" name="authorstyle" oncommand="stylesheetSwitch(window._content.document, '')"/>
</menupopup>
</menu>
<menuseparator />
<menuitem accesskey="&reloadCmd.accesskey;" key="key_reload" label="&reloadCmd.label;" oncommand="BrowserReload();"/>
<menuitem label="&showImagesCmd.label;" accesskey="&showImagesCmd.accesskey;" disabled="true" oncommand="BrowserReload();"/>
<menuitem label="&stopCmd.label;" accesskey="&stopCmd.accesskey;" id="menuitem-stop" oncommand="BrowserStop();" key="key_stop"/>
<menuseparator />
<menuitem accesskey="&pageSourceCmd.accesskey;" label="&pageSourceCmd.label;" key="key_viewSource" command="View:PageSource"/>
<menuitem accesskey="&pageInfoCmd.accesskey;" label="&pageInfoCmd.label;" key="key_viewInfo" command="View:PageInfo"/>
<menuseparator />
<menuitem accesskey="&translateMenu.accesskey;" label="&translateMenu.label;" oncommand="Translate();"/>
<menu label="&webContentMenu.label;" accesskey="&webContentMenu.accesskey;"
datasources="rdf:chrome" ref="urn:mozilla:locale:root"
sortResource="http://www.mozilla.org/rdf/chrome#name"
sortDirection="ascending" oncommand="selectLocale(event)">
<menupopup>
<menuitem label="&downloadMore.label;" accesskey="&downloadMore.accesskey;"
oncommand="loadXURL('urn:clienturl:viewmenu:intlwebcontent');"/>
<menuseparator/>
</menupopup>
<template>
<rule>
<menupopup>
<menuitem class="standard" uri="rdf:*"
label="rdf:http://www.mozilla.org/rdf/chrome#displayName"
value="rdf:http://www.mozilla.org/rdf/chrome#name"/>
</menupopup>
</rule>
</template>
</menu>
<menu id = "charsetMenu" />
<menuseparator/>
<menu label="&applyTheme.label;" accesskey="&applyTheme.accesskey;">
<menupopup datasources="rdf:chrome" ref="urn:mozilla:skin:root" oncommand="applyTheme(event.target)">
<menuitem label="&themePreferencesCmd.label;" accesskey="&themePreferencesCmd.accesskey;"
oncommand="goPreferences('pref-themes.xul','chrome://communicator/content/pref/pref-themes.xul')"/>
<menuitem label="&getNewThemesCmd.label;" accesskey="&getNewThemesCmd.accesskey;" oncommand="getNewThemes();"/>
<menuseparator/>
<template>
<menuitem uri="..." label="rdf:http://www.mozilla.org/rdf/chrome#displayName" name="rdf:http://www.mozilla.org/rdf/chrome#name"/>
</template>
</menupopup>
</menu>
</menupopup>
</menu>
<menu accesskey="&searchMenu.accesskey;" label="&searchMenu.label;">
<menupopup>
<menuitem label="&findOnCmd.label;" accesskey="&findOnCmd.accesskey;" key="key_find" command="Browser:Find"/>
<menuitem label="&findAgainCmd.label;" accesskey="&findAgainCmd.accesskey;" key="key_findAgain" command="Browser:FindAgain"/>
<menuseparator />
<menuitem label="&searchInternetCmd.label;" accesskey="&searchInternetCmd.accesskey;" oncommand="loadXURL('urn:clienturl:srchmenu:srchinternet');"/>
<menuitem label="&searchBookmarksHistoryCmd.label;" accesskey="&searchBookmarksHistoryCmd.accesskey;" oncommand="window.openDialog('chrome://communicator/content/bookmarks/bm-find.xul', 'FindBookmarksWindow', 'dialog=no,close,chrome,resizable', 'bookmarks');"/>
<menuseparator />
<menu label="&searchOptions.label;">
<menupopup>
<menuitem id="simpleSearch" type="radio" label="&simpleMode.label;" oncommand="setBrowserSearchMode(0);" />
<menuitem id="advancedSearch" type="radio" label="&advancedMode.label;" oncommand="setBrowserSearchMode(1);" />
</menupopup>
</menu>
</menupopup>
</menu>
<menu accesskey="&goMenu.accesskey;" label="&goMenu.label;" oncommand="gotoHistoryIndex(event);">
<menupopup oncreate="updateGoMenu(event);">
<menuitem label="&goBackCmd.label;" accesskey="&goBackCmd.accesskey;" key="goBackKb" command="Browser:Back"/>
<menuitem label="&goForwardCmd.label;" accesskey="&goForwardCmd.accesskey;" key="goForwardKb" command="Browser:Forward"/>
<menuitem label="&goHomeCmd.label;" accesskey="&goHomeCmd.accesskey;" command="Browser:Home" key="goHome"/>
<menuseparator hidden="true"/>
</menupopup>
</menu>
<menu id="BookmarksMenu" label="&bookmarksMenu.label;" accesskey="&bookmarksMenu.accesskey;"
datasources="rdf:bookmarks rdf:localsearch rdf:internetsearch"
ref="NC:BookmarksRoot" flags="dont-test-empty" template="bookmarksMenuTemplate"
oncommand="OpenBookmarkURL(event.target, document.getElementById('BookmarksMenu').database)">
<template id="bookmarksMenuTemplate">
<rule iscontainer="true" isempty="true"
rdf:type="http://home.netscape.com/NC-rdf#Folder">
<menupopup>
<menu class="menu-iconic bookmark-item" uri="rdf:*"
type="rdf:http://www.w3.org/1999/02/22-rdf-syntax-ns#type"
label="rdf:http://home.netscape.com/NC-rdf#Name">
<menupopup>
<menuitem label="&emptyItem.label;" disabled="true"/>
</menupopup>
</menu>
</menupopup>
</rule>
<rule iscontainer="true">
<menupopup>
<menu class="menu-iconic bookmark-item" uri="rdf:*" label="rdf:http://home.netscape.com/NC-rdf#Name">
<menupopup />
</menu>
</menupopup>
</rule>
<rule rdf:type="http://home.netscape.com/NC-rdf#BookmarkSeparator">
<menupopup>
<menuseparator uri="rdf:*" />
</menupopup>
</rule>
<rule>
<menupopup>
<menuitem class="menuitem-iconic bookmark-item" uri="rdf:*" label="rdf:http://home.netscape.com/NC-rdf#Name" />
</menupopup>
</rule>
</template>
<menupopup>
<!-- for some reason these don't work as command="" -->
<menuitem key="addBookmarkKb" observes="Browser:AddBookmark"/>
<menuitem key="addBookmarkAsKb" observes="Browser:AddBookmarkAs"/>
<menuseparator/>
<menuitem key="manBookmarkKb" observes="Browser:ManageBookmark"/>
<menuseparator/>
</menupopup>
</menu>
<menu id="tasksMenu"/>
<menu accesskey="&helpMenuCmd.accesskey;" id="menu_Help"/>
// Menu for testing.
<!-- Menu for testing. -->
<menu id="debugMenu" accesskey="&debugMenu.accesskey;" label="&debugMenu.label;">
<menupopup>
<menu label="&debugVerCmd.label;">

Просмотреть файл

@ -0,0 +1,429 @@
/* -*- Mode: Java; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-
*
* The contents of this file are subject to the Netscape 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/NPL/
*
* 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 Netscape are
* Copyright (C) 1998 Netscape Communications Corporation. All
* Rights Reserved.
*
* Contributor(s):
* Ben Goodger <ben@netscape.com> (Original Author)
*/
var gBookmarksShell = null;
///////////////////////////////////////////////////////////////////////////////
// Class which defines methods for a bookmarks UI implementation based around
// a toolbar. Subclasses BookmarksBase in bookmarksOverlay.js. Some methods
// are required by the base class, others are for event handling. Window specific
// glue code should go into the BookmarksWindow class in bookmarks.js
function BookmarksToolbar (aID)
{
this.id = aID;
}
BookmarksToolbar.prototype = {
__proto__: BookmarksUIElement.prototype,
/////////////////////////////////////////////////////////////////////////////
// Personal Toolbar Specific Stuff
openNewWindow: false,
get db ()
{
return this.element.database;
},
get element ()
{
return document.getElementById(this.id);
},
/////////////////////////////////////////////////////////////////////////////
// This method constructs a menuitem for a context menu for the given command.
// This is implemented by the client so that it can intercept menuitem naming
// as appropriate.
createMenuItem: function (aDisplayName, aCommandName, aItemNode)
{
const kXULNS = "http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul";
var xulElement = document.createElementNS(kXULNS, "menuitem");
xulElement.setAttribute("cmd", aCommandName);
xulElement.setAttribute("command", "cmd_" + aCommandName.substring(NC_NS_CMD.length));
switch (aCommandName) {
case NC_NS_CMD + "open":
xulElement.setAttribute("label", aDisplayName);
xulElement.setAttribute("default", "true");
break;
case NC_NS_CMD + "openfolder":
xulElement.setAttribute("default", "true");
if (aItemNode.localName == "hbox")
// Don't show an "Open Folder" item for clicks on the toolbar itself.
return null;
default:
xulElement.setAttribute("label", aDisplayName);
break;
}
return xulElement;
},
// Command implementation
commands: {
openFolder: function (aSelectedItem)
{
var mbo = aSelectedItem.boxObject.QueryInterface(Components.interfaces.nsIMenuBoxObject);
mbo.openMenu(true);
},
editCell: function (aSelectedItem, aXXXLameAssIndex)
{
if (aSelectedItem.getAttribute("editable") != "true")
return;
var property = "http://home.netscape.com/NC-rdf#Name";
aSelectedItem.setMode("edit");
aSelectedItem.addObserver(this.postModifyCallback, "accept",
[gBookmarksShell, aSelectedItem, property]);
},
///////////////////////////////////////////////////////////////////////////
// Called after an inline-edit cell has left inline-edit mode, and data
// needs to be modified in the datasource.
postModifyCallback: function (aParams)
{
var aShell = aParams[0];
var selItemURI = NODE_ID(aParams[1]);
aShell.propertySet(selItemURI, aParams[2], aParams[3]);
},
///////////////////////////////////////////////////////////////////////////
// Creates a dummy item that can be placed in edit mode to retrieve data
// to create new bookmarks/folders.
createBookmarkItem: function (aMode, aSelectedItem)
{
const kXULNS = "http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul";
var dummyButton = document.createElementNS(kXULNS, "menubutton");
dummyButton = gBookmarksShell.createBookmarkFolderDecorations(dummyButton);
dummyButton.setAttribute("class", "button-toolbar bookmark-item");
dummyButton.setAttribute("label", gBookmarksShell.getLocaleString("ile_newfolder") + " ");
// By default, create adjacent to the selected button. If there is no button after
// the selected button, or the target is the toolbar itself, just append.
var bIsButton = aSelectedItem.localName == "button" || aSelectedItem.localName == "menubutton";
if (aSelectedItem.nextSibling && bIsButton)
aSelectedItem.parentNode.insertBefore(dummyButton, aSelectedItem.nextSibling);
else
(bIsButton ? aSelectedItem.parentNode : aSelectedItem).appendChild(dummyButton);
gBookmarksShell._focusElt = document.commandDispatcher.focusedElement;
dummyButton.setMode("edit");
// |aSelectedItem| will be the node we create the new folder relative to.
dummyButton.addObserver(this.onEditFolderName, "accept",
[dummyButton, aSelectedItem, dummyButton]);
dummyButton.addObserver(this.onEditFolderName, "reject",
[dummyButton, aSelectedItem, dummyButton]);
},
///////////////////////////////////////////////////////////////////////////
// Edit folder name & update the datasource if name is valid
onEditFolderName: function (aParams, aTopic)
{
// Because the toolbar has no concept of selection, this function
// is much simpler than the one in bookmarksTree.js. However it may
// become more complex if pink ever lets me put context menus on menus ;)
var name = aParams[3];
var dummyButton = aParams[2];
var relativeNode = aParams[1];
var parentNode = gBookmarksShell.findRDFNode(relativeNode, false);
dummyButton.parentNode.removeChild(dummyButton);
if (!gBookmarksShell.commands.validateNameAndTopic(name, aTopic, relativeNode, dummyButton))
return;
var parentNode = relativeNode.parentNode;
if (relativeNode.localName == "hbox") {
parentNode = relativeNode;
relativeNode = relativeNode.lastChild;
}
var args = [{ property: NC_NS + "parent",
resource: NODE_ID(parentNode) },
{ property: NC_NS + "Name",
literal: name }];
BookmarksUtils.doBookmarksCommand(NODE_ID(relativeNode),
NC_NS_CMD + "newfolder", args);
// We need to do this because somehow focus shifts and no commands
// operate any more.
gBookmarksShell._focusElt.focus();
},
///////////////////////////////////////////////////////////////////////////
// Performs simple validation on what the user has entered:
// 1) prevents entering an empty string
// 2) in the case of a canceled operation, remove the dummy item and
// restore selection.
validateNameAndTopic: function (aName, aTopic, aOldSelectedItem, aDummyItem)
{
// Don't allow user to enter an empty string "";
if (!aName) return false;
// If the user hit escape, go no further.
return !(aTopic == "reject");
}
},
_focusElt: null,
/////////////////////////////////////////////////////////////////////////////
// Evaluates an event to determine whether or not it affords opening a tree
// item. Typically, this is when the left mouse button is used, and provided
// the click-rate matches that specified by our owning tree class. For example,
// some trees open an item when double clicked (bookmarks/history windows) and
// others on a single click (sidebar panels).
isValidOpenEvent: function (aEvent)
{
return !(aEvent.type == "click" &&
(aEvent.button != 0 || aEvent.detail != this.openClickCount))
},
/////////////////////////////////////////////////////////////////////////////
// For the given selection, selects the best adjacent element. This method is
// useful when an action such as a cut or a deletion is performed on a
// selection, and focus/selection needs to be restored after the operation
// is performed.
getNextElement: function (aElement)
{
if (aElement.nextSibling)
return aElement.nextSibling;
else if (aElement.previousSibling)
return aElement.previousSibling;
else
return aElement.parentNode;
},
selectElement: function (aElement)
{
},
//////////////////////////////////////////////////////////////////////////////
// Add the treeitem element specified by aURI to the tree's current selection.
addItemToSelection: function (aURI)
{
},
/////////////////////////////////////////////////////////////////////////////
// Return a set of DOM nodes that represents the current item in the Bookmarks
// Toolbar. This is always |document.popupNode|.
getSelection: function ()
{
return [document.popupNode];
},
getBestItem: function ()
{
var seln = this.getSelection ();
if (seln.length < 1) {
var kids = ContentUtils.childByLocalName(this.tree, "treechildren");
if (kids) return kids.lastChild;
}
else
return seln[0];
return null;
},
/////////////////////////////////////////////////////////////////////////////
// Return a set of DOM nodes that represent the selection in the tree widget.
// This method is takes a node parameter which is the popupNode for the
// document. If the popupNode is not contained by the selection, the
// popupNode is selected and the new selection returned.
getContextSelection: function (aItemNode)
{
return [aItemNode];
},
getSelectedFolder: function ()
{
return "NC:PersonalToolbarFolder";
},
/////////////////////////////////////////////////////////////////////////////
// For a given start DOM element, find the enclosing DOM element that contains
// the template builder RDF resource decorations (id, ref, etc). In the
// Toolbar case, this is always the popup node (until we're proven wrong ;)
findRDFNode: function (aStartNode, aIncludeStartNodeFlag)
{
var temp = aStartNode;
while (temp && temp.localName != (aIncludeStartNodeFlag ? "button" : "hbox")
&& temp.localName != (aIncludeStartNodeFlag ? "menubutton" : "hbox"))
temp = temp.parentNode;
return temp || this.element;
},
selectFolderItem: function (aFolderURI, aItemURI, aAdditiveFlag)
{
var folder = document.getElementById(aFolderURI);
var kids = ContentUtils.childByLocalName(folder, "treechildren");
if (!kids) return;
var item = kids.firstChild;
while (item) {
if (item.id == aItemURI) break;
item = item.nextSibling;
}
if (!item) return;
this.tree[aAdditiveFlag ? "addItemToSelection" : "selectItem"](item);
},
/////////////////////////////////////////////////////////////////////////////
// Command handling & Updating.
controller: {
supportsCommand: function (aCommand)
{
switch(aCommand) {
case "cmd_undo":
case "cmd_redo":
return false;
case "cmd_bm_cut":
case "cmd_bm_copy":
case "cmd_bm_paste":
case "cmd_bm_delete":
case "cmd_bm_selectAll":
return true;
case "cmd_open":
case "cmd_openfolder":
case "cmd_openfolderinnewwindow":
case "cmd_newbookmark":
case "cmd_newfolder":
case "cmd_newseparator":
case "cmd_find":
case "cmd_properties":
case "cmd_rename":
case "cmd_setnewbookmarkfolder":
case "cmd_setpersonaltoolbarfolder":
case "cmd_setnewsearchfolder":
case "cmd_import":
case "cmd_export":
return true;
default:
return false;
}
},
isCommandEnabled: function (aCommand)
{
switch(aCommand) {
case "cmd_undo":
case "cmd_redo":
return false;
case "cmd_bm_paste":
var cp = gBookmarksShell.canPaste();
return cp;
case "cmd_bm_cut":
case "cmd_bm_copy":
case "cmd_bm_delete":
return document.popupNode != null;
case "cmd_bm_selectAll":
return false;
case "cmd_open":
var seln = gBookmarksShell.getSelection();
return document.popupNode != null && seln[0].getAttribute("type") == NC_NS + "Bookmark";
case "cmd_openfolder":
case "cmd_openfolderinnewwindow":
seln = gBookmarksShell.getSelection();
return document.popupNode != null && seln[0].getAttribute("type") == NC_NS + "Folder";
case "cmd_find":
case "cmd_newbookmark":
case "cmd_newfolder":
case "cmd_newseparator":
case "cmd_import":
case "cmd_export":
return true;
case "cmd_properties":
case "cmd_rename":
return document.popupNode != null;
case "cmd_setnewbookmarkfolder":
seln = gBookmarksShell.getSelection();
if (!seln.length) return false;
var folderType = seln[0].getAttribute("type") == (NC_NS + "Folder");
return document.popupNode != null && !(NODE_ID(seln[0]) == "NC:NewBookmarkFolder") && folderType;
case "cmd_setpersonaltoolbarfolder":
seln = gBookmarksShell.getSelection();
if (!seln.length) return false;
folderType = seln[0].getAttribute("type") == (NC_NS + "Folder");
return document.popupNode != null && !(NODE_ID(seln[0]) == "NC:PersonalToolbarFolder") && folderType;
case "cmd_setnewsearchfolder":
seln = gBookmarksShell.getSelection();
if (!seln.length) return false;
folderType = seln[0].getAttribute("type") == (NC_NS + "Folder");
return document.popupNode != null && !(NODE_ID(seln[0]) == "NC:NewSearchFolder") && folderType;
default:
return false;
}
},
doCommand: function (aCommand)
{
switch(aCommand) {
case "cmd_undo":
case "cmd_redo":
break;
case "cmd_bm_paste":
case "cmd_bm_copy":
case "cmd_bm_cut":
case "cmd_bm_delete":
case "cmd_newbookmark":
case "cmd_newfolder":
case "cmd_newseparator":
case "cmd_properties":
case "cmd_rename":
case "cmd_open":
case "cmd_openfolder":
case "cmd_openfolderinnewwindow":
case "cmd_setnewbookmarkfolder":
case "cmd_setpersonaltoolbarfolder":
case "cmd_setnewsearchfolder":
case "cmd_find":
case "cmd_import":
case "cmd_export":
gBookmarksShell.execCommand(aCommand.substring("cmd_".length));
break;
case "cmd_bm_selectAll":
break;
}
},
onEvent: function (aEvent)
{
},
onCommandUpdate: function ()
{
}
}
};
function BM_navigatorLoad(aEvent)
{
if (!gBookmarksShell) {
gBookmarksShell = new BookmarksToolbar("innermostBox");
controllers.appendController(gBookmarksShell.controller);
}
}
addEventListener("load", BM_navigatorLoad, false);

Просмотреть файл

@ -31,9 +31,9 @@
<script type="application/x-javascript" src="chrome://communicator/content/contentAreaDD.js"/>
<script type="application/x-javascript" src="chrome://navigator/content/viewsource.js"/>
<commandset id="navCommands"/>
<commandset id="commands"/>
<stringbundleset id="navStringBundles"/>
<stringbundleset id="stringbundleset"/>
<!-- keys are appended from the overlay -->
<keyset id="navKeys"/>

Просмотреть файл

@ -174,6 +174,9 @@ function Init()
}
sizeToContent();
// Set up the enabled of controls on the scheduling panels
dayRangeChange(document.getElementById("dayRange"));
// set initial focus
document.getElementById("name").focus();
@ -357,3 +360,14 @@ function setEndHourRange()
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;
}

Просмотреть файл

@ -40,196 +40,204 @@
onload="Init()" style="width: 30em;"
class="dialog" orient="vertical">
<stringbundle id="bundle_bookmark" src="chrome://communicator/locale/bookmarks/bookmark.properties"/>
<script type="application/x-javascript" src="chrome://global/content/globalOverlay.js"/>
<script type="application/x-javascript" src="chrome://communicator/content/bookmarks/bm-props.js"/>
<stringbundle id="bundle_bookmark" src="chrome://communicator/locale/bookmarks/bookmark.properties"/>
<script type="application/x-javascript" src="chrome://global/content/globalOverlay.js"/>
<script type="application/x-javascript" src="chrome://communicator/content/bookmarks/bm-props.js"/>
<keyset id="dialogKeys"/>
<keyset id="dialogKeys"/>
<tabcontrol orient="vertical">
<tabbox>
<tab label="&generalInfo.label;" accesskey="&generalInfo.accesskey;"/>
<tab id="ScheduleTab" label="&schedule.label;" accesskey="&schedule.accesskey;"/>
<tab id="NotifyTab" label="&notification.label;" accesskey="&notification.accesskey;"/>
</tabbox>
<tabpanel>
<box orient="vertical">
<separator class="thin"/>
<box autostretch="never" valign="top">
<image class="message-icon"/>
<separator class="thin" orient="vertical"/>
<html flex="1">&generaldesc.label;</html>
</box>
<separator class="thin"/>
<box class="box-padded" orient="vertical">
<grid>
<columns>
<column flex="1"/>
<column flex="3"/>
</columns>
<rows>
<row>
<text class="label" value="&bookmarks.name.label;" for="name"/>
<textbox id="name"/>
</row>
<row id="locationrow">
<text class="label" value="&bookmarks.location.label;" for="url"/>
<textbox id="url" />
</row>
<row id="shortcutrow">
<text class="label" value="&bookmarks.shortcut.label;" for="shortcut"/>
<textbox id="shortcut" />
</row>
<row>
<text class="label" value="&bookmarks.description.label;" for="description"/>
<textbox multiline="true" wrap="virtual" id="description" flex="1"/>
</row>
</rows>
</grid>
<separator/>
</box>
</box>
<keyset id="keyset"/>
<box orient="vertical">
<separator class="thin"/>
<box autostretch="never" valign="top">
<image id="schedule-icon"/>
<separator class="thin" orient="vertical"/>
<html flex="1">&schedule.description;</html>
</box>
<separator class="thin"/>
<box class="box-padded">
<spring flex="1"/>
<titledbox orient="vertical">
<label class="label" value="&checkforupdates.legend.label;"/>
<grid flex="1">
<tabcontrol orient="vertical">
<tabbox>
<tab label="&generalInfo.label;" accesskey="&generalInfo.accesskey;"/>
<tab id="ScheduleTab" label="&schedule.label;" accesskey="&schedule.accesskey;"/>
<tab id="NotifyTab" label="&notification.label;" accesskey="&notification.accesskey;"/>
</tabbox>
<tabpanel>
<vbox>
<separator class="thin"/>
<hbox autostretch="never" valign="top">
<image class="message-icon"/>
<separator class="thin" orient="vertical"/>
<html flex="1">&generaldesc.label;</html>
</hbox>
<separator class="thin"/>
<vbox class="box-padded">
<grid>
<columns>
<column/>
<column flex="1"/>
<column flex="3"/>
</columns>
<rows>
<row autostretch="never">
<text class="label" value="&when.label;" for="dayRange"/>
<menulist id="dayRange">
<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>
<row>
<text class="label" value="&bookmarks.name.label;" for="name"/>
<textbox id="name"/>
</row>
<row autostretch="never">
<text class="label" value="&from.label;" for="startHourRange"/>
<box autostretch="never">
<menulist id="startHourRange" oncommand="setEndHourRange()">
<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>
<text class="label" value="&to.label;" for="endHourRange"/>
<menulist id="endHourRange">
<menupopup oncreate="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>
</box>
<row id="locationrow">
<text class="label" value="&bookmarks.location.label;" for="url"/>
<textbox id="url" />
</row>
<row autostretch="never">
<text class="label" value="&every.label;" for="duration"/>
<box autostretch="never">
<textbox id="duration" size="4" value="60" />
<text class="label" value="&minutes.label;" />
</box>
<row id="shortcutrow">
<text class="label" value="&bookmarks.shortcut.label;" for="shortcut"/>
<textbox id="shortcut" />
</row>
<row>
<text class="label" value="&bookmarks.description.label;" for="description"/>
<textbox multiline="true" wrap="virtual" id="description" flex="1"/>
</row>
</rows>
</grid>
</titledbox>
<spring flex="1"/>
</box>
</box>
<box orient="vertical">
<separator class="thin"/>
<box autostretch="never" valign="top">
<image id="notification-icon"/>
<separator class="thin" orient="vertical"/>
<html flex="1">&notification.description;</html>
</box>
<separator class="thin"/>
<box class="box-padded">
<spring flex="1"/>
<titledbox orient="vertical" autostretch="never">
<label value="&notifications.legend.label;" />
<checkbox id="bookmarkIcon" label="&notification.icon.label;" />
<checkbox id="showAlert" label="&notification.alert.label;" />
<checkbox id="openWindow" label="&notification.window.label;" />
<checkbox id="playSound" label="&notification.sound.label;" />
</titledbox>
<spring flex="1"/>
</box>
</box>
</tabpanel>
</tabcontrol>
<separator/>
<separator/>
</vbox>
</vbox>
<vbox>
<separator class="thin"/>
<hbox autostretch="never">
<image id="schedule-icon"/>
<separator class="thin" orient="vertical"/>
<html flex="1">&schedule.description;</html>
</hbox>
<separator class="thin"/>
<hbox class="box-padded">
<spring flex="1"/>
<titledbox orient="vertical">
<label class="label" value="&checkforupdates.legend.label;"/>
<grid flex="1">
<columns>
<column/>
<column flex="1"/>
</columns>
<rows>
<row autostretch="never">
<text class="label" value="&when.label;" for="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 autostretch="never">
<text id="startHourRangeLabel" class="label"
value="&from.label;" for="startHourRange"/>
<hbox autostretch="never">
<menulist id="startHourRange" oncommand="setEndHourRange()">
<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>
<text id="endHourRangeLabel" class="label"
value="&to.label;" for="endHourRange"/>
<menulist id="endHourRange">
<menupopup oncreate="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 autostretch="never">
<text id="durationLabel" class="label"
value="&every.label;" for="duration"/>
<hbox autostretch="never">
<textbox id="duration" size="4" value="60" />
<text id="durationSubLabel" class="label" value="&minutes.label;" />
</hbox>
</row>
</rows>
</grid>
<separator class="thin"/>
</titledbox>
<spring flex="1"/>
</hbox>
</vbox>
<vbox>
<separator class="thin"/>
<hbox autostretch="never" valign="top">
<image id="notification-icon"/>
<separator class="thin" orient="vertical"/>
<html flex="1">&notification.description;</html>
</hbox>
<separator class="thin"/>
<hbox class="box-padded">
<spring flex="1"/>
<titledbox orient="vertical" autostretch="never">
<label value="&notifications.legend.label;" />
<checkbox id="bookmarkIcon" label="&notification.icon.label;" />
<checkbox id="showAlert" label="&notification.alert.label;" />
<checkbox id="openWindow" label="&notification.window.label;" />
<checkbox id="playSound" label="&notification.sound.label;" />
</titledbox>
<spring flex="1"/>
</hbox>
</vbox>
</tabpanel>
</tabcontrol>
<box id="okCancelButtonsRight"/>
<separator/>
<box id="okCancelButtonsRight"/>
</window>

Просмотреть файл

@ -199,7 +199,7 @@
</content>
</binding>
<binding id="menubutton-single-left">
<binding id="menubutton-single-left" extends="xul:menu">
<content>
<xul:box class="menubutton-internal-box" autostretch="never">
<xul:image class="menubutton-single-icon"/>
@ -209,7 +209,7 @@
</content>
</binding>
<binding id="menubutton-single-top">
<binding id="menubutton-single-top" extends="xul:menu">
<content>
<xul:box class="button-internal-box" autostretch="never" orient="vertical" flex="1">
<xul:image class="menubutton-single-icon"/>
@ -219,7 +219,7 @@
</content>
</binding>
<binding id="menubutton-single-bottom">
<binding id="menubutton-single-bottom" extends="xul:menu">
<content>
<xul:box class="button-internal-box" autostretch="never" orient="vertical" flex="1">
<xul:text class="menubutton-single-text" inherits="value=label,crop,accesskey"/>
@ -231,7 +231,7 @@
<!--
BINDING : menubutton-icon
XUL REPRESENTATION : <menubutton class="menubutton-icon">
XUL REPRESENTATION : <menubutton class="menubutton-icon" extends="xul:menu">
-->
<binding id="menubutton-icon">
<content>
@ -246,7 +246,7 @@
BINDING : menubutton-dual
XUL REPRESENTATION : <menubutton class="menubutton-dual">
-->
<binding id="menubutton-dual-top">
<binding id="menubutton-dual-top" extends="xul:menu">
<content>
<xul:box class="menubutton-internal-box">
<xul:button class="menubutton-dual-button top" allowevents="true"
@ -259,7 +259,7 @@
</content>
</binding>
<binding id="menubutton-dual-left">
<binding id="menubutton-dual-left" extends="xul:menu">
<content>
<xul:box class="menubutton-internal-box">
<xul:button class="menubutton-dual-button left" allowevents="true"
@ -272,7 +272,7 @@
</content>
</binding>
<binding id="menubutton-dual-right">
<binding id="menubutton-dual-right" extends="xul:menu">
<content>
<xul:box class="menubutton-internal-box">
<xul:button class="menubutton-dual-button right" allowevents="true"
@ -285,7 +285,7 @@
</content>
</binding>
<binding id="menubutton-dual-bottom">
<binding id="menubutton-dual-bottom" extends="xul:menu">
<content>
<xul:box class="menubutton-internal-box">
<xul:button class="menubutton-dual-button bottom" allowevents="true"

Просмотреть файл

@ -1,642 +0,0 @@
<?xml version="1.0"?>
<bindings id="treeBindings"
xmlns="http://www.mozilla.org/xbl"
xmlns:html="http://www.w3.org/1999/xhtml"
xmlns:xul="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
<binding id="treeitem">
<implementation>
<method name="toggleOpenState">
<body>
<![CDATA[
if ((this.getAttribute('container') == 'true') &&
(this.getAttribute('empty') != 'true')) {
if (this.getAttribute('open') == 'true')
this.removeAttribute('open');
else this.setAttribute('open', 'true');
}
]]>
</body>
</method>
<method name="open">
<body>
<![CDATA[
if ((this.getAttribute('container') == 'true') &&
(this.getAttribute('empty') != 'true')) {
if (this.getAttribute('open') != 'true')
this.setAttribute('open', 'true');
}
]]>
</body>
</method>
<method name="close">
<body>
<![CDATA[
if ((this.getAttribute('container') == 'true') &&
(this.getAttribute('empty') != 'true')) {
if (this.getAttribute('open') == 'true')
this.removeAttribute('open');
}
]]>
</body>
</method>
</implementation>
</binding>
<binding id="treecell-indented-folder">
<content autostretch="never">
<xul:treeindentation/>
<xul:image class="tree-cell-twisty" twisty="true" inherits="hidden=notwisty" allowevents="true"/>
<xul:image class="tree-cell-primary-icon" inherits="src"/>
<xul:text class="tree-cell-text" inherits="crop,value=label,align" flex="1" crop="right"/>
</content>
</binding>
<!-- Inline Editable Treecell -->
<!--
This same base-binding will probably become the foundation of inline-editable
buttons, but at the moment it's kinda specific to the anonymous treecell
content in the bindings that derive from it. In the next milestone this binding
will become more generic to support any anonymous content.
-->
<binding id="treecell-indented-folder-inline-edit-base">
<implementation>
<property name="_mode">0</property>
<method name="setMode">
<parameter name="val"/>
<body>
<![CDATA[
var row = this.parentNode;
if (val == "edit") {
var nodes = document.getAnonymousNodes(this);
var box = nodes[nodes.length-1];
if (box.firstChild.getAttribute("hidden") != "true") {
row.setAttribute("mode", "inline-edit");
box.setAttribute("mode", "edit");
box.firstChild.setAttribute("hidden", "true");
const kXULNS = "http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul";
var field = document.createElementNS(kXULNS, "textbox");
field.className = "textbox-inline-edit";
field.setAttribute("flex", "1");
field.setAttribute("value", box.firstChild.getAttribute("value"));
box.appendChild(field);
field.addEventListener("keydown", this.fieldKeyDown, false);
field.addEventListener("change", this.fieldChange, false);
field.select();
}
}
else {
nodes = document.getAnonymousNodes(this);
box = nodes[nodes.length-1];
if (box.firstChild.getAttribute("hidden") == "true") {
row.removeAttribute("mode");
box.removeAttribute("mode");
box.lastChild.blur();
box.removeChild(box.lastChild);
box.firstChild.removeAttribute("hidden");
}
}
]]>
</body>
</method>
<property name="_observers">
<![CDATA[
({
reject: [],
accept: []
})
]]>
</property>
<property name="valueIsRejected">false</property>
<method name="addObserver">
<parameter name="aObserver"/>
<parameter name="aTopic"/>
<parameter name="aParams"/>
<body>
this._observers[aTopic].push({ callback: aObserver, params: aParams });
</body>
</method>
<method name="fieldKeyDown">
<parameter name="aEvent"/>
<body>
<![CDATA[
var cell = aEvent.target.parentNode.parentNode;
var nodes = document.getAnonymousNodes(cell);
var box = nodes[nodes.length-1];
if (aEvent.keyCode == 13) {
cell.valueIsRejected = false;
cell.fieldChange(aEvent);
}
if (aEvent.keyCode == 27) {
cell.valueIsRejected = true;
for (i = 0; i < cell._observers["reject"].length; ++i)
cell._observers["reject"][i].callback(cell._observers["reject"][i].params.concat(box.lastChild.value), "reject");
if ("setMode" in cell)
cell.setMode("normal");
}
aEvent.preventBubble();
]]>
</body>
</method>
<property name="valueIsAccepted">false</property>
<method name="fieldChange">
<parameter name="aEvent"/>
<body>
<![CDATA[
var cell = aEvent.target.parentNode.parentNode;
var nodes = document.getAnonymousNodes(cell);
var box = nodes[nodes.length-1];
if (!cell.valueIsRejected) {
for (var i = 0; i < cell._observers["accept"].length; ++i)
cell._observers["accept"][i].callback(cell._observers["accept"][i].params.concat(box.lastChild.value), "accept");
if ("setMode" in cell)
cell.setMode("normal");
}
]]>
</body>
</method>
</implementation>
</binding>
<binding id="treecell-indented-folder-inline-edit"
extends="chrome://global/content/treeBindings.xml#treecell-indented-folder-inline-edit-base">
<content autostretch="never">
<xul:treeindentation/>
<xul:image class="tree-cell-twisty" twisty="true" inherits="hidden=notwisty" allowevents="true"/>
<xul:image class="tree-cell-primary-icon-inline-edit-folder" inherits="src"/>
<xul:box class="inline-edit-cell-box" flex="1">
<xul:text class="inline-edit-cell-text"
inherits="crop,value=label,align,mode" flex="1" crop="right"/>
</xul:box>
</content>
</binding>
<binding id="treecell-indented-leaf-inline-edit"
extends="chrome://global/content/treeBindings.xml#treecell-indented-folder-inline-edit-base">
<content autostretch="never">
<xul:treeindentation/>
<xul:image class="tree-cell-primary-icon" inherits="src"/>
<xul:box class="inline-edit-cell-box" flex="1">
<xul:text class="tree-cell-text"
inherits="crop,value=label,align,mode" flex="1" crop="right"/>
</xul:box>
</content>
</binding>
<binding id="treecell-inline-edit"
extends="chrome://global/content/treeBindings.xml#treecell-indented-folder-inline-edit-base">
<content autostretch="never">
<xul:box class="inline-edit-cell-box" flex="1">
<xul:text class="tree-cell-text"
inherits="crop,value=label,align,mode" flex="1" crop="right"/>
</xul:box>
</content>
</binding>
<binding id="treecell-indented-leaf">
<content autostretch="never">
<xul:treeindentation/>
<xul:image class="tree-cell-primary-icon" inherits="src"/>
<xul:text class="tree-cell-text" inherits="crop,value=label,align" flex="1" crop="right"/>
</content>
</binding>
<binding id="treecell-text" extends="xul:text">
<content crop="right"/>
</binding>
<binding id="treecell">
<content autostretch="never">
<xul:text class="tree-cell-text" inherits="crop,value=label,align" flex="1" crop="right"/>
</content>
</binding>
<binding id="treecell-align-right">
<content autostretch="never">
<xul:spring flex="5"/>
<xul:text class="tree-cell-text" inherits="crop,value=label,align" flex="1" crop="right"/>
</content>
</binding>
<binding id="treecell-iconic">
<content autostretch="never">
<xul:image class="tree-cell-icon" inherits="src"/>
<xul:text class="tree-cell-text" inherits="crop,value=label,align" flex="1" crop="right"/>
</content>
</binding>
<binding id="treecell-image">
<content autostretch="never">
<xul:image class="tree-cell-image" inherits="src"/>
</content>
</binding>
<binding id="treecell-header">
<content>
<xul:box class="treecell-header-box" flex="1" autostretch="never">
<xul:image class="tree-header-image" inherits="src"/>
<xul:text class="tree-header-text" inherits="crop,value=label,disabled" flex="1" crop="right"/>
<xul:image class="tree-header-sortdirection"/>
</xul:box>
</content>
</binding>
<binding id="treecell-header-image">
<content>
<xul:box class="treecell-header-image-box" flex="1" autostretch="never">
<xul:image class="tree-header-image" inherits="src"/>
</xul:box>
</content>
</binding>
<binding id="tree">
<content>
<children>
<xul:treecolgroup>
<xul:treecol flex="1"/>
</xul:treecolgroup>
</children>
<xul:treerows class="tree-container-treerows" inherits="dragover,dragdroptree">
<children includes="treehead|treechildren"/>
</xul:treerows>
</content>
<implementation>
<property name="selectedIndex"
onget="return (this.selectedItems.length > 0 ? this.getIndexOfItem(this.selectedItems[0]) : -1)"
onset="if(val>=0){var item=this.getItemAtIndex(val); if(item) this.selectItem(item);} else this.clearItemSelection();"
/>
<property name="treeBoxObject"
onget="return this.boxObject.QueryInterface(Components.interfaces.nsITreeBoxObject);"
readonly="true"/>
<property name="isUpSelection">
0
</property>
<property name="isDownSelection">
0
</property>
<method name="getNextItem">
<parameter name="startItem"/>
<parameter name="delta"/>
<body>
return this.treeBoxObject.getNextItem(startItem, delta);
</body>
</method>
<method name="getPreviousItem">
<parameter name="startItem"/>
<parameter name="delta"/>
<body>
return this.treeBoxObject.getPreviousItem(startItem, delta);
</body>
</method>
<method name="getIndexOfItem">
<parameter name="item"/>
<body>
return this.treeBoxObject.getIndexOfItem(item);
</body>
</method>
<method name="getItemAtIndex">
<parameter name="index"/>
<body>
return this.treeBoxObject.getItemAtIndex(index);
</body>
</method>
<method name="ensureIndexIsVisible">
<parameter name="index"/>
<body>
return this.treeBoxObject.ensureIndexIsVisible(index);
</body>
</method>
<method name="ensureElementIsVisible">
<parameter name="element"/>
<body>
return this.ensureIndexIsVisible(this.treeBoxObject.getIndexOfItem(element));
</body>
</method>
<method name="scrollToIndex">
<parameter name="index"/>
<body>
return this.treeBoxObject.scrollToIndex(index);
</body>
</method>
<method name="getNumberOfVisibleRows">
<body>
return this.treeBoxObject.getNumberOfVisibleRows();
</body>
</method>
<method name="getIndexOfFirstVisibleRow">
<body>
return this.treeBoxObject.getIndexOfFirstVisibleRow();
</body>
</method>
<method name="getRowCount">
<body>
return this.treeBoxObject.getRowCount();
</body>
</method>
</implementation>
<handlers>
<handler event="keypress" keycode="vk_enter">
<![CDATA[
if (event.target != this || selectedItems.length != 1)
return;
this.selectedItems[0].toggleOpenState();
]]>
</handler>
<handler event="keypress" keycode="vk_return">
<![CDATA[
if (event.target != this || selectedItems.length != 1)
return;
this.selectedItems[0].toggleOpenState();
]]>
</handler>
<handler event="keypress" keycode="vk_left">
<![CDATA[
if (event.target != this || this.selectedItems.length != 1)
return;
if (this.selectedItems[0].getAttribute("open") != "true") {
var el = this.selectedItems[0].parentNode.parentNode
if ( el && (el.tagName != "tree") ) this.selectItem(el);
}
else {
el = this.selectedItems[0];
el.close();
}
]]>
</handler>
<handler event="keypress" keycode="vk_right">
<![CDATA[
if (event.target != this || this.selectedItems.length != 1)
return;
this.selectedItems[0].open();
]]>
</handler>
<handler event="keypress" keycode="vk_up">
<![CDATA[
if (event.target != this || this.selectedItems.length < 1)
return;
this.isUpSelection=0;
this.isDownSelection=0;
var n = this.getPreviousItem(this.selectedItems[this.selectedItems.length-1], 1);
if (n) {
this.ensureIndexIsVisible(this.getIndexOfItem(n));
this.timedSelect(n, 500);
}
]]>
</handler>
<handler event="keypress" keycode="vk_down">
<![CDATA[
if (event.target != this)
return;
var n;
if (this.selectedItems.length == 0) {
n = this.getItemAtIndex(0);
}
else {
this.isUpSelection=0;
this.isDownSelection=0;
n = this.getNextItem(this.selectedItems[this.selectedItems.length-1], 1);
}
if (n) {
this.ensureIndexIsVisible(this.getIndexOfItem(n));
this.timedSelect(n, 500);
}
]]>
</handler>
<handler event="keypress" modifiers="shift" keycode="vk_up">
<![CDATA[
var l=this.selectedItems.length;
if (event.target != this || l < 1 || this.getAttribute("multiple") != "true")
return;
var n = this.getPreviousItem(this.selectedItems[l-1], 1);
if (n) {
this.ensureElementIsVisible(n);
if ( this.isDownSelection) {
if ( l > 1 )
this.removeItemFromSelection(this.selectedItems[l-1]);
if ( l <= 2 )
this.isDownSelection=0;
}
else {
this.addItemToSelection(n);
this.isUpSelection=1;
}
}
]]>
</handler>
<handler event="keypress" modifiers="shift" keycode="vk_down">
<![CDATA[
var l=this.selectedItems.length;
if (event.target != this || l < 1 || this.getAttribute("multiple") != "true")
return;
var n = this.getNextItem(this.selectedItems[l-1], 1);
if (n) {
this.ensureElementIsVisible(n);
if ( this.isUpSelection) {
if ( l > 1 )
this.removeItemFromSelection(this.selectedItems[l-1]);
if ( l <= 2 )
this.isUpSelection=0;
}
else {
this.addItemToSelection(n);
this.isDownSelection=1;
}
}
]]>
</handler>
<handler event="keypress" keycode="vk_page_up">
<![CDATA[
var l = this.selectedItems.length;
if (event.target != this || l < 1)
return;
this.isUpSelection=0;
this.isDownSelection=0;
var i = this.getIndexOfFirstVisibleRow();
if ( i == 0 )
var n=this.getItemAtIndex(0);
else {
var v = this.getNumberOfVisibleRows();
n = this.getPreviousItem(this.selectedItems[l-1], v);
var newIndex = i - v;
if ( ! n || newIndex < 0 ) {
newIndex=0;
n=this.getItemAtIndex(this.getIndexOfItem(this.selectedItems[l-1]) - i);
}
this.scrollToIndex(newIndex);
}
this.timedSelect(n, 500);
]]>
</handler>
<handler event="keypress" keycode="vk_page_down">
<![CDATA[
var l = this.selectedItems.length;
if (event.target != this || l < 1)
return;
this.isUpSelection=0;
this.isDownSelection=0;
var i = this.getIndexOfFirstVisibleRow();
var v = this.getNumberOfVisibleRows();
var count = this.getRowCount();
var n;
if ( i >= count - v )
n=this.getItemAtIndex(count - 1);
else {
n = this.getNextItem(this.selectedItems[l-1], v);
var newIndex = i + v;
if ( ! n || newIndex > count - v ) {
newIndex = count - v;
n = this.getItemAtIndex(newIndex + this.getIndexOfItem(this.selectedItems[l-1]) - i);
}
this.scrollToIndex(newIndex);
}
this.timedSelect(n, 500);
]]>
</handler>
<handler event="keypress" keycode="vk_home">
<![CDATA[
if (event.target != this || this.selectedItems.length < 1)
return;
this.isUpSelection=0;
this.isDownSelection=0;
this.scrollToIndex(0);
this.selectItem(this.getItemAtIndex(0));
]]>
</handler>
<handler event="keypress" keycode="vk_end">
<![CDATA[
if (event.target != this || this.selectedItems.length < 1)
return;
this.isUpSelection=0;
this.isDownSelection=0;
var count = this.getRowCount();
this.ensureIndexIsVisible(count-1);
this.selectItem(this.getItemAtIndex(count-1));
]]>
</handler>
</handlers>
</binding>
<binding id="treerows">
<content outer="true"/>
<handlers>
<!-- If there is no modifier key, we select on mousedown, not
click, so that drags work correctly. -->
<handler event="mousedown">
<![CDATA[
var lt = event.originalTarget.localName;
var target = (lt == 'treecell' || lt == 'treerow') ? lt : null;
if (target && !event.ctrlKey && !event.shiftKey && !event.metaKey) {
var parent = lt == 'treecell' ? event.target.parentNode.parentNode : event.target.parentNode;
var isSelected = parent.getAttribute("selected");
if (!isSelected) {
parentNode.selectItem(parent);
}
parentNode.currentItem = parent;
}
]]>
</handler>
<!-- On a click (up+down on the same item), deselect everything
except this item. -->
<handler event="click">
<![CDATA[
if (event.button != 0) return;
var t = event.originalTarget;
if (t.localName == 'treecell') {
if (event.ctrlKey || event.metaKey) {
parentNode.toggleItemSelection(t.parentNode.parentNode);
parentNode.currentItem = t.parentNode.parentNode;
}
else if (event.shiftKey) {
parentNode.selectItemRange(null, t.parentNode.parentNode);
parentNode.currentItem = t.parentNode.parentNode;
}
else {
/* We want to deselect all the selected items except what was
clicked, UNLESS it was a right-click. We have to do this
in click rather than mousedown so that you can drag a
selected group of items */
var selectedItems = parentNode.selectedItems;
var didSuppressSelect = false;
var i = 0;
while (i < selectedItems.length) {
if (selectedItems[i] != t.parentNode.parentNode) {
if (!didSuppressSelect) {
parentNode.suppressOnSelect = true;
didSuppressSelect = true;
}
parentNode.removeItemFromSelection(selectedItems[i]);
}
else
i++;
}
if (didSuppressSelect)
parentNode.suppressOnSelect = false;
}
}
]]>
</handler>
<!-- double-click -->
<handler event="click" clickcount="2">
<![CDATA[
if (event.originalTarget.localName == 'treecell') {
var n = event.originalTarget.parentNode.parentNode;
n.toggleOpenState();
}
]]>
</handler>
<!-- normal, single click -->
<handler event="click">
<![CDATA[
try {
if (event.originalTarget.getAttribute('twisty') == 'true') {
var n = event.originalTarget.parentNode.parentNode.parentNode;
n.toggleOpenState();
}
} catch (e) {}
]]>
</handler>
</handlers>
</binding>
<binding id="listbox" extends="xul:tree">
<content>
<xul:cols>
<xul:col flex="1"/>
</xul:cols>
<xul:treerows>
<xul:treerows>
<children includes="listhead"/>
<xul:treechildren>
<children/>
</xul:treechildren>
</xul:treerows>
</xul:treerows>
</content>
</binding>
<binding id="listhead" extends="xul:treehead">
<content>
<xul:treerow>
<xul:treecell inherits="label" class="listcell-header"/>
</xul:treerow>
</content>
</binding>
<binding id="listitem" extends="xul:treeitem">
<content>
<xul:treerow>
<xul:treecell inherits="label" class="listcell-text"/>
</xul:treerow>
</content>
</binding>
</bindings>

Просмотреть файл

@ -668,5 +668,153 @@
</content>
</binding>
<!--
Inline Editable UI Element
- This binding forms the basis of the inline edit treecell and the inline edit
- buttons.
- TODO: investigate creating extensions to the wrapper widgets (tree, toolbar)
- to make them provide some object implementing an interface similar to
- outliner's so we can build in some of the ile behavior (such as going
- in and out of the mode, asking isEditable etc) so as to remove some of
- the burden from the implementor.
-
- Note that this widget will be no longer used in the bookmarks window once
- outliner is extended to have this functionality built in.
-->
<binding id="inline-edit-base" extends="chrome://global/content/xulBindings.xml#basetext">
<implementation>
<property name="_mode">0</property>
<method name="setMode">
<parameter name="val"/>
<body>
<![CDATA[
var ctr = document.getAnonymousElementByAttribute(this, "ileattr", "text-container");
var txt = document.getAnonymousElementByAttribute(this, "ileattr", "text");
this.setAttribute("mode", val);
if (val == "edit") {
var nodes = document.getAnonymousNodes(this);
if (txt.getAttribute("hidden") != "true") {
ctr.setAttribute("mode", "edit");
var width = ctr.boxObject.width;
txt.setAttribute("hidden", "true");
const kXULNS = "http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul";
var field = document.createElementNS(kXULNS, "textbox");
field.className = "textbox-inline-edit";
field.setAttribute("flex", "1");
field.setAttribute("value", txt.getAttribute("value"));
field.setAttribute("ileattr", "field");
field.setAttribute("rootcontent", txt.getAttribute("rootcontent"));
field.setAttribute("style", "width: " + width + "px");
ctr.appendChild(field);
field.addEventListener("keydown", this.fieldKeyDown, false);
field.addEventListener("change", this.fieldChange, false);
field.select();
}
}
else {
nodes = document.getAnonymousNodes(this);
var fld = document.getAnonymousElementByAttribute(this, "ileattr", "field");
if (fld && txt.getAttribute("hidden") == "true") {
ctr.removeAttribute("mode");
fld.blur();
ctr.removeChild(fld);
txt.removeAttribute("hidden");
}
}
]]>
</body>
</method>
<property name="_observers">
<![CDATA[
({
reject: [],
accept: []
})
]]>
</property>
<property name="valueIsRejected">false</property>
<method name="addObserver">
<parameter name="aObserver"/>
<parameter name="aTopic"/>
<parameter name="aParams"/>
<body>
this._observers[aTopic].push({ callback: aObserver, params: aParams });
</body>
</method>
<method name="fieldKeyDown">
<parameter name="aEvent"/>
<body>
<![CDATA[
var rootLocalName = aEvent.target.getAttribute("rootcontent");
if (rootLocalName) {
// Root content is the bound element.
var rootContent = aEvent.target;
while (rootContent && rootContent.localName != rootLocalName)
rootContent = rootContent.parentNode;
if (rootContent) {
var ctr = document.getAnonymousElementByAttribute(rootContent, "ileattr", "text-container");
if (aEvent.keyCode == 13) {
rootContent.valueIsRejected = false;
rootContent.fieldChange(aEvent);
}
if (aEvent.keyCode == 27) {
rootContent.valueIsRejected = true;
var fld = document.getAnonymousElementByAttribute(rootContent, "ileattr", "field");
for (i = 0; i < rootContent._observers["reject"].length; ++i)
rootContent._observers["reject"][i].callback(rootContent._observers["reject"][i].params.concat(fld.value), "reject");
if ("setMode" in rootContent)
rootContent.setMode("normal");
}
}
}
aEvent.preventBubble();
]]>
</body>
</method>
<property name="valueIsAccepted">false</property>
<method name="fieldChange">
<parameter name="aEvent"/>
<body>
<![CDATA[
var rootLocalName = this.getAttribute("rootcontent");
if (rootLocalName) {
// Root content is the bound element.
var rootContent = this;
while (rootContent && rootContent.localName != rootLocalName)
rootContent = rootContent.parentNode;
if (rootContent) {
var ctr = document.getAnonymousElementByAttribute(rootContent, "ileattr", "text-container");
if (!rootContent.valueIsRejected) {
var fld = document.getAnonymousElementByAttribute(rootContent, "ileattr", "field");
for (var i = 0; i < rootContent._observers["accept"].length; ++i)
rootContent._observers["accept"][i].callback(rootContent._observers["accept"][i].params.concat(fld.value), "accept");
if ("setMode" in rootContent)
rootContent.setMode("normal");
}
}
}
]]>
</body>
</method>
</implementation>
</binding>
<!-- inline editable buttons -->
<binding id="buttonleft-ile" extends="chrome://global/content/xulBindings.xml#inline-edit-base">
<content>
<xul:hbox class="button-internal-box" autostretch="never" flex="1">
<xul:image class="button-icon" inherits="src"/>
<xul:vbox class="button-text-container" autostretch="never" flex="1" ileattr="text-container">
<xul:text class="button-text" inherits="value=label,accesskey,crop,dragover-top" ileattr="text" rootcontent="button"/>
</xul:vbox>
</xul:hbox>
<children includes="menupopup"/>
</content>
</binding>
</bindings>