mirror of
https://github.com/hyperion-project/hyperion.ng.git
synced 2025-03-01 10:33:28 +00:00
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:
@@ -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 "";
|
||||
}
|
||||
|
Reference in New Issue
Block a user