mirror of
https://github.com/hyperion-project/hyperion.ng.git
synced 2023-10-10 13:36:59 +02:00
35 lines
908 B
JavaScript
35 lines
908 B
JavaScript
|
|
||
|
var conf_editor = null;
|
||
|
$(hyperion).one("cmd-config-getschema", function(event) {
|
||
|
parsedConfSchemaJSON = event.response.result;
|
||
|
schema = parsedConfSchemaJSON.properties;
|
||
|
|
||
|
conf_editor = createJsonEditor('editor_container',
|
||
|
{
|
||
|
title:'',
|
||
|
properties: {
|
||
|
color : schema.color,
|
||
|
smoothing : schema.smoothing,
|
||
|
blackborderdetector: schema.blackborderdetector,
|
||
|
}
|
||
|
});
|
||
|
|
||
|
$('#editor_container .well').css("background-color","white");
|
||
|
$('#editor_container .well').css("border","none");
|
||
|
$('#editor_container .well').css("box-shadow","none");
|
||
|
$('#editor_container .btn').addClass("btn-primary");
|
||
|
$('#editor_container h3').first().remove();
|
||
|
|
||
|
});
|
||
|
|
||
|
|
||
|
$(document).ready( function() {
|
||
|
requestServerConfigSchema();
|
||
|
|
||
|
document.getElementById('btn_submit').addEventListener('click',function() {
|
||
|
// Get the value from the editor
|
||
|
console.log(conf_editor.getValue());
|
||
|
});
|
||
|
});
|
||
|
|