home *** CD-ROM | disk | FTP | other *** search
/ ftp.swcp.com / ftp.swcp.com.zip / ftp.swcp.com / mac / mozilla-macos9-1.3.1.sea.bin / Mozilla1.3.1 / Chrome / comm.jar / content / wallet / walletNavigatorOverlay.xul < prev    next >
Extensible Markup Language  |  2003-06-08  |  6KB  |  183 lines

  1. <?xml version="1.0"?>
  2.  
  3. <!--
  4.    The contents of this file are subject to the Netscape Public
  5.    License Version 1.1 (the "License"); you may not use this file
  6.    except in compliance with the License. You may obtain a copy of
  7.    the License at http://www.mozilla.org/NPL/
  8.     
  9.    Software distributed under the License is distributed on an "AS
  10.    IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
  11.    implied. See the License for the specific language governing
  12.    rights and limitations under the License.
  13.     
  14.    The Original Code is Mozilla Communicator client code, released
  15.    March 31, 1998.
  16.    
  17.    The Initial Developer of the Original Code is Netscape
  18.    Communications Corporation. Portions created by Netscape are
  19.    Copyright (C) 1998-1999 Netscape Communications Corporation. All
  20.    Rights Reserved.
  21.    
  22.    Contributor(s): 
  23.   -->
  24.  
  25. <!DOCTYPE window SYSTEM "chrome://wallet/locale/walletNavigatorOverlay.dtd">
  26.  
  27. <overlay id="walletNavigatorOverlay"
  28.          xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
  29.  
  30.   <script type="application/x-javascript" src="chrome://wallet/content/walletOverlay.js"/>
  31.  
  32.   <script type="application/x-javascript">
  33.   <![CDATA[
  34.  
  35.     function initEditItems() {
  36.  
  37.       // Determine if capture/prefill should be displayed and enabled.
  38.       var state = getState(0);
  39.       setDisabledAttr("edit_capture", (state.capture != enable));
  40.       setDisabledAttr("edit_prefill", (state.prefill != enable));
  41.     }
  42.  
  43. /* form toolbar is out
  44.     // Can't use generic goToggleToolbar (see utilityOverlay.js) for form menu because
  45.     // form toolbar could be hidden even when the checkbox in the view menu is checked
  46.     function goToggleFormToolbar(id, elementID) {
  47.       var element = document.getElementById(elementID);
  48.       if (element) {
  49.         var checkValue = element.getAttribute("checked");
  50.         if (checkValue == "false") {
  51.           element.setAttribute("checked","true")
  52.           initToolbarItems();
  53.         } else {
  54.           element.setAttribute("checked","false")
  55.           showItem("formToolbar", false);
  56.         }
  57.         document.persist(id, 'hidden');
  58.         document.persist(elementID, 'checked');
  59.       }
  60.     }
  61.  
  62.     function navObserver() {
  63.     }
  64.     navObserver.prototype.observe = function (subject, message, contextUrl) {
  65.       if (message == 'EndDocumentLoad') {
  66.         initToolbarItems()
  67.       }
  68.     }
  69.  
  70.     function addEndDocumentLoadListener() {
  71.       if (window._content) {
  72.         var observerService = Components.classes["@mozilla.org/observer-service;1"].getService();
  73.         observerService = observerService.QueryInterface(Components.interfaces.nsIObserverService);
  74.         var observer = new navObserver();
  75.         if (observerService && observer) {
  76.           observerService.addObserver(observer, "EndDocumentLoad", PR_FALSE);
  77.         } else {
  78.           dump("FAILURE to get observer service\n");
  79.         }
  80.       }
  81.     }
  82.  
  83.     window.addEventListener("load", addEndDocumentLoadListener, false);
  84. */
  85.  
  86.   ]]>
  87.   </script>         
  88.  
  89.   <!-- menu items -->
  90.  
  91. <!-- form toolbar is out
  92.   <broadcasterset id="broadcasterset">
  93.     <broadcaster id="cmd_viewformtoolbar" label="&formbarCmd.label;"
  94.                  accesskey="&formbarCmd.accesskey;" class="menuitem-iconic"
  95.                  type="checkbox" checked="true"
  96.                  oncommand="goToggleFormToolbar('formToolbar','cmd_viewformtoolbar');"/>
  97.   </broadcasterset>
  98. -->
  99.  
  100.   <!-- view menu -->
  101. <!-- form toolbar is out
  102.   <menupopup id="view_toolbars_popup">
  103.     <menuitem insertafter="cmd_viewpersonaltoolbar"
  104.               observes="cmd_viewformtoolbar"/>
  105.   </menupopup>
  106. -->
  107.  
  108.   <!-- edit menu -->
  109.   <menupopup id="menu_Edit_Popup" onpopupshowing="initEditItems();">
  110.     <menuseparator insertbefore="menu_PrefsSeparator"/> 
  111.     <menuitem id="edit_prefill"
  112.               label="&prefillCmd.label;"
  113.               accesskey="&prefillCmd.accesskey;"
  114.               oncommand="formPrefill();"
  115.               insertbefore="menu_PrefsSeparator"/>
  116.     <menuitem id="edit_capture"
  117.               label="&captureCmd.label;"
  118.               accesskey="&captureCmd.accesskey;"
  119.               oncommand="formCapture();"
  120.               insertbefore="menu_PrefsSeparator"/>
  121.   </menupopup>
  122.  
  123.   <!-- Form toolbar items -->
  124.  
  125. <!-- form toolbar is out
  126.   <hbox id="appcontent">
  127.     <toolbar id="formToolbar"
  128.              class="chromeclass-directories"
  129.              tbautostretch="always"
  130.              insertafter="browser"
  131.              persist="collapsed"
  132.              style="display:none;">
  133.       <button class="button-toolbar-4"
  134.               id="formPrefill"
  135.               oncommand="formPrefill();"
  136.               label="  &formPrefill.label;  "
  137.               tooltiptext="&formPrefill.tooltip;"/>
  138.       <toolbarseparator/>
  139.       <button class="button-toolbar-4"
  140.               id="formCapture"
  141.               oncommand="formCapture();"
  142.               label="  &formCapture.label;  "
  143.               tooltiptext="&formCapture.tooltip;"/>
  144.       <toolbarseparator/>
  145.       <button class="button-toolbar-4"
  146.               id="formShow"
  147.               oncommand="formShow(); initToolbarItems();"
  148.               label="  &formView.label;  "
  149.               tooltiptext="&formView.tooltip;"/>
  150.       <toolbarseparator/>
  151.     </toolbar>
  152.   </hbox>
  153. -->
  154.   <menupopup id="taskPopup">
  155.     <menu label="&walletFormManager.label;"
  156.           accesskey="&walletFormManager.accesskey;"
  157.           id="wallet"
  158.           insertafter="menu_searchWeb">
  159.       <menupopup>
  160.         <menuitem id="edit_prefill"
  161.                   label="&prefillCmd.label;"
  162.                   accesskey="&prefillCmd.accesskey;"
  163.                   oncommand="formPrefill();"/>
  164.         <menuitem id="edit_capture"
  165.                   label="&captureCmd.label;"
  166.                   accesskey="&captureCmd.accesskey;"
  167.                   oncommand="formCapture();"/>
  168.         <menuseparator/>
  169.         <menuitem label="&walletContentsCmd.label;"
  170.                   accesskey="&walletContentsCmd.accesskey;"
  171.                   id="walleteditor"
  172.                   oncommand="WalletDialog('wallet');"/> 
  173.         <menuitem label="&walletSitesCmd.label;"
  174.                   accesskey="&walletSitesCmd.accesskey;"
  175.                   id="walletsites"
  176.                   oncommand="WalletDialog('walletsites');"/> 
  177.       </menupopup>
  178.     </menu>
  179.   </menupopup>
  180.  
  181.  
  182. </overlay>
  183.