//# sourceURL=J_ALTUI_plugins.js "use strict"; // This program is free software: you can redistribute it and/or modify // it under the condition that it is for private or home useage and // this whole comment is reproduced in the source code file. // Commercial utilisation is not authorized without the appropriate // written agreement from amg0 / alexis . mermet @ gmail . com // This program is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. // job_None=-1, // no icon // job_WaitingToStart=0, // gray icon // job_InProgress=1, // blue icon // job_Error=2, // red icon // job_Aborted=3, // red icon // job_Done=4, // green icon // job_WaitingForCallback=5 // blue icon - Special case used in certain derived classes var ALTUI_PluginDisplays= ( function( window, undefined ) { // return styles needed by this plugin module function _getStyle() { var style=""; style += ".altui-watts, .altui-volts, .altui-dimmable, .altui-countdown {font-size: 16px;}"; style += ".altui-temperature {font-size: 16px;}"; style += ".altui-temperature-heater {font-size: 12px;}"; style += ".altui-temperature-minor {font-size: 8px;}"; style += ".altui-humidity, .altui-light {font-size: 18px;}"; style += ".altui-motion {font-size: 22px;}"; style += ".altui-weather-text, .altui-lasttrip-text, .altui-vswitch-text {font-size: 11px;}"; style += ".altui-red , .btn.altui-red { color:red;}"; style += ".altui-blue, .btn.altui-blue { color:blue;}"; style += ".altui-orange { color:darkorange;}"; style += ".altui-magenta { color:magenta;}"; style += ".altui-multiswitch-container { position:absolute; left:58px; right:16px; } .altui-multiswitch-container .row { padding-top:1px; padding-bottom:1px; margin-left:0px; margin-right:0px;} .altui-multiswitch-container .col-xs-3 { padding-left:1px; padding-right:1px; } .altui-multiswitch-open { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; padding-left:0px; padding-right:0px; margin-left:0px; margin-right:0px; width: 100%; max-width: 100% }"; style += ".altui-heater-container { position:absolute; left:71px; right:16px; } .altui-heater-container .row { padding-top:1px; padding-bottom:1px; margin-left:0px; margin-right:0px;} .altui-heater-container .col-xs-3 { padding-left:1px; padding-right:1px; text-align:center;} .altui-heater-btn { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; padding-left:0px; padding-right:0px; margin-left:0px; margin-right:0px; width: 100%; max-width: 100% }"; style += ".altui-heater-container select.input-sm { height:22px; padding:0;}"; style += ".altui-cyan { color:cyan;}"; style += ".altui-dimmable-slider { margin-left: 60px; }"; style += ".altui-colorpicker { margin-top: 2px; width:30px; margin-right: 15px; }"; style += ".altui-infoviewer-log-btn,.altui-infoviewer-btn,.altui-window-btn,.altui-datamine-open { margin-top: 10px; }"; style += ".altui-infoviewer-pattern { font-size: 14px; }"; style += "div.altui-windowcover button.btn-sm { width: 4em; }"; style += ".altui-sonos-text, .altui-combsw-text, .altui-sysmon-text, .altui-veraalerts-text {font-size: 11px;}"; style += ".altui-multistring-text-div { margin-top: 2px; height: 48px; overflow: hidden; }" style += ".altui-multistring-text-some { font-size: 11px; }"; style += ".altui-multistring-text-all { font-size: 7px; }"; style += ".altui-multistring-text-1, .altui-multistring-text-2 { }"; style += ".altui-upnpproxy-text { font-size: 11px; margin-left: 2px; margin-top: 22px; }"; style += ".altui-plts-btn-div { margin-top: 4px; height: 48px; overflow:hidden; } .altui-plts-btn { width: 50px; font-size: 11px; line-height: 1.5; } .altui-plts-btn-on { color: white; background-color: #006C44; } .altui-plts-btn-on:hover, .altui-plts-btn-on:focus, .altui-plts-btn-on:active, .altui-plts-btn-on:active:focus, .altui-plts-btn-on.active:focus { color: white; background-color: #006C44; outline: 0 none; box-shadow: none; } .altui-plts-time-text-div { float: left; margin-left: 6px; margin-top: 5px; font-size: 9px; overflow: hidden; }"; return style; }; function _isBusyStatus(device) { return ( (device.status!=undefined) && (device.status!=-1) && (device.status!=4) && (device.status!=2) ); }; // onoff : 0, 1 or -1 for spinner // csvlabel = "OFF,ON" function _createOnOffButton( onoff , id , csvlabel, extracls) { var str=csvlabel.split(','); if (true/*UIManager.UI7Check()*/ /*&& (window.location.origin.indexOf("mios.com")==-1)*/) { var onoffbuttonTemplate = ""; onoffbuttonTemplate += "
"; // onoffbuttonTemplate += " "; var css=""; onoff = onoff || 0; if (onoff>0) onoff=1; switch (onoff) { case null: case false: case "0": case 0: str=str[0]; css=""; break; case true: case "1": case 1: str=str[1]; css="checked"; break; default: str=""; css="spinner"; } return onoffbuttonTemplate.format(css,str,id); } else { var onoffbuttonTemplate = "