Skip to content

Commit

Permalink
Merge pull request Martin-Gleiss#310 from onkelandy/fixes
Browse files Browse the repository at this point in the history
Docu Example Fixes for status widget
  • Loading branch information
wvhn authored Apr 9, 2020
2 parents 57c0f48 + 71ca4d9 commit 09a89b7
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 11 deletions.
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 %}


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 09a89b7

Please sign in to comment.