/** * ----------------------------------------------------------------------------- * @package smartVISU * @author Martin Gleiß * @copyright 2012 * @license GPL [http://www.gnu.de] * ----------------------------------------------------------------------------- */ /** * Standard blind * * @param unique id for this widget * @param name of the blind * @param a gad/item for the up- and down- movement * @param a gad/item for stopping the movement (optional) * @param a gad/item for the actual absolute position of the blinds * @param a gad/item for increase- and decreace- of the blade (optional) * @param a gad/item for the actual absolute angle of the blade (optional) * @param the minimum value for close (optional, default 0) * @param the maximum value for open (optional, default 255) * @param step between two values (optional, default 5) * * @info inspired by Frank Berlenz */ {% macro blind(id, txt, gad_move, gad_stop, gad_pos, gad_shift, gad_angle, min, max, step) %} {% import "basic.html" as basic %} {% set uid = uid(page, id) %}
{{ basic.button(id~'up', gad_move, '', 'arrow-u', 0) }}
|
{{ basic.slider(id~'pos', gad_pos, min, max, step, 'vertical') }} |
{{ txt }} {% if gad_angle %} {{ basic.slider(id~'angle', gad_angle, min, max, step, 'semicircle') }} {% endif %} |
{% if gad_stop %}
{{ basic.button(id~'stop', gad_stop, '', 'delete', 1) }} {% endif %} |
||
{{ basic.button(id~'down', gad_move, '', 'arrow-d', 1) }}
|
{% if gad_shift %}
{{ basic.button(id~'minus', gad_shift, '', 'minus', 0) }}
{{ basic.button(id~'plus', gad_shift, '', 'plus', 1) }}
{% endif %}
|
{{ txt|e }}
{{ basic.slider(id~'slider', gad_value, min, max, step) }}
{{ basic.button(id~'up', gad_move, '', 'arrow-u', 0) }}
|
{{ basic.shutter(id, gad_pos, gad_angle, min, max, step, mode) }} |
{% if gad_saved %}
{{ basic.button(id~'saved1', gad_saved, 'Pos1', 'grid', 0) }} {% endif %} |
{% if gad_stop %}
{{ basic.button(id~'stop', gad_stop, '', 'delete', 1) }} {% endif %} |
{{ txt }} | |
{{ basic.button(id~'down', gad_move, '', 'arrow-d', 1) }}
|
{% if gad_saved %}
{{ basic.button(id~'saved2', gad_saved, 'Pos2', 'grid', 1) }} {% endif %} |