-
23 Jan 2007 3:09 AM #11
@Condor:
Sorry, you said "Support menu" which I interpreted as "Commercial Support menu." I didn't notice the top-most parent, but I agree now that I look at it that it should probably be highlighted too.
-
23 Jan 2007 6:01 AM #12
> The screenshot shows a 3 level menu: Support > Help Forums > Radio Caption 4.
Actually that top level is not a menu. There is no menubar component (as stated in the orginal post). What is in the screenshot is a 2 level menu triggered by a MenuButton on a Toolbar. Since the MenuButton was created before there was a Menu currently it just has a handler for when the arrow part is clicked (and in that handler I am showing the menu). It actually make sense to make it "Menu Aware" since there is actually built-in Menu support now.
@Luc - Yes. In fact, as I get time, many of the components in Ext are going to get some default context menus (like the grid headers).
@concept - The ribbon bar is hideous and there is no plan to create one. As for tabs, there's already a TabPanel component.
@Animal - Menus from existing markup will be supported. In fact some other components as well are getting a new static function "fromMarkup" or "readMarkup" to generate them from markup. e.g.
var menu = Ext.menu.Menu.fromMarkup('my-menu');
-
23 Jan 2007 6:22 AM #13
Cool. It will be easier to generate nested markup in Java on the server, and go from there.
Will the menu items all have to have <A> elements like the YUI ones? Will it be easy to specify an onclick from markup, or will a known menu item have to be retrieved, and an onclick handler programatically added?
Come of our menu items are links, some call javascript functions. (Although even for links, I hook the onclick anyway, stop propagation, and load the href into a ContentPanel)
-
23 Jan 2007 6:59 AM #14
Jack has anyone ever told you that you are the man?? becuase if they they should.
-
23 Jan 2007 7:06 AM #15
The screenshot was updated - the Ext.Toolbar.MenuButton is now aware of it's menu (it can take a 'menu' config option) and stays highlighted while the menu is visible.
-
23 Jan 2007 7:08 AM #16
Man, that took you an entire hour to fix? You're slacking on us

-
23 Jan 2007 7:10 AM #17
@Animal - Yeah the default version will require A elements. To attach custom onclick handlers, you will have to look the item up and add it manually. However, since the markup reading is not actually part of the component, you will be free to edit it and make it parse whatever structure (or inline onclick handlers) you want.
-
23 Jan 2007 7:15 AM #18
Brian, I am getting slow and senile in my old age....

-
23 Jan 2007 8:21 AM #19
OK, as long as they can be looked up... I had to extend YUI's Menu system to add that capability so that menu items created from markup could be looked up and be postconfigured: have handlers added!
Originally Posted by jacksloc
-
23 Jan 2007 8:31 AM #20
All menu register themselves with the MenuMgr. The menu items are a MixedCollection and can be accessed by id or index. So...
var menu = Ext.menu.MenuMgr.get('menu-id');
menu.items.get('item-id').on('click', ... );
Icons are a little different than YUI as well. They can either be done with a CSS class:
or in the config directly (easier, but css is preferred):Code:// menu item config {text: 'Forum Menu Item', cls: 'forums'.... // css .forums .ext-menu-item-icon { background-image: url(/deploy/yui-ext.0.40-alpha/docs/resources/forum.gif); }
Code:// menu item config {text: 'Forum Menu Item', icon: '/deploy/yui-ext.0.40-alpha/docs/resources/forum.gif' ....
Similar Threads
-
about toolbar with menus?
By franklt69 in forum Ext 2.x: Help & DiscussionReplies: 9Last Post: 17 Jan 2008, 8:13 AM -
Create Toolbar and Menus from markup?
By Saeven in forum Ext 2.x: Help & DiscussionReplies: 7Last Post: 5 Jun 2007, 4:29 AM -
Jack's Screenshots
By Webnet in forum Community DiscussionReplies: 2Last Post: 28 Feb 2007, 9:55 AM -
Error with implementing toolbar menus [SOLVED]
By Jamie Avins in forum Ext 2.x: Help & DiscussionReplies: 3Last Post: 22 Feb 2007, 8:36 AM -
How do you use yui-ext? Post your screenshots
By Skeleton in forum Community DiscussionReplies: 16Last Post: 22 Feb 2007, 1:11 AM


Reply With Quote