-
18 Mar 2011 2:45 AM #1
[FIXED]Menu Item does not respect cls property
[FIXED]Menu Item does not respect cls property
look here:
http://localhost/ext4/examples/form/form-grid.html
when you call a header menu, there are no icons displayed. Inspecting the image tag they are base64 encoded now, but doesn't work. Example:
Code:<img class="x-menu-item-icon " src="data:image/gif;base64,R0lGODlhAQABAID/AMDAwAAAACH5BAEAAAAALAAAAAABAAEAAAICRAEAOw==" id="ext-gen1123">
vg Steffen
--------------------------------------
Release Manager of TYPO3 4.5
energlobe.de - german online magazine
-
18 Mar 2011 4:03 AM #2
is Ext.BLANK_IMAGE_URL, icons in menus are supposed to come from the cls/cssCode:data:image/gif;base64,R0lGODlhAQABAID/AMDAwAAAACH5BAEAAAAALAAAAAABAAEAAAICRAEAOw==
-
-
18 Mar 2011 4:24 AM #3
ok, but how should it work? There is no identifier class, the link now has class
x-menu-item-link
Compare to Ext3 the link was
x-menu-item xg-hmenu-sort-ascvg Steffen
--------------------------------------
Release Manager of TYPO3 4.5
energlobe.de - german online magazine
-
19 Mar 2011 4:05 AM #4
looking to the source, the classes are set
so the bug is in menu render, cls isn't applied.Code:menuItems.unshift({ itemId: 'ascItem', text: me.sortAscText, cls: 'xg-hmenu-sort-asc', handler: me.onSortAscClick, scope: me },{ itemId: 'descItem', text: me.sortDescText, cls: 'xg-hmenu-sort-desc', handler: me.onSortDescClick, scope: me },'-');vg Steffen
--------------------------------------
Release Manager of TYPO3 4.5
energlobe.de - german online magazine
-
19 Mar 2011 5:12 AM #5
and here is the fix - simply forgotten cls property in Ext.menu.Item:
Code:initComponent: function() { var me = this, prefix = Ext.baseCSSPrefix; me.addEvents( /** * @event activate * Fires when this item is activated * @param {Ext.menu.Item} item The activated item */ 'activate', /** * @event click * Fires when this item is clicked * @param {Ext.menu.Item} item The item that was clicked * @param {Ext.EventObject} e The underyling {@link Ext.EventObject}. */ 'click', /** * @event deactivate * Fires when this tiem is deactivated * @param {Ext.menu.Item} item The deactivated item */ 'deactivate' ); var cls = [prefix + 'menu-item']; if (me.plain) { cls.push(prefix + 'menu-item-plain'); } if (me.cls) { cls.push(me.cls); } me.cls = cls.join(' '); if (me.menu) { me.menu = Ext.menu.MenuManager.get(me.menu); } me.callParent(arguments); },vg Steffen
--------------------------------------
Release Manager of TYPO3 4.5
energlobe.de - german online magazine
-
20 Mar 2011 4:42 PM #6
Indeed. Fixed!
Evan Trimboli
Sencha Developer
Twitter - @evantrimboli
Don't be afraid of the source code!
Thank you for reporting this bug. We will make it our priority to review this report.
Similar Threads
-
[CLOSED]Ext.menu.Item --> ref property not implemented correctly
By sdesalas in forum Ext 3.x: BugsReplies: 2Last Post: 6 May 2010, 8:32 AM -
[FIXED-560] menu doesn't respect MaxHeight if enablingScrolling :true
By vladsch in forum Ext 3.x: BugsReplies: 8Last Post: 12 Feb 2010, 9:30 AM -
[FIXED-137][3.0.0] Menu with enableScrolling:false doesn't respect constraints
By elishnevsky in forum Ext 3.x: BugsReplies: 6Last Post: 25 Aug 2009, 5:33 AM -
Menu.item hidden property undefined?
By SlashEMc2k in forum Ext 2.x: Help & DiscussionReplies: 2Last Post: 23 Nov 2007, 11:25 AM -
Collapsed layout region don't respect 'margins' config property.
By MaximGB in forum Ext 1.x: BugsReplies: 0Last Post: 31 Jul 2007, 4:54 PM


Reply With Quote