2
0
mirror of https://github.com/fhem/fhem-mirror.git synced 2025-01-31 06:39:11 +00:00

smallstyle slider prep and eventMap Status fix

git-svn-id: https://svn.fhem.de/fhem/trunk@1558 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
rudolfkoenig 2012-05-12 11:06:43 +00:00
parent b9356b665b
commit 4cec234c09
3 changed files with 12 additions and 10 deletions

View File

@ -2074,7 +2074,6 @@ FW_devState($$)
$state = "" if(!defined($state));
$hasOnOff = (!$webCmd && $allSets =~ m/\bon\b/ && $allSets =~ m/\boff\b/);
my $txt = $state;
if(defined(AttrVal($d, "showtime", undef))) {
my $v = $defs{$d}{READINGS}{state}{TIME};
@ -2094,14 +2093,15 @@ FW_devState($$)
}
$txt = "<div id=\"$d\" align=\"center\" class=\"col2\">$txt</div>";
if($webCmd) {
my @a = split(":", $webCmd);
$link = "cmd.$d=set $d $a[0]";
$cmdlist = $webCmd;
} elsif($hasOnOff && !$cmdlist) {
$link = "cmd.$d=set $d ".($state eq "on" ? "off":"on");
my (undef, $nstate) = ReplaceEventMap($d, [$d, $state], 0);
$nstate = $state if(!defined($nstate));
$link = "cmd.$d=set $d " . ($nstate eq "on" ? "off" : "on");
$cmdlist = "on:off";
}
@ -2120,7 +2120,7 @@ FW_devState($$)
$txt = "<a onClick=\"FW_cmd('$FW_ME$FW_subdir?XHR=1&$link')\">$txt</a>";
} elsif($FW_ss || $FW_tp) {
$txt = "<a onClick=\"location.href='$FW_ME$FW_subdir?$link$rf'\">$txt</a>";
$txt ="<a onClick=\"location.href='$FW_ME$FW_subdir?$link$rf'\">$txt</a>";
} else {
$txt = "<a href=\"$FW_ME$FW_subdir?$link$rf\">$txt</a>";

View File

@ -60,9 +60,9 @@ div#block { border:1px solid gray; background: #F8F8E0; padding:0.7em; }
div#dist { padding-top:0.3em; }
.set,.attr { margin-bottom:5px; float:left; }
.slider { float:right; width:250px; height:26px; background:#F0F0D8;
margin-left:10px; -moz-border-radius:8px; border-radius:8px; }
.handle { position:absolute; cursor:pointer; width:50px; height:20px; line-height:20px;
.set,.attr { margin-bottom:5px; float:left;}
.slider { float:right; width:320px; height:26px; }
.set .slider { background:#F0F0D8; }
.handle { position:relative; cursor:pointer; width:50px;
height:20px; line-height:20px; user-select:none;
border:3px solid; color:#278727; text-align:center; }
.downText { margin-top:2px; }

View File

@ -35,6 +35,8 @@ a img { border-style:none; }
.slider { float:right; width:250px; height:26px; }
.set .slider { margin-left:10px; background:#F0F0D8;
-moz-border-radius:8px; border-radius:8px; }
.handle { position:relative; cursor:pointer; width:50px; height:20px; line-height:20px;
.handle { position:relative; cursor:pointer; width:50px;
height:20px; line-height:20px;
-moz-user-select:none; user-select:none;
border:3px solid; color:#278727; text-align:center; }
.downText { margin-top:2px; }