mirror of
https://github.com/hyperion-project/hyperion.ng.git
synced 2025-03-01 10:33:28 +00:00
Webui: view led configuration + lights (#223)
* make hyperion websocket api event based * implement new websocket handling for generalconf * migrate all webui stuff to new event based websocket api some cleanup ... now all html templates are in content refactoring of web stuff * add hyperionport to global start impl. removing advanced key * separate dashboard serverinfo is updated every 3 seconds automatily add input selection cleanup and remove not needed stuff * prepare infrastructure for server sided file execution * webui minor fixes * fix compile * implement led layout view with live colors * live led vies * fix general conf unrigister ledcolors request, when not on leds.html * fix compiler warning * prepare realtime ledview and enhance ui
This commit is contained in:
@@ -10,3 +10,34 @@ function bindNavToContent(containerId, fileName, loadNow)
|
||||
$("#page-wrapper").load("/content/"+fileName+".html");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
function toggleClass(obj,class1,class2)
|
||||
{
|
||||
if ( $(obj).hasClass(class1))
|
||||
{
|
||||
$(obj).removeClass(class1);
|
||||
$(obj).addClass(class2);
|
||||
}
|
||||
else
|
||||
{
|
||||
$(obj).removeClass(class2);
|
||||
$(obj).addClass(class1);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
function setClassByBool(obj,enable,class1,class2)
|
||||
{
|
||||
if (enable)
|
||||
{
|
||||
$(obj).removeClass(class1);
|
||||
$(obj).addClass(class2);
|
||||
}
|
||||
else
|
||||
{
|
||||
$(obj).removeClass(class2);
|
||||
$(obj).addClass(class1);
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user