mirror of
https://github.com/hyperion-project/hyperion.ng.git
synced 2025-03-01 10:33:28 +00:00
impl options explanation, uiLock (#343)
* update schemas * update * killed upstream change * min prio is now 100 * reset watchdog regularly * update * fix * update
This commit is contained in:
@@ -12,9 +12,11 @@
|
||||
if (active) btn_type = "warning";
|
||||
if (visible) btn_type = "success";
|
||||
|
||||
data += '<button id="srcBtn'+i+'" type="button" class="btn btn-lg btn-'+btn_type+' btn_input_selection" style="margin:10px;min-width:200px" onclick="requestSetSource('+priority+');">'+owner+'<span style="font-size:70% !important;"> ('+priority+')</span></button><br/>';
|
||||
if(btn_type != 'default')
|
||||
data += '<button id="srcBtn'+i+'" type="button" class="btn btn-lg btn-'+btn_type+' btn_input_selection" style="margin:10px;min-width:200px" onclick="requestSetSource('+priority+');">'+owner+'<span style="font-size:70% !important;"> ('+priority+')</span></button><br/>';
|
||||
}
|
||||
data += '<button id="srcBtn'+i+'" type="button" class="btn btn-lg btn-info btn_input_selection" style="margin:10px;min-width:200px" onclick="requestSetSource(\'auto\');">'+$.i18n('remote_input_label_autoselect')+'</button><br/>';
|
||||
var autostate = (parsedServerInfoJSON.info.priorities_autoselect? "btn-success" : "btn-danger");
|
||||
data += '<button id="srcBtn'+i+'" type="button" class="btn btn-lg '+autostate+' btn_input_selection" style="margin:10px;min-width:200px" onclick="requestSetSource(\'auto\');">'+$.i18n('remote_input_label_autoselect')+'</button><br/>';
|
||||
$('#hyperion_inputs').html(data);
|
||||
|
||||
var max_width=200;
|
||||
@@ -24,6 +26,23 @@
|
||||
});
|
||||
$('.btn_input_selection').css("min-width",max_width+"px");
|
||||
}
|
||||
|
||||
function updateLedMapping()
|
||||
{
|
||||
mappingList = ["multicolor_mean", "unicolor_mean"];
|
||||
mapping = parsedServerInfoJSON.info.ledMAppingType;
|
||||
|
||||
$('#mappingsbutton').html("");
|
||||
for(var ix = 0; ix < mappingList.length; ix++)
|
||||
{
|
||||
if(mapping == mappingList[ix])
|
||||
btn_style = 'btn-success';
|
||||
else
|
||||
btn_style = 'btn-warning';
|
||||
|
||||
$('#mappingsbutton').append('<button type="button" id="lmBtn_'+mappingList[ix]+'" class="btn btn-lg '+btn_style+'" style="margin:10px;min-width:200px" onclick="requestMappingType(\''+mappingList[ix]+'\');">'+$.i18n('remote_maptype_label_'+mappingList[ix])+'</button><br/>');
|
||||
}
|
||||
}
|
||||
|
||||
function updateComponents(event) {
|
||||
if ($('#componentsbutton').length == 0)
|
||||
@@ -33,12 +52,12 @@
|
||||
else
|
||||
{
|
||||
updateInputSelect();
|
||||
updateLedMapping();
|
||||
components = event.response.info.components;
|
||||
// create buttons
|
||||
$('#componentsbutton').html("");
|
||||
for ( idx=0; idx<components.length;idx++)
|
||||
{
|
||||
//components_html += '<tr><td>'+(components[idx].title)+'</td><td><i class="fa fa-circle component-'+(components[idx].enabled?"on":"off")+'"></i></td></tr>';
|
||||
enable_style = (components[idx].enabled? "btn-success" : "btn-danger");
|
||||
enable_icon = (components[idx].enabled? "fa-play" : "fa-stop");
|
||||
comp_name = components[idx].name;
|
||||
@@ -94,15 +113,6 @@ $(document).ready(function() {
|
||||
$(function() {
|
||||
$('#cp2').colorpicker({
|
||||
format: 'rgb',
|
||||
|
||||
colorSelectors: {
|
||||
'default': '#777777',
|
||||
'primary': '#337ab7',
|
||||
'success': '#5cb85c',
|
||||
'info' : '#5bc0de',
|
||||
'warning': '#f0ad4e',
|
||||
'danger' : '#d9534f'
|
||||
},
|
||||
customClass: 'colorpicker-2x',
|
||||
sliders: {
|
||||
saturation: {
|
||||
|
Reference in New Issue
Block a user