2016-09-05 17:26:29 +02:00
|
|
|
|
|
|
|
<div class="container-fluid">
|
|
|
|
<h1 class="page-header" lang="en" data-lang-token="main_menu_input_selection_token">Input Selection</h1>
|
|
|
|
<!-- <div class="introd">
|
|
|
|
<h4 lang="en" data-lang-token="remote_effects_intro"></h4>
|
|
|
|
</div>-->
|
|
|
|
|
|
|
|
<div style="text-align:center;margin:auto;padding:auto">
|
|
|
|
<div id="hyperion_inputs" />
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
2016-09-03 15:54:33 +02:00
|
|
|
|
|
|
|
<script>
|
|
|
|
$(hyperion).on("cmd-serverinfo", function(event) {
|
|
|
|
var data = "";
|
|
|
|
var i;
|
|
|
|
for(i = 0; i < parsedServerInfoJSON.info.priorities.length; i++) {
|
|
|
|
var owner = parsedServerInfoJSON.info.priorities[i].owner;
|
|
|
|
var active = parsedServerInfoJSON.info.priorities[i].active;
|
|
|
|
var visible = parsedServerInfoJSON.info.priorities[i].visible;
|
|
|
|
var priority = parsedServerInfoJSON.info.priorities[i].priority;
|
|
|
|
var btn_type = "default";
|
|
|
|
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" title="prio '+priority+'" onclick="requestSetSource('+priority+');">'+owner+'</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\');">auto select</button><br/>';
|
|
|
|
$('#hyperion_inputs').html(data);
|
|
|
|
|
|
|
|
var max_width=200;
|
|
|
|
$('.btn_input_selection').each(function() {
|
2016-09-05 17:26:29 +02:00
|
|
|
if ($(this).innerWidth() > max_width)
|
|
|
|
max_width = $(this).innerWidth();
|
2016-09-03 15:54:33 +02:00
|
|
|
});
|
|
|
|
$('.btn_input_selection').css("min-width",max_width+"px");
|
|
|
|
});
|
|
|
|
</script>
|
|
|
|
|
|
|
|
|