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

Actions can not be added to menu #81

Open
szpapas opened this issue Feb 11, 2016 · 1 comment
Open

Actions can not be added to menu #81

szpapas opened this issue Feb 11, 2016 · 1 comment

Comments

@szpapas
Copy link

szpapas commented Feb 11, 2016

http://www.rubydoc.info/github/netzke/netzke-core#Actions__toolbars__and_menus

Actions can also be referred to is submenus:
c.tbar = [{text: 'Menu', menu: {items: [:show_report]}}]

I played with netzke-demo, and change the Applcaction.rb title_html to menu like this:

tbar: [{text:'Menu', menu: {items: [:about]} },'->', :about, current_user ? :sign_out : :sign_in],

The dropdown menu displayed without any text and can not response to the click events.

When viewed source in chrome, I got :

Ext.onReady(function(){
Netzke.page.application = Ext.create("widget.application", {"className":"Application","name":"application","introHtml":"Click on a demo component in the navigation tree",
"items":[{"layout":"border","tbar":[{"text":"Menu","menu":{"items":[{"action":"about"}]}},"-\u003e",{"action":"about"},{"action":"signIn"}],"items":[{"region":"west","itemId":"navigation","width":300,"split":true,"xtype":"treepanel",
@mxgrn
Copy link

mxgrn commented Feb 16, 2016

If you replace menu: {items: [:about]} with menu: [:about] it'll work. I guess I didn't pay enough attention to the fact that, besides specifying items as an array, one may want to configure other aspects of the menu. Need to look into this again, thanks for reporting!

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

No branches or pull requests

2 participants