diff --git a/assets/webconfig/generalconf.html b/assets/webconfig/generalconf.html
index c1ebc822..3c387a91 100644
--- a/assets/webconfig/generalconf.html
+++ b/assets/webconfig/generalconf.html
@@ -8,6 +8,9 @@
+
+
+
@@ -38,31 +41,34 @@
udpListener = JSON.parse(response.data).result.properties.udpListener;
webConfig = JSON.parse(response.data).result.properties.webConfig;
-
- $('form').jsonForm({
+ var element = document.getElementById('editor_holder');
+ //JSONEditor.defaults.options.theme = 'bootstrap3';
+ var editor = new JSONEditor(element,{
+ theme: 'bootstrap3',
+ disable_collapse: 'true',
+ form_name_root: 'sa',
+ disable_edit_json: 'true',
+ disable_properties: 'true',
+ no_additional_properties: 'true',
schema: {
- logger,
- jsonServer,
- protoServer,
- boblightServer,
- udpListener,
- webConfig,
-
- },
- onSubmit: function (errors, values) {
- if (errors) {
- console.log(errors);
- }
- else {
- console.log(values);
+ title:' ',
+ properties: {
+ logger,
+ jsonServer,
+ protoServer,
+ boblightServer,
+ udpListener,
+ webConfig
}
}
});
+ document.getElementById('submit').addEventListener('click',function() {
+ // Get the value from the editor
+ console.log(editor.getValue());
+ });
- enableFormTranslation("generalConfForm", "generalConfForm");
-
$("[type='checkbox']").bootstrapSwitch();
diff --git a/assets/webconfig/index.html b/assets/webconfig/index.html
index f79783cc..2d82cc24 100644
--- a/assets/webconfig/index.html
+++ b/assets/webconfig/index.html
@@ -1,4 +1,4 @@
-
+
@@ -25,8 +25,9 @@
-
-
+
+
@@ -35,19 +36,14 @@
@@ -490,49 +486,39 @@