/** * ----------------------------------------------------------------------------- * @package smartVISU * @author Martin Gleiß * @copyright 2012 - 2015 * @license GPL [http://www.gnu.de] * ----------------------------------------------------------------------------- */ /** * Standard blind * * @param unique id for this widget * @param name of the blind * @param a item for the up- and down- movement * @param a item for stopping the movement (optional) * @param a item for the actual absolute position of the blinds * @param a item for increase- and decreace- of the blade (optional) * @param a 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, item_move, item_stop, item_pos, item_shift, item_angle, min, max, step) %} {% import "basic.html" as basic %} {% set uid = uid(page, id) %}
{{ basic.button(id~'up', item_move, '', 'arrow-u', 0) }}
|
{{ basic.slider(id~'pos', item_pos, min, max, step, 'vertical') }} |
{{ txt }} {% if item_angle %} {{ basic.slider(id~'angle', item_angle, min, max, step, 'semicircle') }} {% endif %} |
{% if item_stop %}
{{ basic.button(id~'stop', item_stop, '', 'delete', 1) }} {% endif %} |
||
{{ basic.button(id~'down', item_move, '', 'arrow-d', 1) }}
|
{% if item_shift %}
{{ basic.button(id~'minus', item_shift, '', 'minus', 0) }}
{{ basic.button(id~'plus', item_shift, '', 'plus', 1) }}
{% endif %}
|
{{ txt|e }}
{{ basic.slider(id~'slider', item_value, min, max, step) }}
{{ basic.button(id~'up', item_move, '', 'arrow-u', 0) }}
|
{{ basic.shutter(id, item_pos, item_angle, min, max, step, mode) }} |
{% if item_saved %}
{{ basic.button(id~'saved1', item_saved, 'Pos1', 'grid', 0) }} {% endif %} |
{% if item_stop %}
{{ basic.button(id~'stop', item_stop, '', 'delete', 1) }} {% endif %} |
{{ txt }} | |
{{ basic.button(id~'down', item_move, '', 'arrow-d', 1) }}
|
{% if item_saved %}
{{ basic.button(id~'saved2', item_saved, 'Pos2', 'grid', 1) }} {% endif %} |