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";
}

View File

@ -61,8 +61,8 @@ 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;
.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; }