home *** CD-ROM | disk | FTP | other *** search
/ MacFormat 2000 July / macformat-092.iso / Dreamweaver 3 / Configuration / Menus / MM / Window_Floaters.js < prev    next >
Encoding:
Text File  |  1999-12-01  |  1.3 KB  |  45 lines

  1. // Copyright 1999 Macromedia, Inc. All rights reserved.
  2.  
  3. function isAtLeastOneFloaterVisible()
  4. {
  5.     var bResult = false;
  6.     if (
  7.         dw.getFloaterVisibility('objects') || dw.getFloaterVisibility('properties') ||
  8.         dw.getFloaterVisibility('launcher') || dw.getFloaterVisibility('') ||
  9.         dw.getFloaterVisibility('library') || dw.getFloaterVisibility('html styles') ||
  10.         dw.getFloaterVisibility('css styles') || dw.getFloaterVisibility('behaviors') ||
  11.         dw.getFloaterVisibility('timelines') || dw.getFloaterVisibility('html') ||
  12.         dw.getFloaterVisibility('layers') || dw.getFloaterVisibility('frames') ||
  13.         dw.getFloaterVisibility('templates') || dw.getFloaterVisibility('history')
  14.         )
  15.         bResult=true;
  16.  
  17.     return bResult;
  18. }
  19.  
  20. function receiveArguments()
  21. {
  22.     dw.setHideAllFloaters(!dw.getHideAllFloaters());
  23. }
  24.  
  25. function canAcceptCommand()
  26. {
  27.     // we only enable the Hide Floaters menu item if at least one floater is available.
  28.     if (!dw.getHideAllFloaters())
  29.         return isAtLeastOneFloaterVisible();
  30.     else
  31.         return true;
  32. }
  33.  
  34. // setMenuText is called by Dreamweaver to set the text of
  35. // a menu item. We do this when our menu item is dynamic
  36. // only in that the text changes, rather than having to
  37. // write a full-blown dynamic menu.
  38. function setMenuText()
  39. {
  40.     if (!dw.getHideAllFloaters())
  41.         return MENU_HideFloatingPalettes;
  42.     else
  43.         return MENU_ShowFloatingPalettes;
  44. }
  45.