PDA

View Full Version : [CLOSED] Moving from 2.1 to 2.2: Button.OverCls not working



sbg
May 30, 2013, 7:04 AM
Hello,

I'm moving to Ext.Net 2.2. In my page I have a button like this:



<ext:Button ID="CancelButton" runat="server" Text="Cancel" Cls="btn-cancel" OverCls="btn-cancel-over"
Width="117" Height="40" Flat="True" Border="False"
meta:resourcekey="CancelButtonResource1">
<Listeners><Click Handler="this.up('form').getForm().reset();" /></Listeners>
</ext:Button>


With Ext.Net 2.1 the over CSS class was applied. Today I linked my page to Ext.Net 2.2 (last version from SVN trunk) and now the class is applied no more.

Daniil
May 30, 2013, 11:22 AM
Hi @sbg,

Now ExtJS prefixed it with Ext.baseCSSPrefix ("x-" by default).

So, please leave

OverCls="btn-cancel-over"
as a Button's property, but change the CSS class name to "x-btn-cancel-over", for example.

.x-btn-cancel-over .x-btn-inner {
color: red;
}

sbg
May 30, 2013, 12:48 PM
Hi Daniil,

so Ext-js add "x-" to any cls I add to controls? or only overcls of buttons?

Thank you!


Hi @sbg,

Now ExtJS prefixed it with Ext.baseCSSPrefix ("x-" by default).

So, please leave

OverCls="btn-cancel-over"
as a Button's property, but change the CSS class name to "x-btn-cancel-over", for example.

.x-btn-cancel-over .x-btn-inner {
color: red;
}

Daniil
May 30, 2013, 1:14 PM
so Ext-js add "x-" to any cls I add to controls?

It would be a big breaking change. I don't think ExtJS did it.


or only overcls of buttons?

I can't guarantee for 100%, but, probably yes, it is done for a Button's OverCls only. If you catch anything else, please report us.