-
10 Aug 2010 6:04 AM #1
[OPEN-1191] Panel setIconClass function does not work properly
[OPEN-1191] Panel setIconClass function does not work properly
Ext version tested:
- Ext 3.2.2
Adapter used:
- ext
css used:
- only default ext-all.css
Browser versions tested against:
- FF3
Operating System:
- Win Vista
Description:
- The Ext.Element.removeClass function does not work in 3.2.2 anymore if you want to remove multiple classes at once.
Steps to reproduce the problem:
For example, I want to change the icon in the header of a panel and the image has two classes set like this:
If I use setIconClass("some-class-three") on the panel I would expect thatCode:<img class="some-class-one some-class-two" src="ext-js/resources/images/default/s.gif" id="ext-gen542">
"some-class-one" and "some-class-two" would be removed and only "some-class-three" would be there instead.
But removeClass fails to remove "some-class-one some-class-two" so "some-class-three" is added and you have
"some-class-one some-class-two some-class-three" as a result.
The result that was expected:
The result that occurs instead:Code:<img class="some-class-three" src="ext-js/resources/images/default/s.gif" id="ext-gen542">
Debugging already done:Code:<img class="some-class-one some-class-two some-class-one some-class-two some-class-three" src="ext-js/resources/images/default/s.gif" id="ext-gen542">
- none
Possible fix:
- not provided
-
10 Aug 2010 6:36 AM #2
It works as documented.
Just removed both classes from that grid header.Code:Ext.get("ext-gen8070").removeClass(["x-grid3-hd-inner", "x-grid3-hd-3"]);Search the forum: http://www.google.com/coop/cse?cx=01...%3Az7of1ufqccu
Read the docs too: http://extjs.com/deploy/dev/docs/
Scope: http://extjs.com/forum/showthread.ph...642#post257642
-
10 Aug 2010 7:35 AM #3
Then Ext.Panel.setIconClass does not use the "removeClass" function properly.
In the docs it says: "This method will replace any existing icon class if one has already been set". Butjust adds "testxxxxxtest" and does not remove any existing classes.Code:Ext.getCmp("ext-comp-1187").setIconClass("testxxxxxtest")
-
10 Aug 2010 8:06 AM #4Sencha - Sencha Touch Dev Team
- Join Date
- Mar 2007
- Location
- Redwood City, California
- Posts
- 3,652
- Vote Rating
- 14
Updated the thread title, thanks for the report. Documentation may need to be adjusted.
Thank you for reporting this bug. We will make it our priority to review this report.
Similar Threads
-
[OPEN-983] Compositefield doesn't work properly with trackResetOnLoad
By astoltz in forum Ext 3.x: BugsReplies: 0Last Post: 20 May 2010, 12:45 PM -
Grid with search function - paging doesn't work properly....
By wurstkuchen in forum Ext 3.x: Help & DiscussionReplies: 0Last Post: 15 Apr 2010, 4:20 AM -
[FIXED-175][3.0.0] setIconClass not rendering icon properly
By piyushjain7 in forum Ext 3.x: BugsReplies: 2Last Post: 24 Aug 2009, 10:30 PM -
Can't get button.setIconClass to work.
By omermx in forum Ext 3.x: Help & DiscussionReplies: 0Last Post: 20 Jul 2009, 5:16 AM -
[2.1] setIconClass does not work for individual tab
By nicholasnet in forum Ext 2.x: BugsReplies: 7Last Post: 25 Oct 2008, 5:56 AM


Reply With Quote