home *** CD-ROM | disk | FTP | other *** search
/ PC World 2007 March / PCWorld_2007-03_cd.bin / komunikace / nvu / nvu-1.0-cs-CZ.win32.installer.exe / chrome / help.jar / content / help / toolbarCustomization.js < prev   
Text File  |  2005-06-21  |  1KB  |  37 lines

  1. function CustomizeToolbar(id)
  2. {
  3.   var customizePopup = document.getElementById("cmd_CustomizeToolbars");
  4.   customizePopup.setAttribute("disabled", "true");
  5.  
  6.   window.openDialog("chrome://help/content/customizeToolbar.xul", "CustomizeToolbar",
  7.                     "chrome,all,dependent", document.getElementById(id));
  8. }
  9.  
  10. function ToolboxCustomizeDone(aToolboxChanged)
  11. {
  12.   var customizePopup = document.getElementById("cmd_CustomizeToolbars");
  13.   customizePopup.removeAttribute("disabled");
  14.  
  15.   if (this.UpdateToolbar != undefined)
  16.     UpdateToolbar(focus);
  17.  
  18.   var sidebarButton = document.getElementById("help-sidebar-button");
  19.   var strBundle = document.getElementById("bundle_help");
  20.   if (document.getElementById("helpsidebar-box").hidden) {
  21.     sidebarButton.label = strBundle.getString("showSidebarLabel");
  22.   } else {
  23.     sidebarButton.label = strBundle.getString("hideSidebarLabel");
  24.   }
  25. }
  26.  
  27. function UpdateToolbar(caller)
  28. {
  29.   document.commandDispatcher.updateCommands('help-toolbar');
  30.  
  31.   var customizePopup = document.getElementById("cmd_CustomizeToolbars");
  32.   customizePopup.removeAttribute("disabled");
  33.  
  34.   var observerService = Components.classes["@mozilla.org/observer-service;1"].getService(Components.interfaces.nsIObserverService);
  35.   observerService.notifyObservers(window, "help:updateToolbarItems", null);
  36. }
  37.