-
Notifications
You must be signed in to change notification settings - Fork 51
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How about adding support of nested menus? #11
Comments
Sub-menu on hover/click will be remarkable. |
I'm working on a PR for this. Will hopefully get it finished this weekend |
Ok here is my fork which offers submenu support: https://github.com/schmoove/bootstrap-menu/tree/master/dist I have refactored it somewhat, replacing "actions" with "menuItems" (which I feel is more consistent with the new functionality and existing options), and removing actionGroups in favor of adding the divider to the "menuItems" object. Bootstrap 3 doesn't support submenus by default, so you will need to include the new BootstrapMenu.css file if you are using Bootstrap 3+ Here's a demo showing how the new "menuItems" option replaces "actions": https://github.com/schmoove/bootstrap-menu/blob/master/docs/submenu-demo.html I've only modified the dist files for now - let me know what you think of these changes, and I can update the src files for a possible PR to the original repo. |
Hello, have tried your fork (from dist-folder), it works. but it seems it needs some logic about positioning nested submenus. screenshot: https://drive.google.com/open?id=0B7YxJcgXibf5OTRQT3FvckRNOHc . |
Yes that's a good idea - I'll work on an update for it.
…On 23 August 2017 at 05:18, lon9man ***@***.***> wrote:
Hello, have tried your fork (from dist-folder), it works. but it seems it
needs some logic about positioning nested submenus. screenshot:
https://drive.google.com/open?id=0B7YxJcgXibf5OTRQT3FvckRNOHc .
so each submenu (on some rendering-point) should analyze will it have
enough space for showing.. if not it should be rendered (in some magic way)
into another direction. what do you think?
thanks
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#11 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ABQqRcpTEsacocr61WMR8AnGUs8nKCf3ks5sbBh-gaJpZM4LdUfQ>
.
|
also can be useful (as option) adding title-attribute into menuitem-DOM, which by default in browsers shows as tooltip. possible use case: short explaining of the meaning for the strange:) text of the menuitem. |
Ok I've added force-left support for submenus if there is no space to the right. If everything checks out I can open a PR if the @dgoguerra is interested in supporting this |
@schmoove |
@schmoove |
@schmoove, it looks like a bug. What i am doing What i got FYI: i have investigated sources in BootstrapMenu.prototype.open-method.
but dgoguerra got it only from options and doesn't use classes from DOM-element:
What i expect |
FYI, seems to be a bug with this fork where a divider immediately following a menuItem with subMenuItems will not render. |
Would it support nested menus(submenus) by options like
?
The text was updated successfully, but these errors were encountered: