PDA

View Full Version : [CLOSED][DUP][3.0.0 svn r3122] FormLayout labelStyle



jeffypop13
10 Jul 2009, 8:46 AM
I was using an override in 2.x to combine styles on the form panel and field. By default, any style on the form panel (really, just labelWidth) would be overwritten by the field's labelStyle. The solution was here http://extjs.com/forum/showthread.php?p=228591.

This broke in 3.0. I did some digging and decided to override getTemplateArgs instead:



Ext.override(Ext.layout.FormLayout, {
getTemplateArgs: function(field) {
var noLabelSep = !field.fieldLabel || field.hideLabel;
return {
id: field.id,
label: field.fieldLabel,
labelStyle: (this.labelStyle || '') + ';' + (field.labelStyle || ''),
elementStyle: this.elementStyle || '',
labelSeparator: noLabelSep ? '' : (typeof field.labelSeparator == 'undefined' ? this.labelSeparator : field.labelSeparator),
itemCls: (field.itemCls || this.container.itemCls || '') + (field.hideLabel ? ' x-hide-label' : ''),
clearCls: field.clearCls || 'x-form-clear-left'
};
}
});


If anyone knows of a better way, please post.

mjlecomte
10 Jul 2009, 9:58 AM
If anyone knows of a better way, please post.
Yeah, grab latest from svn. :) Patch was committed to trunk within last week.

jeffypop13
6 Aug 2009, 5:38 AM
Yeah, grab latest from svn. :) Patch was committed to trunk within last week.

It appears that revision 3122 reverted your patch from FormLayout.js. Can this be added back in?

mjlecomte
6 Aug 2009, 5:45 AM
It appears that revision 3122 reverted your patch from FormLayout.js. Can this be added back in?

Recommend you find / create the appropriate bug report/thread to bump...this thread is not the place.

mjlecomte
6 Aug 2009, 5:49 AM
I went ahead and moved the related posts to their own thread in bug section for time being.

Please review and update your post in accordance with this thread as appropriate to more efficiently address any issue (test case for example).

http://extjs.com/forum/showthread.php?t=71015

jeffypop13
6 Aug 2009, 6:13 AM
I want to follow protocol if appropriate, but this bug was already looked at and fixed in the ext-3.0.x branch. I briefly described the issue in the first post on this thread.

In revision 2943, evant added a private getLabelStyle() and altered renderItem() to use it. This fixed the issue.

In revision 3122, tommymaintz altered renderItem(), which removed the call to getLabelStyle(), which reverted the fix for the issue.

I see that is has been re-fixed in the trunk (revision 4771), but I'd like to see this get applied to the maint branch as well.

Let me know if you require more information.

mjlecomte
6 Aug 2009, 9:46 AM
Ok, that recap is helpful, I didn't follow the trail. So for clarification, are you saying that there has been a fix applied to the trunk branch but you are reminding/requesting that this fix needs to be applied to the patch branch to be included with 3.0.1?

jeffypop13
6 Aug 2009, 9:52 AM
Yes, that is precisely what I'm requesting.

mjlecomte
6 Aug 2009, 10:32 AM
Ok, so basically that means this thread is a DUP of http://extjs.com/forum/showthread.php?t=73804.

The thread is specified in the revision you mentioned.

So I'm going to update the STATUS of this thread to CLOSED, DUP.

Threads marked TENT have not been applied to the patch branch yet. You could bump/subscribe to that linked thread to monitor status.