krysalis-menu/component/src/java/org/krysalis/menu/component MenuBar.java,1.1,1.2 MenuItem.script,1.2,1.3

Glen Stampoultzis <[email protected]> Tue, 12 Apr 2005 13:24:00 +0000
Newsgroups gmane.comp.krysalis.metamorphosis.cvs
Message-ID <[email protected]>
Update of /cvsroot/metamorphosis/krysalis-menu/component/src/java/org/krysalis/menu/component
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv23187/component/src/java/org/krysalis/menu/component

Modified Files:
	MenuBar.java MenuItem.script 
Log Message:
Fixes

Index: MenuBar.java
===================================================================
RCS file: /cvsroot/metamorphosis/krysalis-menu/component/src/java/org/krysalis/menu/component/MenuBar.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** MenuBar.java	17 Mar 2005 11:51:09 -0000	1.1
--- MenuBar.java	12 Apr 2005 13:23:58 -0000	1.2
***************
*** 60,64 ****
  import org.apache.tapestry.IComponent;
  import org.apache.tapestry.IRequestCycle;
- import org.apache.tapestry.form.IFormComponent;
  import org.apache.tapestry.util.IdAllocator;
  
--- 60,63 ----
***************
*** 72,80 ****
      private static final String MENU_BAR_REQ_ID = "org.krysalis.menu.component.MenuBar.id";
  
!     private IdAllocator elementIdAllocator = new IdAllocator();
  
      protected void prepareForRender( IRequestCycle cycle )
      {
          super.prepareForRender( cycle );
          cycle.setAttribute( MENU_BAR_REQ_ID, this );
      }
--- 71,80 ----
      private static final String MENU_BAR_REQ_ID = "org.krysalis.menu.component.MenuBar.id";
  
!     private IdAllocator elementIdAllocator = null;
  
      protected void prepareForRender( IRequestCycle cycle )
      {
          super.prepareForRender( cycle );
+         elementIdAllocator = new IdAllocator();
          cycle.setAttribute( MENU_BAR_REQ_ID, this );
      }

Index: MenuItem.script
===================================================================
RCS file: /cvsroot/metamorphosis/krysalis-menu/component/src/java/org/krysalis/menu/component/MenuItem.script,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** MenuItem.script	17 Mar 2005 11:51:09 -0000	1.2
--- MenuItem.script	12 Apr 2005 13:23:58 -0000	1.3
***************
*** 107,111 ****
              }
          }
!         if (submenuElement)
          {
              // get top starting from _any_ TD inside the TR (instead of the TR)
--- 107,112 ----
              }
          }
!         debug('class of ' + this.id + ' is ' + this.className);
!         if (containsClass(this, 'hasSubMenu', false))
          {
              // get top starting from _any_ TD inside the TR (instead of the TR)
***************
*** 121,126 ****
--- 122,131 ----
          }
      };
+ 
+     debug('got here. submenuelement = ' + submenuElement);
      if (submenuElement)
      {
+         debug("added submenu class to " + buttonElement.id);
+         addClass( buttonElement, "hasSubMenu" );
          submenuElement.onmouseout = function(e) {
              if (currentSubmenu)
***************
*** 161,165 ****
          </unique>
      </body>
!     <initialization><![CDATA[
!     initItem( document.getElementById('${menuId}'), document.getElementById('${subId}') );]]></initialization>
  </script>
\ No newline at end of file
--- 166,172 ----
          </unique>
      </body>
!     <initialization>
!         <if expression="submenuid"><![CDATA[initItem( document.getElementById('${menuId}'), document.getElementById('${subId}') );]]></if>
!         <if-not expression="submenuid"><![CDATA[initItem( document.getElementById('${menuId}'), null );]]></if-not>
!     </initialization>
  </script>
\ No newline at end of file



-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click