Categories > TBS next version >

[ request ] Inherit the attributes

The forum is closed. Please use Stack Overflow for submitting new questions. Use tags: tinybutstrong , opentbs
By: RwD
Date: 2005-05-03
Time: 12:19

[ request ] Inherit the attributes

Suppose I have the following template:
<select name="fv_site_status">
    <option value="online">Online</option>
    <option value="offline">Offline</option>
    <option class="currenSelection">[var.settings.site_status.value; selected; noerr]</option>
</select>

Then it would be nice if after the merge any attribute in the selecting option would also appear in the target selected option like in the merged example:
<select name="fv_site_status">
    <option value="online" class="currenSelection">Online</option>
    <option value="offline">Offline</option>
</select>
By: Skrol29
Date: 2005-05-03
Time: 12:51

Re: [ request ] Inherit the attributes

It seems to be a good idea.
I'll see if I can add this in a patch (if there are bugs to fixe) or in the next version.

Nevertheless, the current behavior should stay the default because it also can be a need. Imagine for example that all lines of the listbox has an alternated color using differents CSS class. The developper will probably want to not assign attributes of extra TBS item to the selected item in order to keep the alernated color.

By: Anonymous
Date: 2005-05-03
Time: 22:49

Re: [ request ] Inherit the attributes

Well, I do not understand your concern as it is the developer who will put in the extra attributes and you can have multiple class names inside a class attribute (class="alternateColor1 cellLabel" for example) But I think subclassing is a bit more work as you need to see if the attribute allready exists and stuff. But anyway, people need to specifically add the attributes to the selecting option so the default behaviour is maintained untill they add in attributes :)