implement a function for easy json editor creation (#264)

* implement a function for easy json editor creation

* grabber and kodi moved to new editor func

* webui: implement conf editors

* add missing files and remove debug code
This commit is contained in:
redPanther
2016-10-09 10:23:04 +02:00
committed by GitHub
parent b42f3453b4
commit 0a142b0e7d
16 changed files with 249 additions and 273 deletions

View File

@@ -0,0 +1,36 @@
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: {
jsonServer : schema.jsonServer,
protoServer : schema.protoServer,
boblightServer : schema.boblightServer,
udpListener : schema.udpListener,
forwarder : schema.forwarder,
}
});
$('#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());
});
});