Open GoogleCodeExporter opened 9 years ago
Here the correction:
{% macro shifter(id, gad_switch, gad_value, pic_on, pic_off, minval, maxval) %}
{% import "icon.html" as icon %}
{% if pic_on|slice(0, 5) == 'icon.' %}
{{ attribute(icon, pic_on|slice(5), [id, gad_switch, gad_value, '', minval, maxval]) }}
{% else %}
<span id="{{ uid(page, id) }}" data-widget="basic.shifter" data-item="{{ gad_value }}, {{ gad_switch }}"
{% set pic_on = pic_on|default(icon1~'light_light_dim_00.png') %}
data-pic-on="{{ pic_on }}" data-pic-off="{{ pic_off |default(icon0~pic_on|slice(icon1|length)) }}"
data-min="{{ minval|default('0') }}" data-max="{{ maxval|default('255') }}"
class="switch"><a><img class="icon" src="{{ pic_off|default(icon0~'light_light_dim_00.png') }}" /></a>
</span>
{% endif %}
{% endmacro %}
Original comment by bernd.ge...@gmail.com
on 11 Dec 2014 at 10:37
Original issue reported on code.google.com by
bernd.ge...@gmail.com
on 11 Dec 2014 at 10:29