Add img for relay innaccessible

This commit is contained in:
Chteufleur 2015-11-01 17:31:57 +01:00
parent 87d78fa64b
commit b3bd8cc988
2 changed files with 8 additions and 4 deletions

BIN
static/img/bulbNone.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.0 KiB

View File

@ -27,7 +27,7 @@
{{else}}
{{$val.Description}}
{{end}}
<img class="navbar-right" src="/static/img/bulbOff.png" style="width: 20px; margin-right: 0px;" />
<img class="navbar-right" src="/static/img/bulbNone.png" style="width: 20px; margin-right: 0px;" />
</a>
</li>
{{end}}
@ -50,7 +50,7 @@
<br/>
<p><a id="toggleButton" class="btn btn-lg btn-primary" href="#" role="button">Toggle</a></p>
<br/>
<p><img id="{{.relayMac}}" src="/static/img/bulbOff.png" style="width: 100px;"/></p>
<p><img id="{{.relayMac}}" src="/static/img/bulbNone.png" style="width: 100px;"/></p>
</div>
{{end}}
{{end}}
@ -77,8 +77,10 @@ var forEachRelay = function() {
if ($(links[i]).attr("id") == mac) {
if (status == "allume") {
$(links[i]).children("img").attr("src", "/static/img/bulbOn.png")
} else {
} else if (status == "eteint") {
$(links[i]).children("img").attr("src", "/static/img/bulbOff.png")
} else {
$(links[i]).children("img").attr("src", "/static/img/bulbNone.png")
}
}
}
@ -87,8 +89,10 @@ var forEachRelay = function() {
if ($(".jumbotron img").attr("id") == mac) {
if (status == "allume") {
$(".jumbotron img").attr("src", "/static/img/bulbOn.png")
} else {
} else if (status == "eteint") {
$(".jumbotron img").attr("src", "/static/img/bulbOff.png")
} else {
$(".jumbotron img").attr("src", "/static/img/bulbNone.png")
}
}
}