Commit 25014caf authored by Jérome Perrin's avatar Jérome Perrin

GUI: migrate Input_viewSimulation to use json schema for general properties

Also fix the bug that data is not updated before beeing sent to simulation
server
parent 5cf63805
...@@ -115,7 +115,6 @@ ...@@ -115,7 +115,6 @@
.declareAcquiredMethod("aq_getAttachment", "jio_getAttachment") .declareAcquiredMethod("aq_getAttachment", "jio_getAttachment")
.declareAcquiredMethod("aq_putAttachment", "jio_putAttachment") .declareAcquiredMethod("aq_putAttachment", "jio_putAttachment")
.declareAcquiredMethod("aq_ajax", "jio_ajax") .declareAcquiredMethod("aq_ajax", "jio_ajax")
.declareAcquiredMethod("aq_getConfigurationDict", "getConfigurationDict")
.declareAcquiredMethod("pleaseRedirectMyHash", "pleaseRedirectMyHash") .declareAcquiredMethod("pleaseRedirectMyHash", "pleaseRedirectMyHash")
.declareAcquiredMethod("whoWantsToDisplayThisDocument", .declareAcquiredMethod("whoWantsToDisplayThisDocument",
"whoWantsToDisplayThisDocument") "whoWantsToDisplayThisDocument")
...@@ -125,7 +124,6 @@ ...@@ -125,7 +124,6 @@
///////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////
.declareMethod("render", function (options) { .declareMethod("render", function (options) {
var gadget = this, var gadget = this,
property_list,
data; data;
this.props.jio_key = options.id; this.props.jio_key = options.id;
...@@ -135,16 +133,19 @@ ...@@ -135,16 +133,19 @@
"_attachment": "body.json" "_attachment": "body.json"
}) })
.push(function (json) { .push(function (json) {
data = JSON.parse(json).general; var application_configuration = {};
return gadget.aq_getConfigurationDict(); data = JSON.parse(json);
}) application_configuration =
.push(function (configuration_dict) { data.application_configuration.general || {};
property_list =
configuration_dict['Dream-Configuration'].property_list; return gadget.getDeclaredGadget('fieldset').push(
return gadget.getDeclaredGadget('fieldset'); function (fieldset_gadget) {
}) return fieldset_gadget.render({
.push(function (fieldset_gadget) { value: data.general,
return fieldset_gadget.render(property_list, data); property_definition: application_configuration
});
}
);
}); });
}) })
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment