mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-01-31 18:59:33 +00:00
10_ZWave.pm: fix help in detail, add ZME_WALLC-S data by Thargor (Forum #32918)
git-svn-id: https://svn.fhem.de/fhem/trunk@7754 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
dd8f0ecae6
commit
db0009fea0
@ -1098,7 +1098,7 @@ ZWave_helpFn($$)
|
|||||||
return "" if(!$mc);
|
return "" if(!$mc);
|
||||||
my $h = $mc->{config}{$cmd};
|
my $h = $mc->{config}{$cmd};
|
||||||
return "" if(!$h || !$h->{Help});
|
return "" if(!$h || !$h->{Help});
|
||||||
return "Help for $cmd:<br>".$h->{Help}."<br><br>";
|
return "Help for $cmd:<br>".$h->{Help};
|
||||||
}
|
}
|
||||||
|
|
||||||
sub
|
sub
|
||||||
@ -1106,34 +1106,22 @@ ZWave_fhemwebFn($$$$)
|
|||||||
{
|
{
|
||||||
my ($FW_wname, $d, $room, $pageHash) = @_; # pageHash is set for summaryFn.
|
my ($FW_wname, $d, $room, $pageHash) = @_; # pageHash is set for summaryFn.
|
||||||
|
|
||||||
return "<div id=\"Help_$d\" class=\"help\"></div>".<<JSEND
|
return
|
||||||
<script type="text/javascript">
|
'<div id="ZWHelp" class="makeTable help"></div>'.
|
||||||
var oldHelp={};
|
'<script type="text/javascript">'.
|
||||||
var helpDiv=document.querySelector("#Help_$d");
|
"var d='$d';" . <<'JSEND'
|
||||||
|
$(document).ready(function() {
|
||||||
setTimeout(function() { // Wait for it to appear, thn move it
|
$("div#ZWHelp").insertBefore("div.makeTable.wide:first"); // Move
|
||||||
var w=document.querySelector("div.makeTable.wide");
|
$("select.set,select.get").each(function(){
|
||||||
w.insertBefore(helpDiv,w.firstChild);
|
$(this).get(0).setValueFn = function(val) {
|
||||||
}, 200);
|
$("div#ZWHelp").html(val);
|
||||||
|
}
|
||||||
function helpSet(val) { helpDiv.innerHTML=val; }
|
$(this).change(function(){
|
||||||
function
|
FW_queryValue('{ZWave_helpFn("'+d+'","'+$(this).val()+'")}',
|
||||||
helpCheck(name)
|
$(this).get(0));
|
||||||
{
|
});
|
||||||
var sel = document.querySelector("select."+name);
|
});
|
||||||
if(!sel)
|
});
|
||||||
return;
|
|
||||||
var newVal = sel.options[sel.selectedIndex].value;
|
|
||||||
if(oldHelp[name] && oldHelp[name] != newVal) {
|
|
||||||
FW_queryValue('{ZWave_helpFn("$d","'+newVal+'")}', 'helpSet("%")', '');
|
|
||||||
}
|
|
||||||
oldHelp[name] = newVal;
|
|
||||||
}
|
|
||||||
|
|
||||||
setInterval(function() {
|
|
||||||
helpCheck("set");
|
|
||||||
helpCheck("get");
|
|
||||||
}, 300);
|
|
||||||
</script>
|
</script>
|
||||||
JSEND
|
JSEND
|
||||||
}
|
}
|
||||||
|
Binary file not shown.
@ -524,6 +524,7 @@
|
|||||||
<Product type="0100" id="0004" name="ZME_WCD2 Double Paddle Wall Controller" config="zwave.me/ZME_WCD2.xml"/>
|
<Product type="0100" id="0004" name="ZME_WCD2 Double Paddle Wall Controller" config="zwave.me/ZME_WCD2.xml"/>
|
||||||
<Product type="0201" id="0001" name="iTemp" config="zwave.me/iTemp.xml" />
|
<Product type="0201" id="0001" name="iTemp" config="zwave.me/iTemp.xml" />
|
||||||
<Product type="0200" id="0001" name="iTemp" config="zwave.me/iTemp.xml" />
|
<Product type="0200" id="0001" name="iTemp" config="zwave.me/iTemp.xml" />
|
||||||
|
<Product type="0100" id="0101" name="ZME_WALLC-S 4 Button Wall Controller" config="zwave.me/ZME_WALLC-S.xml"/>
|
||||||
</Manufacturer>
|
</Manufacturer>
|
||||||
<Manufacturer id="004f" name="Z-Wave Technologia">
|
<Manufacturer id="004f" name="Z-Wave Technologia">
|
||||||
</Manufacturer>
|
</Manufacturer>
|
||||||
|
Loading…
Reference in New Issue
Block a user