Skip to content

Commit

Permalink
dialog section splitted
Browse files Browse the repository at this point in the history
  • Loading branch information
Standarduser committed Jan 4, 2025
1 parent 4a1821e commit 894aaa1
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 28 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ The widgets are designed for VIS 1.x.

* Added HTML-Dialog
* Made "modal" to default (modal darkens the background when a dialog window is open)
* Section 'dialog' splitted into 'dialog settings' and 'dialog content'

### 0.3.3 (2025-01-03)

Expand Down
41 changes: 17 additions & 24 deletions widgets/vis-homekittiles.html
Original file line number Diff line number Diff line change
Expand Up @@ -457,9 +457,12 @@
data-vis-attrs1="group.labelGroup2;label3pre;label3oid/id;label3unit;label3post;label3decimals[1];label3factor[1];label3comma[true]/checkbox;label3tdp/checkbox;label4pre;label4oid/id;label4unit;label4post;label4decimals[1];label4factor[1];label4comma[true]/checkbox;label4tdp/checkbox;label5pre;label5oid/id;label5unit;label5post;label5decimals[1];label5factor[1];label5comma[true]/checkbox;label5tdp/checkbox;"
data-vis-attrs2="group.increment;oidIncrement/id;incrementPlusShow/checkbox;incrementMinusShow/checkbox;incrementPlusValue[1];incrementMinusValue[-1];incrementValueMax[100];incrementValueMin[0];incrementShowOnlyIfTrue/checkbox;"
data-vis-attrs3="group.blockOperation;blockOperationIfTrue/checkbox;blockOperationIfFalse/checkbox;blockOperationShowDisabled/checkbox;blockOperationShowIcon/checkbox/addBlockOperationShowHideInputfields();blockOperationIcon/image;blockOperationIconNotInEditor/checkbox;blockOperationUseDifferentOID/checkbox/addBlockOperationShowHideInputfields();oidBlockOperation/id;"
data-vis-attrs4="group.dialog;title;contains_view/views;autoclose/slider,0,30000,100;modal[true]/checkbox;dialog_width;dialog_height;dialog_top;dialog_left;overflowX/nselect,,visible,hidden,scroll,auto,initial,inherit;overflowY/nselect,,visible,hidden,scroll,auto,initial,inherit;arrowDirection/nselect,,top,right,bottom,left;setIdOnOpenClose/id;setValueOnOpen;setValueOnClose;"
data-vis-attrs5="group.signalpics;numberOfSignals[1]/slider,3,10,1;signalsNotInEditor/checkbox;"
data-vis-attrs6="group.signals/byindex;oidSignal(1-numberOfSignals)/id;signalComparison(1-numberOfSignals)/select,comparisonEqual,comparisonNotEqual,comparisonLowerEqual,comparisonGreaterEqual,comparisonLower,comparisonGreater;signalCompValue(1-numberOfSignals);signalIcon(1-numberOfSignals)/image;signalDescription(1-numberOfSignals);"
data-vis-attrs4="group.dialogContent;
title;
contains_view/views;"
data-vis-attrs5="group.dialogSettings;autoclose/slider,0,30000,100;modal[true]/checkbox;dialog_width;dialog_height;dialog_top;dialog_left;overflowX/nselect,,visible,hidden,scroll,auto,initial,inherit;overflowY/nselect,,visible,hidden,scroll,auto,initial,inherit;arrowDirection/nselect,,top,right,bottom,left;setIdOnOpenClose/id;setValueOnOpen;setValueOnClose;"
data-vis-attrs6="group.signalpics;numberOfSignals[1]/slider,3,10,1;signalsNotInEditor/checkbox;"
data-vis-attrs7="group.signals/byindex;oidSignal(1-numberOfSignals)/id;signalComparison(1-numberOfSignals)/select,comparisonEqual,comparisonNotEqual,comparisonLowerEqual,comparisonGreaterEqual,comparisonLower,comparisonGreater;signalCompValue(1-numberOfSignals);signalIcon(1-numberOfSignals)/image;signalDescription(1-numberOfSignals);"
>
<div class="homekitTiles <%== this.data.attr('displaystyle') %> dialog vis-widget <%= this.data.attr('showLikeActive') ? 'state-active' : vis.states.attr(this.data['oidActive'] + '.val') ? 'state-active' : 'state-default' %> <%== this.data.attr('class') %>" style="width: <%= this.data.attr('displaystyle') == 'tile big' ? '235' : this.data.attr('displaystyle') == 'tile small' ? '60' : this.data.attr('displaystyle') == 'indicator' ? '110' : '110' %>px; height: <%= this.data.attr('displaystyle') == 'tile big' ? '235' : this.data.attr('displaystyle') == 'tile small' ? '60' : this.data.attr('displaystyle') == 'indicator' ? '30' : '110' %>px;" id="<%= this.data.attr('wid') %>">
<div class="vis-widget-body" id="<%= this.data.attr('wid') %>_body">
Expand Down Expand Up @@ -501,29 +504,18 @@
data-vis-attrs1="group.labelGroup2;label3pre;label3oid/id;label3unit;label3post;label3decimals[1];label3factor[1];label3comma[true]/checkbox;label3tdp/checkbox;label4pre;label4oid/id;label4unit;label4post;label4decimals[1];label4factor[1];label4comma[true]/checkbox;label4tdp/checkbox;label5pre;label5oid/id;label5unit;label5post;label5decimals[1];label5factor[1];label5comma[true]/checkbox;label5tdp/checkbox;"
data-vis-attrs2="group.increment;oidIncrement/id;incrementPlusShow/checkbox;incrementMinusShow/checkbox;incrementPlusValue[1];incrementMinusValue[-1];incrementValueMax[100];incrementValueMin[0];incrementShowOnlyIfTrue/checkbox;"
data-vis-attrs3="group.blockOperation;blockOperationIfTrue/checkbox;blockOperationIfFalse/checkbox;blockOperationShowDisabled/checkbox;blockOperationShowIcon/checkbox/addBlockOperationShowHideInputfields();blockOperationIcon/image;blockOperationIconNotInEditor/checkbox;blockOperationUseDifferentOID/checkbox/addBlockOperationShowHideInputfields();oidBlockOperation/id;"
data-vis-attrs4="group.dialog;
data-vis-attrs4="group.dialogContent;
title;
html_dialog/text;
htmlDialogPadding[5]/slider,0,20,1;
htmlTextSize[16]/slider,5,80,1;
htmlTextPosition/select,,left,center,right,justify;
buttonsAdd/checkbox;
numberOfButtons[1]/slider,1,10,1;
autoclose/slider,0,30000,100;
modal[true]/checkbox;
dialog_width;
dialog_height;
dialog_top;
dialog_left;
overflowX/nselect,,visible,hidden,scroll,auto,initial,inherit;
overflowY/nselect,,visible,hidden,scroll,auto,initial,inherit;
arrowDirection/nselect,,top,right,bottom,left;
setIdOnOpenClose/id;
setValueOnOpen;
setValueOnClose;"
data-vis-attrs5="group.buttons;oid_(1-numberOfButtons)/id;label_(1-numberOfButtons)[Button];value_(1-numberOfButtons);closeDialog_(1-numberOfButtons)/checkbox;"
data-vis-attrs6="group.signalpics;numberOfSignals[1]/slider,3,10,1;signalsNotInEditor/checkbox;"
data-vis-attrs7="group.signals/byindex;oidSignal(1-numberOfSignals)/id;signalComparison(1-numberOfSignals)/select,comparisonEqual,comparisonNotEqual,comparisonLowerEqual,comparisonGreaterEqual,comparisonLower,comparisonGreater;signalCompValue(1-numberOfSignals);signalIcon(1-numberOfSignals)/image;signalDescription(1-numberOfSignals);"
numberOfButtons[1]/slider,1,10,1;"
data-vis-attrs5="group.dialogSettings;autoclose/slider,0,30000,100;modal[true]/checkbox;dialog_width;dialog_height;dialog_top;dialog_left;overflowX/nselect,,visible,hidden,scroll,auto,initial,inherit;overflowY/nselect,,visible,hidden,scroll,auto,initial,inherit;arrowDirection/nselect,,top,right,bottom,left;setIdOnOpenClose/id;setValueOnOpen;setValueOnClose;"
data-vis-attrs6="group.buttons;oid_(1-numberOfButtons)/id;label_(1-numberOfButtons)[Button];value_(1-numberOfButtons);closeDialog_(1-numberOfButtons)/checkbox;"
data-vis-attrs7="group.signalpics;numberOfSignals[1]/slider,3,10,1;signalsNotInEditor/checkbox;"
data-vis-attrs8="group.signals/byindex;oidSignal(1-numberOfSignals)/id;signalComparison(1-numberOfSignals)/select,comparisonEqual,comparisonNotEqual,comparisonLowerEqual,comparisonGreaterEqual,comparisonLower,comparisonGreater;signalCompValue(1-numberOfSignals);signalIcon(1-numberOfSignals)/image;signalDescription(1-numberOfSignals);"
>
<div class="homekitTiles <%== this.data.attr('displaystyle') %> dialog vis-widget <%= this.data.attr('showLikeActive') ? 'state-active' : vis.states.attr(this.data['oidActive'] + '.val') ? 'state-active' : 'state-default' %> <%== this.data.attr('class') %>" style="width: <%= this.data.attr('displaystyle') == 'tile big' ? '235' : this.data.attr('displaystyle') == 'tile small' ? '60' : this.data.attr('displaystyle') == 'indicator' ? '110' : '110' %>px; height: <%= this.data.attr('displaystyle') == 'tile big' ? '235' : this.data.attr('displaystyle') == 'tile small' ? '60' : this.data.attr('displaystyle') == 'indicator' ? '30' : '110' %>px;" id="<%= this.data.attr('wid') %>">
<div class="vis-widget-body" id="<%= this.data.attr('wid') %>_body">
Expand Down Expand Up @@ -615,10 +607,11 @@
iconLowBat/image;
iconUnreach/image;"
data-vis-attrs0="group.label;label[Thermostat];label2pre[Set at];label2post[];"
data-vis-attrs1="group.thermostatDialog;title;closebuttonLabel;actualTemperatureLabel;setpointTemperatureLabel;setpointModeLabel;setpointModeValues;setpointModeTexts;setpointModeOperable/checkbox;actualHumidityLabel;activeProfileLabel;activeProfileValues;activeProfileTexts;windowStateLabel;windowStateValues;windowStateTexts;lowBatLabel;unreachLabel;autoclose/slider,0,30000,100;modal[true]/checkbox;dialog_top;dialog_left;arrowDirection/nselect,,top,right,bottom,left;"
data-vis-attrs2="group.blockOperation;blockOperationIfTrue/checkbox;blockOperationIfFalse/checkbox;blockOperationShowDisabled/checkbox;blockOperationShowIcon/checkbox/addBlockOperationShowHideInputfields();blockOperationIcon/image;blockOperationIconNotInEditor/checkbox;blockOperationUseDifferentOID/checkbox/addBlockOperationShowHideInputfields();blockOperationOID/id;"
data-vis-attrs3="group.signalpics;numberOfSignals[1]/slider,3,10,1;signalsNotInEditor/checkbox;"
data-vis-attrs4="group.signals/byindex;oidSignal(1-numberOfSignals)/id;signalComparison(1-numberOfSignals)/select,comparisonEqual,comparisonNotEqual,comparisonLowerEqual,comparisonGreaterEqual,comparisonLower,comparisonGreater;signalCompValue(1-numberOfSignals);signalIcon(1-numberOfSignals)/image;signalDescription(1-numberOfSignals);"
data-vis-attrs1="group.dialogContent;title;closebuttonLabel;actualTemperatureLabel;setpointTemperatureLabel;setpointModeLabel;setpointModeValues;setpointModeTexts;setpointModeOperable/checkbox;actualHumidityLabel;activeProfileLabel;activeProfileValues;activeProfileTexts;windowStateLabel;windowStateValues;windowStateTexts;lowBatLabel;unreachLabel;"
data-vis-attrs2="group.dialogSettings;autoclose/slider,0,30000,100;modal[true]/checkbox;dialog_top;dialog_left;arrowDirection/nselect,,top,right,bottom,left;"
data-vis-attrs3="group.blockOperation;blockOperationIfTrue/checkbox;blockOperationIfFalse/checkbox;blockOperationShowDisabled/checkbox;blockOperationShowIcon/checkbox/addBlockOperationShowHideInputfields();blockOperationIcon/image;blockOperationIconNotInEditor/checkbox;blockOperationUseDifferentOID/checkbox/addBlockOperationShowHideInputfields();blockOperationOID/id;"
data-vis-attrs4="group.signalpics;numberOfSignals[1]/slider,3,10,1;signalsNotInEditor/checkbox;"
data-vis-attrs5="group.signals/byindex;oidSignal(1-numberOfSignals)/id;signalComparison(1-numberOfSignals)/select,comparisonEqual,comparisonNotEqual,comparisonLowerEqual,comparisonGreaterEqual,comparisonLower,comparisonGreater;signalCompValue(1-numberOfSignals);signalIcon(1-numberOfSignals)/image;signalDescription(1-numberOfSignals);"
>
<div class="homekitTiles <%== this.data.attr('displaystyle') %> thermostatDialog vis-widget <%= this.data.attr('showLikeActive') ? 'state-active' : 'state-default' %> <%== this.data.attr('class') %>" style="width: <%= this.data.attr('displaystyle') == 'tile big' ? '235' : this.data.attr('displaystyle') == 'tile small' ? '60' : this.data.attr('displaystyle') == 'indicator' ? '110' : '110' %>px; height: <%= this.data.attr('displaystyle') == 'tile big' ? '235' : this.data.attr('displaystyle') == 'tile small' ? '60' : this.data.attr('displaystyle') == 'indicator' ? '30' : '110' %>px;" id="<%= this.data.attr('wid') %>">
<div class="vis-widget-body" id="<%= this.data.attr('wid') %>_body">
Expand Down
6 changes: 2 additions & 4 deletions widgets/vis-homekittiles/js/vis-homekittiles.js
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,8 @@ $.extend(
"group_blockOperation": { "en": "Block operation", "de": "Bedienung sperren" },
"group_buttons": { "en": "Buttons", "de": "Schaltflächen" },
"group_column": { "en": "Columns", "de": "Spalten" },
"group_dialogContent": { "en": "Dialog content", "de": "Dialog-Inhalt" },
"group_dialogSettings": { "en": "Dialog settings", "de": "Dialog-Einstellungen" },
"group_increment": { "en": "Increment value", "de": "Wert inkrementieren" },
"group_label": { "en": "Label", "de": "Beschriftung" },
"group_labelGroup1": { "en": "Label group 1", "de": "Beschriftungsgruppe 1" },
Expand All @@ -85,13 +87,9 @@ $.extend(
"headline1": { "en": "Headline 1", "de": "Überschrift 1" },
"headline2": { "en": "Headline 2", "de": "Überschrift 2" },
"headline3": { "en": "Headline 3", "de": "Überschrift 3" },

"htmlDialogPadding": { "en": "HTML dialog padding", "de": "HTML-Diaglog Innenabstand" },
"htmlTextPosition": { "en": "HTML text position", "de": "HTML Textausrichtung" },
"htmlTextSize": { "en": "HTML text size", "de": "HTML Textgröße" },



"icon_": { "en": "Icon button ", "de": "Icon Schaltfläche " },
"iconButton_": { "en": "Icon button ", "de": "Icon Schaltfläche " },
"iconLowBat": { "en": "Icon for low battery", "de": "Icon für Batterie schwach" },
Expand Down

0 comments on commit 894aaa1

Please sign in to comment.