update/fix remote

This commit is contained in:
brindosch
2017-03-02 11:52:27 +01:00
parent 976dd7873f
commit 19f8928869
6 changed files with 35 additions and 36 deletions

View File

@@ -92,7 +92,15 @@ $(document).ready(function() {
for(i = 0; i < prios.length; i++)
{
var origin = prios[i].origin;
var ip = "xxx.xxx.xxx.xxx";
if(typeof origin !== "undefined" && origin != "")
{
origin = origin.split("@");
var ip = origin[1];
origin = origin[0];
}
else
origin = "System";
var owner = prios[i].owner;
var active = prios[i].active;
var visible = prios[i].visible;
@@ -102,7 +110,7 @@ $(document).ready(function() {
var btn_type = "default";
var btn_text = $.i18n('remote_input_setsource_btn');
var btn_state = "enabled";
if (active) btn_type = "warning";
if (active) btn_type = "primary";
if (visible)
{
btn_state = "disabled";
@@ -111,26 +119,26 @@ $(document).ready(function() {
}
if(ip)
origin += '<br/><span style="font-size:80%; color:grey;">'+$.i18n('remote_input_ip')+' '+ip+'</span>';
if(compId == "10")
if(compId == 10)
owner = $.i18n('remote_effects_label_effects')+' '+owner;
if(compId == "9")
if(compId == 9)
owner = $.i18n('remote_color_label_color')+' '+'<div style="width:18px; height:18px; border-radius:20px; margin-bottom:-4px; border:1px grey solid; background-color: rgb('+prios[i].value.RGB+'); display:inline-block" title="RGB: ('+prios[i].value.RGB+')"></div>';
if(compId == "7")
if(compId == 7)
owner = $.i18n('general_comp_GRABBER')+': ('+owner+')';
if(compId == "8")
if(compId == 8)
owner = $.i18n('general_comp_V4L')+': ('+owner+')';
if(compId == "6")
if(compId == 6)
owner = $.i18n('general_comp_BOBLIGHTSERVER');
if(compId == "5")
if(compId == 5)
owner = $.i18n('general_comp_UDPLISTENER');
if(owner == "Off")
owner = $.i18n('general_btn_off');
if(duration)
if(duration && compId != 7 && compId != 11)
owner += '<br/><span style="font-size:80%; color:grey;">'+$.i18n('remote_input_duration')+' '+duration.toFixed(0)+$.i18n('edt_append_s')+'</span>';
var btn = '<button id="srcBtn'+i+'" type="button" '+btn_state+' class="btn btn-'+btn_type+' btn_input_selection" onclick="requestSetSource('+priority+');">'+btn_text+'</button>';
if((compId == "10" || compId == "9") && priority != 254)
if((compId == 10 || compId == 9) && priority != 254)
btn += '<button type="button" class="btn btn-sm btn-danger" style="margin-left:10px;" onclick="requestPriorityClear('+priority+');"><i class="fa fa-close"></button>';
if(btn_type != 'default')
@@ -159,7 +167,7 @@ $(document).ready(function() {
if(mapping == mappingList[ix])
btn_style = 'btn-success';
else
btn_style = 'btn-warning';
btn_style = 'btn-primary';
$('#mappingsbutton').append('<button type="button" id="lmBtn_'+mappingList[ix]+'" class="btn '+btn_style+'" style="margin:10px;min-width:200px" onclick="requestMappingType(\''+mappingList[ix]+'\');">'+$.i18n('remote_maptype_label_'+mappingList[ix])+'</button><br/>');
}