2016-01-15, 23:52
(2016-01-14, 09:53)Jayz2K Wrote: However, when having a lot of conditions and "bulk" actions it could turn to be hard to write / read the code, don't you think ?
Just my opinion but if the goal is to replace / make easier the <onclick> action, something maybe more "universal" could be :
Code:<settings>
<!-- home layout -->
<setting id="HomeLayout" value="1" label="$LOCALIZE[31309] - 1 row" condition="" icon="" description="">
<onselect condition="Condition1IsTrue">Skin.SetString(MyString1)</onselect>
<onselect condition="Condition2IsTrue">Skin.SetString(MyString2)</onselect>
<onselect condition="Condition3IsTrue">WhateverAction</onselect>
</setting>
<setting id="HomeLayout" value="2" label="$LOCALIZE[31309] - 2 rows" condition="" icon="" description=""/>
<setting id="HomeLayout" value="3" label="$LOCALIZE[31309] - 3 rows" condition="" icon="" description=""/>
</settings>
Great idea! I have just implemented it exactly like your example above.
Can you do a little testing with latest git ?