webui: enhance led config (#224)

* split content and js
tune leds config

* implement connection lost page

* split js/html in huebridge

* add js action for connection lost
This commit is contained in:
redPanther
2016-09-06 10:14:54 +02:00
committed by GitHub
parent ffafe7e306
commit a6d12611a8
11 changed files with 588 additions and 276 deletions

View File

@@ -11,6 +11,12 @@ function bindNavToContent(containerId, fileName, loadNow)
}
}
function loadContentTo(containerId, fileName)
{
$(containerId).load("/content/"+fileName+".html");
}
function toggleClass(obj,class1,class2)
{
@@ -41,3 +47,18 @@ function setClassByBool(obj,enable,class1,class2)
}
}
function showErrorDialog(header,message)
{
$('#error_dialog .modal-title').html(header);
$('#error_dialog .modal-body').html(message);
$('#error_dialog').modal('show');
}
function isJsonString(str) {
try {
JSON.parse(str);
} catch (e) {
return e;
}
return "";
}