Skip to content

Commit

Permalink
corrections
Browse files Browse the repository at this point in the history
  • Loading branch information
Standarduser committed Jan 3, 2025
1 parent e5786c0 commit 8240739
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 2 deletions.
4 changes: 2 additions & 2 deletions widgets/vis-homekittiles.html
Original file line number Diff line number Diff line change
Expand Up @@ -379,7 +379,7 @@
</div>
</div>
</div>'
data-vis-attrs="description/custom,vis-homekittiles.infoText,hktSwitchBool;oid/id;icon/image;iconRound/checkbox;iconColored/checkbox;displaystyle[tile]/select,tile,tile big,tile small,indicator,tile iconOnly,tile textonly;"
data-vis-attrs="description/custom,vis-homekittiles.infoText,hktSwitchBool;oid/id;icon/image;iconRound/checkbox;iconColored/checkbox;displaystyle[tile]/select,tile,tile big,tile small,indicator,tile iconOnly,tile textonly/iconShowHideInputfields();"
data-vis-attrs0="group.labelGroup1;label[Switch];label2pre;label2oid/id;label2unit;label2post;label2decimals[1];label2factor[1];label2comma[true]/checkbox;label2tdp/checkbox;"
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;"
Expand Down Expand Up @@ -452,7 +452,7 @@
</div>
</div>
</div>'
data-vis-attrs="description/custom,vis-homekittiles.infoText,hktViewInWidgetDialog;oidActive/id;icon/image;iconRound/checkbox;iconColored/checkbox;showLikeActive/checkbox;displaystyle[tile]/select,tile,tile big,tile small,indicator,tile iconOnly,tile textonly;"
data-vis-attrs="description/custom,vis-homekittiles.infoText,hktViewInWidgetDialog;oidActive/id;icon/image;iconRound/checkbox;iconColored/checkbox;showLikeActive/checkbox;displaystyle[tile]/select,tile,tile big,tile small,indicator,tile iconOnly,tile textonly/iconShowHideInputfields();"
data-vis-attrs0="group.labelGroup1;label[Dialog];label2pre;label2oid/id;label2unit;label2post;label2decimals[1];label2factor[1];label2comma[true]/checkbox;label2tdp/checkbox;"
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;"
Expand Down
8 changes: 8 additions & 0 deletions widgets/vis-homekittiles/css/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -525,6 +525,14 @@
.homekitTiles.tile.textonly .increment {
display: none
}
.homekitTiles.tile.textonly .ackIcon {
width: 20px;
height: 20px;
top: 50%;
right: 0px;
position: absolute;
transform: translate(100%,-50%);
}
/*#endregion*/
/*----------------------------------------------------------------*/
/*#region Date-Picker */
Expand Down
21 changes: 21 additions & 0 deletions widgets/vis-homekittiles/js/vis-homekittiles.js
Original file line number Diff line number Diff line change
Expand Up @@ -331,6 +331,27 @@ vis.binds["vis-homekittiles"] = {
return {input: `<span>${_(text)}</span>`};
},

//Remove input fields for icons if displaystyle is textonly and add if not
//Used at SwitchBool and ViewInWidgetDialog
iconShowHideInputfields: function (widgetID, view, newId, attr, isCss) {

vis.activeWidgets.forEach(function (el) {
let data = vis.views[vis.activeView].widgets[el].data;
let val = data.displaystyle;

if (val == 'tile textonly') {
vis.hideShowAttr('icon', false);
vis.hideShowAttr('iconRound', false);
vis.hideShowAttr('iconColored', false);
} else {
vis.hideShowAttr('icon', true);
vis.hideShowAttr('iconRound', true);
vis.hideShowAttr('iconColored', true);
}

});
},

//Radiobuttons - copied from jqui to don't force jqui button styles
radio: function (el, options, process) {
var $this = $(el);
Expand Down

0 comments on commit 8240739

Please sign in to comment.