FW_version["fhemweb_iconSwitch.js"] = "$Id$"; FW_widgets['iconSwitch'] = { createFn:FW_iconSwitchCreate, }; /********* iconSwitch *********/ function FW_iconSwitchCreate(elName, devName, vArr, currVal, set, params, cmd) { if( 0 ) { console.log( "elName: "+elName ); console.log( "devName: "+devName ); console.log( "vArr: "+vArr ); console.log( "currVal: "+currVal ); console.log( "set: "+set ); console.log( "params: "+params ); console.log( "cmd: "+cmd ); } if(vArr.length<1 || vArr[0] != "iconSwitch") return undefined; var newEl = $("
").get(0); var ipar = 2; var iconclass = ""; if(vArr[1].match(/class.*?@/)) { var m = vArr[1].match(/class(.*?)@/); iconclass = m && m[1] ? m[1] : ""; vArr[1] = vArr[1].replace(/class.*?@/,""); } for( var i = 1; i < (vArr.length); i+=ipar ) { vArr[i] = vArr[i].replace(/#/g," "); } var hidden; if(elName) hidden = $(''); $(newEl).append(hidden); var button = $('').uniqueId(); var label = $('