ICEfaces
  1. ICEfaces
  2. ICE-8880

ace:menuBar - Add a way to show the submenu centred under the menu item

    Details

    • Type: Improvement Improvement
    • Status: Closed
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: EE-3.0.0.GA_P01, 3.2, EE-3.2.0.BETA
    • Fix Version/s: 3.3
    • Component/s: ACE-Components
    • Labels:
      None
    • Environment:
      All
    • Assignee Priority:
      P1
    • Salesforce Case Reference:
    • Affects:
      Documentation (User Guide, Ref. Guide, etc.)

      Description

      Feature Request: Add a way to show the sub menu's of a multi column menuBar centred on the screen.

      At the moment the sub menu items will display to the left or right of its parent item. For example, if there are three main menu items (Menu One, Menu Two, Menu Three) display horizontally. Menu two has five sub menu items. With the current implementation these menu items will display to the left or right starting with the first sub-menu item. Depending on browser area and positioning these sub-menu items can wrap to a new line.

      This feature request is to display the sub-menu items centred under the parent menu item. From the example mentioned before this would make the first two menu items display to the left, one will be centred under the parent, and then two more to the right, all on one line.

        Activity

        Hide
        Arturo Zambrano added a comment -

        I have a possible solution for this request. What I have right now is added support for the 'center' and 'middle' keywords in the 'direction' attribute.

        If you use the 'center' keyword (instead of 'left' or 'right') it will center ALL the 1st level submenus of the menu bar, as in the issue description above. It's not clear to me if the is request is to only center ace:multiColumnSubmenu's or all submenus.

        The 'middle' keyword was also added to vertically center all 2nd and deeper level submenus of a menu bar (instead of 'up' or 'down').

        Show
        Arturo Zambrano added a comment - I have a possible solution for this request. What I have right now is added support for the 'center' and 'middle' keywords in the 'direction' attribute. If you use the 'center' keyword (instead of 'left' or 'right') it will center ALL the 1st level submenus of the menu bar, as in the issue description above. It's not clear to me if the is request is to only center ace:multiColumnSubmenu's or all submenus. The 'middle' keyword was also added to vertically center all 2nd and deeper level submenus of a menu bar (instead of 'up' or 'down').
        Hide
        Mark Collette added a comment -

        Does wijmo use jQuery's position api? Because that allows for center/left/right positioning, so we'd only need to pass that option in and modify wijmo to use it.

        Show
        Mark Collette added a comment - Does wijmo use jQuery's position api? Because that allows for center/left/right positioning, so we'd only need to pass that option in and modify wijmo to use it.
        Hide
        Arturo Zambrano added a comment -

        Yes, it does. I already have that code to center the submenu body relative to the submenu label. I think the customer is also interested is centering the submenu body relative to the entire menu bar and also relative to the entire page, so for that we'll need to be able to specify an exact position ourselves.

        Show
        Arturo Zambrano added a comment - Yes, it does. I already have that code to center the submenu body relative to the submenu label. I think the customer is also interested is centering the submenu body relative to the entire menu bar and also relative to the entire page, so for that we'll need to be able to specify an exact position ourselves.
        Hide
        Mark Collette added a comment -

        One of the arguments for the jQuery positioning api is what to position relative to, so if we have a property where they can specify "document" / "menubar" / "label", then we could resolve the appropriate DOM element, and modify wijmo to use that along with the center/left/right property value.

        Show
        Mark Collette added a comment - One of the arguments for the jQuery positioning api is what to position relative to, so if we have a property where they can specify "document" / "menubar" / "label", then we could resolve the appropriate DOM element, and modify wijmo to use that along with the center/left/right property value.
        Hide
        Arturo Zambrano added a comment -

        That sounds like a good idea. I know that would be possible for centering the submenus relative to the menu bar. I'm not sure if it'll work for centering in the document, since the position() function expects a node to position against (e.g. above or below). Such property would only apply for horiztonal positioning I guess, since it wouldn't make much sense for vertical positioning I think.

        Show
        Arturo Zambrano added a comment - That sounds like a good idea. I know that would be possible for centering the submenus relative to the menu bar. I'm not sure if it'll work for centering in the document, since the position() function expects a node to position against (e.g. above or below). Such property would only apply for horiztonal positioning I guess, since it wouldn't make much sense for vertical positioning I think.
        Hide
        Arturo Zambrano added a comment -

        Committed support for 'center' and 'middle' values in the 'direction' attribute at revision 33366.

        Committed, at revision 33467, addition of 'positionTop', 'positionLeft' and 'relativeTo' attributes to ace:submenu and ace:multiColumnSubmenu to use with ace:menuBar.

        Show
        Arturo Zambrano added a comment - Committed support for 'center' and 'middle' values in the 'direction' attribute at revision 33366. Committed, at revision 33467, addition of 'positionTop', 'positionLeft' and 'relativeTo' attributes to ace:submenu and ace:multiColumnSubmenu to use with ace:menuBar.
        Hide
        Arturo Zambrano added a comment -

        Made commit to trunk at revision 33467, adding the following attributes to ace:submenu and ace:multiColumnSubmenu: positionTop, positionLeft, and relativeTo.

        Show
        Arturo Zambrano added a comment - Made commit to trunk at revision 33467, adding the following attributes to ace:submenu and ace:multiColumnSubmenu: positionTop, positionLeft, and relativeTo.

          People

          • Assignee:
            Arturo Zambrano
            Reporter:
            Arran Mccullough
          • Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: