Skip to content
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

Context menu #1757

Closed
Guite opened this issue Jun 13, 2014 · 14 comments
Closed

Context menu #1757

Guite opened this issue Jun 13, 2014 · 14 comments

Comments

@Guite
Copy link
Member

Guite commented Jun 13, 2014

The core doesn't have a good replacement for Zikula.UI.ContextMenu yet.

One can use bootstrap dropdown menus for it, but it becomes a bit ugly (much manual code): http://stackoverflow.com/questions/18666601/use-bootstrap-3-dropdown-menu-as-context-menu

Another possibility is https://github.com/zikula/core/tree/1.4/src/javascript/plugins/jQuery-contextMenu which isn't prepared for bootstrap yet though.

@craigh
Copy link
Member

craigh commented Jun 13, 2014

refs #1123 (closed)

@craigh craigh added the Blocker label Jun 13, 2014
@craigh craigh mentioned this issue Jun 13, 2014
23 tasks
@phaidon
Copy link
Contributor

phaidon commented Jun 15, 2014

What do you think about something like that:
http://sydcanem.github.io/bootstrap-contextmenu/

@Guite
Copy link
Member Author

Guite commented Jun 15, 2014

Simple but terrific :-)

@phaidon
Copy link
Contributor

phaidon commented Jun 15, 2014

the style we can change in the stylesheet.

the question for me is more if we want to support something with right mouse click. this is unusable with touch devices.

@Guite
Copy link
Member Author

Guite commented Jun 15, 2014

For activating the context menu itself we are using left clicks.

The generator extends Zikula.UI.ContextMenu so that you can left-click or right-click the menu entries though. While a left click just redirects to the corresponding page (window.location = '...'), a right click opens this page in a new window (window.open).

@jusuff
Copy link
Member

jusuff commented Jun 16, 2014

@Guite Check this one: http://medialize.github.io/jQuery-contextMenu/
There is in 1.4 branch unfinished plugin for zikula with some improvements to this plugin:
https://github.com/zikula/core/blob/1.4/src/javascript/zikula-plugins/zikula.plugins.contextmenu.js

Need to review this because there's no docs in code and I don't remember what was added to original plugin. But back then context menu from medialize was the best jQuery based context menu I found.

@Guite
Copy link
Member Author

Guite commented Jun 30, 2014

@jusuff I have two questions about http://medialize.github.io/jQuery-contextMenu/

  1. would it be possible to incorporate it with bootstrap with regards to styling?
    For example icons are handled like this:
                    if (item.icon) {
                        $t.addClass("icon icon-" + item.icon);
                    }

while we would need fa fa-icon.

  1. If I understood correctly the plugin at https://github.com/zikula/core/blob/1.4/src/javascript/zikula-plugins/zikula.plugins.contextmenu.js controls the script located at https://github.com/zikula/core/tree/1.4/src/javascript/plugins/jQuery-contextMenu - is this correct? Do you remember what is unfinished there?

@phaidon
Copy link
Contributor

phaidon commented Jun 30, 2014

@Guite there is a context menu (dropdown) already in bootstrap.
http://getbootstrap.com/javascript/#dropdowns

  • Multilevel is possible, too
  • The style can be changed (it is just so big and ugly for touch - but we can make it more responsive).

@Guite
Copy link
Member Author

Guite commented Jul 1, 2014

@phaidon I would love to reuse Bootstrap dropdown menus for that instead of introducing another component. As I wrote in the initial issue text it seems not that easy though to make a context menu with it (open on left and/or right click, positioning at the mouse cursor, etc.). Please see http://stackoverflow.com/questions/18666601/use-bootstrap-3-dropdown-menu-as-context-menu with regards to this. Any idea how to handle this? Maybe a thin wrapper layer encapsulating Bootstrap dropdown would be reasonable?

@phaidon
Copy link
Contributor

phaidon commented Jul 2, 2014

open on left and/or right click

the pure bootstrap dropdown supports left click on a given element. Right click is imho broken by design, but if you really need I can add it.

positioning at the mouse cursor

the pure bootstrap dropdown is placed under the calling element. Is that not good?

etc

What else do you need?

@Guite
Copy link
Member Author

Guite commented Jul 2, 2014

You are right... let me rethink this after I implemented the new tree ;-)

@Guite
Copy link
Member Author

Guite commented Jul 6, 2014

Closed since the pure bootstrap dropdown is sufficient. If usability problems occur we can still approach them in a later version of course.

@Guite Guite closed this as completed Jul 6, 2014
@Guite
Copy link
Member Author

Guite commented Jul 6, 2014

@Guite Guite added the Wont fix label Jul 6, 2014
@Guite
Copy link
Member Author

Guite commented Oct 4, 2014

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants