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

@@ -138,27 +138,15 @@ $(document).ready(function() {
generalOptions = parsedConfSchemaJSON.properties.device;
specificOptions = parsedConfSchemaJSON.properties.alldevices[$(this).val()];
//$('#ledDeviceOptions').html(JSON.stringify(generalOptions)+"<br>"+JSON.stringify(specificOptions));
$('#editor_container').off();
$('#editor_container').html("");
var element = document.getElementById('editor_container');
grabber_conf_editor = new JSONEditor(element,{
theme: 'bootstrap3',
iconlib: "fontawesome4",
disable_collapse: 'true',
form_name_root: 'sa',
disable_edit_json: 'true',
disable_properties: 'true',
no_additional_properties: 'true',
schema: {
grabber_conf_editor = createJsonEditor('editor_container',
{
title:' ',
properties: {
generalOptions : generalOptions,
specificOptions : specificOptions,
}
}
});
values_general = {};
values_specific = {};
isCurrentDevice = (server.info.ledDevices.active == $(this).val());