mirror of
https://github.com/tuxbox-fork-migrations/recycled-ni-neutrino.git
synced 2025-08-26 15:02:50 +02:00
yWeb: signalize standby-mode in status-button's color; thx to fred_feuerstein
Origin commit data
------------------
Branch: ni/coolstream
Commit: e4f29657ce
Author: vanhofen <vanhofen@gmx.de>
Date: 2017-10-16 (Mon, 16 Oct 2017)
Origin message was:
------------------
- yWeb: signalize standby-mode in status-button's color; thx to fred_feuerstein
------------------
No further description and justification available within origin commit message!
------------------
This commit was generated by Migit
This commit is contained in:
@@ -15,10 +15,24 @@ function goUrl(_url){
|
||||
}
|
||||
$("out").update(res);
|
||||
}
|
||||
function set_btn_standby(){
|
||||
var res = trim(loadSyncURL("/control/standby"));
|
||||
var color = "red";
|
||||
switch(res){
|
||||
case "off": color = "green"; break;
|
||||
}
|
||||
$("btn_standby").setStyle({borderColor: color});
|
||||
}
|
||||
function standby(_standby){
|
||||
var _cec = (document.getElementById('checkCEC').checked == true) ? "on" : "off";
|
||||
goUrl("/control/standby?"+_standby+"&cec="+_cec);
|
||||
}
|
||||
function init() {
|
||||
set_btn_standby();
|
||||
}
|
||||
function get_data() {
|
||||
set_btn_standby();
|
||||
}
|
||||
//]]>
|
||||
</script>
|
||||
</head>
|
||||
@@ -38,7 +52,7 @@ function standby(_standby){
|
||||
<td>
|
||||
<input type="button" value="{=L:on=}" onclick='standby("on");'/>
|
||||
<input type="button" value="{=L:off=}" onclick='standby("off");'/>
|
||||
<input type="button" value="{=L:bc.control.status=}" onclick='goUrl("/control/standby");'/>
|
||||
<input type="button" value="{=L:bc.control.status=}" onclick='goUrl("/control/standby");' id="btn_standby"/>
|
||||
CEC: <input id="checkCEC" name="checkCEC" type="checkbox" checked="checked"/>
|
||||
</td>
|
||||
</tr>
|
||||
@@ -91,5 +105,10 @@ function standby(_standby){
|
||||
<div id="out"></div>
|
||||
</div>
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
//<![CDATA[
|
||||
init();
|
||||
window.setInterval("get_data();",5000);
|
||||
//]]>
|
||||
</body>
|
||||
</html>
|
||||
|
Reference in New Issue
Block a user