mardi 29 avril 2014

Why does Ext 4.2 use x-form-trigger-first and 4.1 used x-form-trigger-last?

So you have a combo box that has a trigger.

In 4.1.x The last trigger button in a combo gets the cls (amongst others) of x-form-trigger-last:



Code:



...
triggerConfigs[i - 1].cn.cls += ' ' + triggerBaseCls + '-last';
...



But in 4.2 the *first* trigger gets x-form-trigger-first:

Code:



...
triggerConfigs[0].cn.cls += ' ' + triggerBaseCls + '-first';
...

Why is that such a problem?

Because you can always guarantee the position of the last trigger but not the first - last is always the right-most, first is only right-most if there's only one trigger.


So if, for example you want to make sure your right most trigger has a right border but others don't - easy in 4.1 and very difficult in 4.2:


http://ift.tt/1m8ry4a


Looking at the markup you can see why:


http://ift.tt/1mX8GSt


If the triggers were in the same table cell, we could rely on :first-of-type, :last-of-type. But they're not.


I can't see any meaningful reason why this change would be necessary. Can anyone help enlighten me?





Aucun commentaire:

Enregistrer un commentaire