gecko-dev/xpfe/components/sidebar/resources/sidebarOverlay.xul

184 строки
7.9 KiB
XML

<?xml version="1.0"?> <!-- -*- Mode: HTML; indent-tabs-mode: nil -*- -->
<!--
The contents of this file are subject to the Netscape Public License
Version 1.1 (the "NPL"); you may not use this file except in
compliance with the NPL. You may obtain a copy of the NPL at
http://www.mozilla.org/NPL/
Software distributed under the NPL is distributed on an "AS IS" basis,
WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
for the specific language governing rights and limitations under the
NPL.
The Initial Developer of this code under the NPL is Netscape
Communications Corporation. Portions created by Netscape are
Copyright (C) 1999 Netscape Communications Corporation. All Rights
Reserved.
-->
<?xml-stylesheet href="chrome://communicator/content/sidebar/sidebarOverlay.css" type="text/css"?>
<?xul-overlay href="chrome://communicator/content/contentAreaContextOverlay.xul"?>
<!DOCTYPE window [
<!ENTITY % sidebarOverlayDTD SYSTEM "chrome://communicator/locale/sidebar/sidebarOverlay.dtd" >
%sidebarOverlayDTD;
]>
<overlay id="sidebarOverlay"
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
<command id="toggleSidebar" oncommand="SidebarShowHide();"/>
<key id="showHideSidebar" keycode="VK_F9" command="toggleSidebar"/>
<popup id="sidebarPopup" onpopupshowing="if (sidebarObj.panels.get_panel_from_header_node(document.popupNode).is_selected())
this.firstChild.setAttribute('collapsed', 'true');
else
this.firstChild.removeAttribute('collapsed');">
<menuitem label="&sidebar.switch.label;" accesskey="&sidebar.switch.accesskey;"
default="true" oncommand="SidebarSelectPanel(document.popupNode, false, false);"/>
<menuitem label="&sidebar.hide.label;" accesskey="&sidebar.hide.accesskey;"
oncommand="SidebarTogglePanel(document.popupNode);"/>
<menuseparator/>
<menuitem label="&sidebar.customize.label;" accesskey="&sidebar.customize.accesskey;"
oncommand="SidebarCustomize();"/>
</popup>
<!-- Overlay the sidebar panels -->
<vbox id="sidebar-box" persist="hidden width collapsed">
<splitter id="sidebar-panels-splitter" collapse="after" persist="state"
onmouseup="PersistHeight();" hidden="true">
<spacer flex="1"/>
<grippy/>
<spacer flex="1"/>
</splitter>
<vbox id="sidebar-panels-splitter-box" flex="1"
persist="hidden">
<sidebarheader id="sidebar-title-box" class="sidebarheader-main"
label="&sidebar.panels.label;" persist="hidden" type="box"
collapse="after" onmouseup="PersistHeight();">
<toolbarbutton type="menu" id="sidebar-panel-picker" menubuttontype="sidebar-panels"
onpopupshowing="SidebarBuildPickerPopup();"
label="&sidebar.picker.label;" >
<menupopup id="sidebar-panel-picker-popup" popupanchor="topright"
datasources="rdf:null"
ref="urn:sidebar:current-panel-list"
oncommand="SidebarTogglePanel(event.target);" >
<template>
<rule>
<conditions>
<content uri="?uri"/>
<triple subject="?uri"
predicate="http://home.netscape.com/NC-rdf#panel-list"
object="?panel-list"/>
<member container="?panel-list" child="?panel"/>
<triple subject="?panel"
predicate="http://home.netscape.com/NC-rdf#title"
object="?title" />
</conditions>
<bindings>
<binding subject="?panel"
predicate="http://home.netscape.com/NC-rdf#exclude"
object="?exclude"/>
</bindings>
<action>
<menuitem uri="?panel" type="checkbox"
label="?title" exclude="?exclude"/>
</action>
</rule>
</template>
<menuitem label="&sidebar.customize.label;" accesskey="&sidebar.customize.accesskey;"
oncommand="SidebarCustomize();" />
<menuitem label="&sidebar.sbDirectory.label;"
oncommand="BrowseMorePanels();" />
<menuseparator />
</menupopup>
</toolbarbutton>
</sidebarheader>
<vbox id="sidebar-panels"
datasources="rdf:null"
ref="urn:sidebar:current-panel-list"
persist="last-selected-panel height collapsed" flex="1*"
onclick="return contentAreaClick(event);"
ondraggesture="nsDragAndDrop.startDrag(event, contentAreaDNDObserver);">
<template id="sidebar-template">
<rule>
<conditions>
<content uri="?uri"/>
<triple subject="?uri" object="?panel-list"
predicate="http://home.netscape.com/NC-rdf#panel-list" />
<member container="?panel-list" child="?panel"/>
<triple subject="?panel" object="?title"
predicate="http://home.netscape.com/NC-rdf#title" />
<triple subject="?panel" object="?content"
predicate="http://home.netscape.com/NC-rdf#content" />
</conditions>
<bindings>
<binding subject="?panel" object="?exclude"
predicate="http://home.netscape.com/NC-rdf#exclude" />
</bindings>
<action>
<hbox uri="?panel" class="box-texttab texttab-sidebar"
oncommand="SidebarSelectPanel(this,false,false)"
hidden="true" label="?title" exclude="?exclude" context="sidebarPopup" />
<vbox uri="?panel" flex="1*" hidden="true"
loadstate="never loaded">
<vbox flex="1" class="iframe-panel loadarea">
<hbox flex="1" align="center">
<image class="image-panel-loading"/>
<label class="text-panel-loading"
value="&sidebar.loading.label;"/>
<button label="&sidebar.loading.stop.label;" hidden="true"
oncommand="SidebarStopPanelLoad(this.parentNode.parentNode.parentNode.previousSibling);"/>
</hbox>
<spacer flex="100%"/>
</vbox>
<iframe class="iframe-panel" flex="1*" src="about:blank"
hidden="true" collapsed="true" content="?content"/>
<iframe class="iframe-panel" flex="1*" src="about:blank"
hidden="true" collapsed="true" content="?content" type="content" context="contentAreaContextMenu"/>
</vbox>
</action>
</rule>
</template>
<vbox id="sidebar-iframe-no-panels" class="iframe-panel" flex="1"
hidden="true">
<description>&sidebar.no-panels.state;</description>
<description>&sidebar.no-panels.add;</description>
<description>&sidebar.no-panels.hide;</description>
</vbox>
</vbox>
</vbox>
<popupset id="contentAreaContextSet"/>
</vbox>
<!-- Splitter on the right of sidebar -->
<splitter id="sidebar-splitter" collapse="before" persist="state hidden"
class="chromeclass-extrachrome sidebar-splitter" align="center"
onmouseup="SidebarFinishClick();">
<grippy class="sidebar-splitter-grippy"
onclick="SidebarCleanUpExpandCollapse();"/>
</splitter>
<!-- View->Sidebar toggle -->
<menupopup id="menu_View_Popup">
<menuitem id="sidebar-menu" type="checkbox"
label="&sidebarCmd.label;"
accesskey="&sidebarCmd.accesskey;"
command="toggleSidebar"
key="showHideSidebar"
position="2"/>
</menupopup>
<!-- Scripts go last, because they peek at state to tweak menus -->
<script type="application/x-javascript"
src="chrome://communicator/content/sidebar/sidebarOverlay.js"/>
</overlay>