Skip to content

Commit

Permalink
Merge pull request Martin-Gleiss#18 from Martin-Gleiss/develop
Browse files Browse the repository at this point in the history
merge upstream changes
  • Loading branch information
wvhn authored Apr 9, 2020
2 parents f6976a8 + 09a89b7 commit 66dacdf
Show file tree
Hide file tree
Showing 6 changed files with 30 additions and 20 deletions.
10 changes: 5 additions & 5 deletions pages/docu/device/widget_device.smallshut.html
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ <h5>Example</h5>
<!-- block space till end of line, remove if uzsu wanted -->
<span class="ui-shut-btn" style="height: 44px;"> </span>
<div class="smallshut_wrapper">
{{ device.smallshut('SmS1', 'Bad', 'bath.blind.move', 'bath.blind.stop', 'bath.blind.pos', '') }}
{{ device.smallshut('SmS2', 'Bad', 'bath.blind.move', 'bath.blind.stop', 'bath.blind.pos', '') }}
{{ device.uzsuicon('uzsu1', 'uzsuitem') }}
</div>
</div>
Expand All @@ -48,7 +48,7 @@ <h5>Example</h5>
<!-- block space till end of line, remove if uzsu wanted -->
<span class="ui-shut-btn" style="height: 44px;"> </span>
<div class="smallshut_wrapper">
{{ device.smallshut('SmS1', 'Bad', 'bath.blind.move', 'bath.blind.stop', 'bath.blind.pos', '') }}
{{ device.smallshut('SmS2', 'Bad', 'bath.blind.move', 'bath.blind.stop', 'bath.blind.pos', '') }}
{{ device.uzsuicon('uzsu1', 'uzsuitem') }}
</div>
</div>
Expand All @@ -64,10 +64,10 @@ <h5>Example</h5>
<div class="block" style="width: 100%">
<div class="ui-bar-c ui-li-divider ui-corner-top">Shutter Table with type = midi</div>
<div class="ui-fixed ui-body-a ui-corner-bottom" style="text-align: left; padding-left: 5%;">
{{ device.smallshut('SmS2', 'Wohnzimmer', 'bath.blind.move', 'bath.blind.stop', 'bath.blind.pos', 'bath.blind.adjust', 'mini') }}
{{ device.smallshut('SmS3', 'Wohnzimmer', 'bath.blind.move', 'bath.blind.stop', 'bath.blind.pos', 'bath.blind.adjust', 'mini') }}
<span class="ui-shut-btn" style="height: 44px;"> </span> <!-- block space till end of line, remove if uzsu wanted -->
{{ device.smallshut('SmS2', 'Bad', 'bath.blind.move', 'bath.blind.stop', 'bath.blind.pos', '', 'mini') }}
{{ device.uzsuicon('uzsu1', 'uzsuitem') }}
{{ device.smallshut('SmS4', 'Bad', 'bath.blind.move', 'bath.blind.stop', 'bath.blind.pos', '', 'mini') }}
{{ device.uzsuicon('uzsu2', 'uzsuitem') }}
</div>
</div>

Expand Down
13 changes: 10 additions & 3 deletions pages/docu/quad/widget_quad.dimmer.html
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,14 @@
io.write('licht.automatik.lock', '0');
io.write('bwm.sperren', '0');
io.write('licht.zwangvalue', '0');
});

$( "#widget_quad_dimmer-dimmer1dimmerpopup_slider, #widget_quad_dimmer-dimmer2_slider_inline, #widget_quad_dimmer-dimmer3dimmerpopup_slider" ).change(function(){
if (this.value > 0)
io.write('licht.SA', '1' );
else
io.write('licht.SA', '0' );
});
});
</script>

{% set stateengine = {} %}
Expand Down Expand Up @@ -71,12 +78,12 @@ <h5>Example</h5>
['uzsu', 'stateengine', 'plot', 'value_popup', 'switch', 'locks', ' '] stateengine with popup (have to long tap to open popup!)
<div class="twig">
<code class="prettyprint">{% filter trim|escape|nl2br %}{% raw %}
{{ quad.dimmer('dimmer1', 'Dimmer Example 1', 'licht.SA', 'licht.dimmen', 0, 255, 1, icon.light('','','licht.dimmen'), icon.light('','','licht.dimmen'), 'icon1', 'icon0', '', '', '100', 'right', 'blink', '', 'licht.dimmen.zeitschalter', ['', '', 'bool'], '%', 'licht.dimmen', '', 'licht.automatik', (stateengine['item1']), ['', 'bwm.sperren', 'licht.zwangvalue'], '', '', ['uzsu', 'stateengine', 'plot', 'value_popup', 'switch', 'locks', ' ']) }}
{{ quad.dimmer('dimmer1', 'Dimmer Example 1', 'licht.SA', 'licht.dimmen', 0, 255, 1, icon.light('','','licht.dimmen','','','blue'), icon.light('','','licht.dimmen'), 'blue', 'icon0', '', '', '100', 'right', 'blink', '', 'licht.dimmen.zeitschalter', ['', '', 'bool'], '%', 'licht.dimmen', '', 'licht.automatik', (stateengine['item1']), ['', 'bwm.sperren', 'licht.zwangvalue'], '', '', ['uzsu', 'stateengine', 'plot', 'value_popup', 'switch', 'locks', ' ']) }}
{% endraw %}{% endfilter %}</code>
</div>
<div class="html">
<ul data-role="listview" data-dividertheme="c" class="quad_list">
{{ quad.dimmer('dimmer1', 'Dimmer Example 1', 'licht.SA', 'licht.dimmen', 0, 255, 1, icon.light('','','licht.dimmen'), icon.light('','','licht.dimmen'), 'icon1', 'icon0', '', '', '100', 'right', 'blink', '', 'licht.dimmen.zeitschalter', ['', '', 'bool'], '%', 'licht.dimmen', '', 'licht.automatik', (stateengine['item1']), ['', 'bwm.sperren', 'licht.zwangvalue'], '', '', ['uzsu', 'stateengine', 'plot', 'value_popup', 'switch', 'locks', ' ']) }}
{{ quad.dimmer('dimmer1', 'Dimmer Example 1', 'licht.SA', 'licht.dimmen', 0, 255, 1, icon.light('','','licht.dimmen','','','blue'), icon.light('','','licht.dimmen'), 'blue', 'icon0', '', '', '100', 'right', 'blink', '', 'licht.dimmen.zeitschalter', ['', '', 'bool'], '%', 'licht.dimmen', '', 'licht.automatik', (stateengine['item1']), ['', 'bwm.sperren', 'licht.zwangvalue'], '', '', ['uzsu', 'stateengine', 'plot', 'value_popup', 'switch', 'locks', ' ']) }}
</ul></div>

['switch', 'value_slider']
Expand Down
7 changes: 4 additions & 3 deletions pages/docu/status/widget_status.message.html
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,10 @@
{% extends "widget_status.html" %}

{% block example %}

<script>
io.write('bath.alert.text', 'This is text from an item');
io.write('bath.time', '01.01.2020 10:56:20');
</script>
<h5>Examples</h5>

If you flip the switch to 'on' a popup will be shown.
Expand All @@ -36,5 +39,3 @@ <h5>Examples</h5>
</div>

{% endblock %}


7 changes: 4 additions & 3 deletions pages/docu/status/widget_status.notify.html
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,10 @@
{% extends "widget_status.html" %}

{% block example %}

<script>
io.write('bath.alert.text', 'This is text from an item');
io.write('bath.time', '01.01.2020 10:56:20');
</script>
<h5>Examples</h5>

If you flip the switch to 'on' the alert is been triggerd and the notification will be shown.
Expand All @@ -32,5 +35,3 @@ <h5>Examples</h5>
</div>

{% endblock %}


3 changes: 2 additions & 1 deletion widgets/basic.html
Original file line number Diff line number Diff line change
Expand Up @@ -302,8 +302,9 @@
*
* @param {id=} unique id for this widget (optional)
* @param {item[?]} one or more item(s). Multiple items in array-form: [item1, item2]
* @param {format(text,html,script,text2br)=} either a unit of the language file, an individual format string (PHP sprintf like) or a simple string as suffix.
* @param {format=} either a unit of the language file, an individual format string (PHP sprintf like) or a simple string as suffix.
Use 'text' to display result as unformatted string, 'html' to render it as unescaped html, 'text2br' to convert line endings like '\r', '\n' or '\r\n' to HTML breaks or 'script' to just execute as JavaScript w/o displaying anything.
* @ add {format(text,html,script,text2br)=}
* @param {formula=VAR} any valid JavaScript expression with following variables and aggregate functions (optional, default: VAR)
- VAR1, VAR2, ... represent the corresponding item's value, VAR is an array of all item values
- SUM(VAR), AVG(VAR), SUB(VAR), MIN(VAR) and MAX(VAR) aggregate the values
Expand Down
10 changes: 5 additions & 5 deletions widgets/status.html
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@

{% endmacro %}


/**
* Displays a list of logging-information
*
Expand Down Expand Up @@ -91,14 +91,14 @@

{% endmacro %}


/**
* Displays a notification popup window with a message
*
* @param {id} unique id for this widget
* @param {item} an item witch triggers the popup: NOT 0 open it, 0 close it
* @param {item=} an item with the dynamic message
* @param {item=} an item with the a timestamp
* @param {item=} an item with a timestamp (e.g. 1974-01-01T12:00:00.000000+01:00 or 01.01.20 12:01)
* @param {text} a title of the messagebox
* @param {text=} an additional static text
* @param {text(info,error)=info} the mode: 'info', 'error' (optional, default 'info')
Expand All @@ -110,11 +110,11 @@
<div id="{{ uid(page, id) }}-message" class="alert" data-role="popup" data-overlay-theme="a" {% if mode == 'error' %} data-dismissible="false" {% endif %}>
<div data-role="header" data-theme="c"><h1>{{ title }}</h1></div>
<p><span></span>{{ text }}</p>

<div class="control">
<span class="stamp"></span>
<a onClick="$('#{{ uid(page, id) }}-message').popup('close');" data-mini="true" data-icon="check" data-iconpos="top" data-role="button" data-inline="true">OK</a>
</div>
</div>

{% endmacro %}
{% endmacro %}

0 comments on commit 66dacdf

Please sign in to comment.