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

Input_viewSpreadsheet: Use input_id from action definition

parent 76c0ec82
...@@ -71,8 +71,15 @@ ...@@ -71,8 +71,15 @@
var jio_key = options.id, var jio_key = options.id,
gadget = this; gadget = this;
gadget.props.jio_key = jio_key; gadget.props.jio_key = jio_key;
// view_##### is the formulatino of the names // view_##### is the formulatino of the names
gadget.props.name = options.action.substr(5, options.action.length); gadget.props.name = options.action.substr(5, options.action.length);
// Use input_id from action definition
if (options.action_definition.configuration.input_id){
gadget.props.name = options.action_definition.configuration.input_id;
}
gadget.props.configuration = options.action_definition.configuration;
return new RSVP.Queue() return new RSVP.Queue()
.push(function () { .push(function () {
return RSVP.all([ return RSVP.all([
...@@ -91,12 +98,7 @@ ...@@ -91,12 +98,7 @@
if (result.input[gadget.props.name]) { if (result.input[gadget.props.name]) {
content = result.input[gadget.props.name]; content = result.input[gadget.props.name];
} else { } else {
// otherwise use the clean configuration content = options.action_definition.configuration.columns;
for (i = 0; i <= Object.keys(config).length; i += 1) {
if (Object.keys(config)[i] === options.action) {
content = config[options.action].configuration.columns;
}
}
} }
// application_configuration.input.view_???_spreasheet.configuration // application_configuration.input.view_???_spreasheet.configuration
return result_list[1].render( return result_list[1].render(
......
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