Commit aabc9ff3 authored by Jérome Perrin's avatar Jérome Perrin

GUI: read portal_types configuration from the JSON

parent 191f5772
...@@ -28,6 +28,7 @@ ...@@ -28,6 +28,7 @@
"title": "Create Document" "title": "Create Document"
} }
}, },
// TODO: remove this once everything is merged.
"Input": { "Input": {
"view": { "view": {
"gadget": "Input_viewProductionLine", "gadget": "Input_viewProductionLine",
...@@ -520,11 +521,13 @@ ...@@ -520,11 +521,13 @@
} }
}) })
.push(function(result) { .push(function(result) {
gadget.props.data = result ? JSON.parse(result) : {}; var data;
// TODO if (result) {
window.console.log("We got this data", gadget.props.data, data = JSON.parse(result);
"we can now set portal_types"); gadget.props.data = data;
portal_types.Input = data.application_configuration.input;
portal_types.Output = data.application_configuration.output;
}
// Get the action information // Get the action information
return gadget.declareGadget( return gadget.declareGadget(
portal_types[portal_type][options.action].gadget + ".html" portal_types[portal_type][options.action].gadget + ".html"
......
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