Loading ...
Sorry, an error occurred while loading the content.

Menu enhancements that I've made

Expand Messages
  • jpdavenportjr
    First, I like to have our multi-tiered menu in multiple colors, so I added a few simple lines to my copy of menu.js: Line 556: this.useClass =
    Message 1 of 3 , Nov 30, 2006
    • 0 Attachment
      First, I like to have our multi-tiered menu in multiple colors, so I
      added a few simple lines to my copy of menu.js:

      Line 556:

      this.useClass = p_oConfig.useClass || p_oConfig.useClass;

      Line 2321 and Line 2475:

      if(this.useClass) {
      Dom.addClass(this.element, this.useClass);
      }

      This allows my JSON to include the "useClass" attribute to control the
      menus however I want.

      Second, I like the showdelay and hidedelay functions, but the
      hidedelay does not prevent the last submenu from closing when using
      autosubmenudisplay, which is actually the critical one to leave open.
      If you can leave that one open, the user can cut the corner as they
      move over to that submenu. I have tried to make this work, and I'll
      keep at it, but what I've done so far is such an ugly hack, I hate to
      post it.
    • Todd Kloots
      Can you please provide more detail on what you mean by this: hidedelay does not prevent the last submenu from closing when using autosubmenudisplay, which is
      Message 2 of 3 , Nov 30, 2006
      • 0 Attachment
        Can you please provide more detail on what you mean by
        this: "hidedelay does not prevent the last submenu
        from closing when using autosubmenudisplay, which is
        actually the critical one to leave open" ? If it is a
        bug I'd like to fix it.

        Thanks,
        Todd


        --- jpdavenportjr <jacob@...> wrote:

        > First, I like to have our multi-tiered menu in
        > multiple colors, so I
        > added a few simple lines to my copy of menu.js:
        >
        > Line 556:
        >
        > this.useClass = p_oConfig.useClass ||
        > p_oConfig.useClass;
        >
        > Line 2321 and Line 2475:
        >
        > if(this.useClass) {
        > Dom.addClass(this.element, this.useClass);
        > }
        >
        > This allows my JSON to include the "useClass"
        > attribute to control the
        > menus however I want.
        >
        > Second, I like the showdelay and hidedelay
        > functions, but the
        > hidedelay does not prevent the last submenu from
        > closing when using
        > autosubmenudisplay, which is actually the critical
        > one to leave open.
        > If you can leave that one open, the user can cut
        > the corner as they
        > move over to that submenu. I have tried to make
        > this work, and I'll
        > keep at it, but what I've done so far is such an
        > ugly hack, I hate to
        > post it.
        >
        >
        >
        >
        >
        > Yahoo! Groups Links
        >
        > (Yahoo! ID required)
        >
        > mailto:ydn-javascript-fullfeatured@yahoogroups.com
        >
        >
        >
        >
        >
        >
      • jpdavenportjr
        Todd, Sorry, it s not quite a bug, it s more my feature request. I am hoping to write the code to do it, and then share it. Your current hide delay is for
        Message 3 of 3 , Dec 1, 2006
        • 0 Attachment
          Todd,

          Sorry, it's not quite a bug, it's more my feature request. I am
          hoping to write the code to do it, and then share it.

          Your current hide delay is for hiding all open menu items. When you
          have autosubmenudisplay on, and you are hovering over a menu that has
          a submenu, it displays, but it is not among the "all open menu items"
          list, since it closes immediately when stop hovering over the menu
          item. This close is done by line 1942 of menu.js, and there is no
          delay on it.

          It would be nice if it would stay open for some period of time.
          Probably it would be a different delay amount than your current
          hidedelay, since it serves a different purpose. At the most, the
          delay should be the same as the showdelay. The reason to keep it open
          with a delay is so you can go to a submenu without carefully moving
          the mouse along the menu item to get to the submenu.

          For example, in Firefox click on "View" and you see a full menu, one
          of the items is "Character Encoding". Hover over it, and a menu of
          eight or so items appears to the right. If you move in a straight
          line from the word "Character" diagonally down to "English", you
          briefly are not on the item "Character Encoding". Do that quickly,
          and the submenu will still be open by the time you get to the
          "English" item. Do it too slowly, and the submenu disappears.

          The YUI Menus, in contrast, will always close that submenu, and to go
          to an item on that submenu, you have to mover in a straight line over
          the menu item to the first item on the submenu, then move down.

          Once I've implemented my own version of this enhancement, I'll post
          again how I did it. It's not trivial, like my "useClass" enhancement is.

          -Jacob
        Your message has been successfully submitted and would be delivered to recipients shortly.