generic spreadshit now stores data in input echelon of the all inclusive file

parent 313b8a8c
...@@ -28,7 +28,9 @@ ...@@ -28,7 +28,9 @@
}) })
.push(function (body) { .push(function (body) {
var data = JSON.parse(body); var data = JSON.parse(body);
data.shift_spreadsheet = JSON.parse(editor_data); // create a property within input
// with name the provided at render time
data.input[gadget.props.name] = JSON.parse(editor_data);
return gadget.aq_putAttachment({ return gadget.aq_putAttachment({
"_id": gadget.props.jio_key, "_id": gadget.props.jio_key,
"_attachment": "body.json", "_attachment": "body.json",
...@@ -70,11 +72,10 @@ ...@@ -70,11 +72,10 @@
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;
console.log("generic spreadsheet RENDER2"); // view_##### is the formulatino of the names
console.log(options); gadget.props.name = options.action.substr(5, options.action.length);
return new RSVP.Queue() return new RSVP.Queue()
.push(function () { .push(function () {
console.log("generic spreadsheet RENDER3");
return RSVP.all([ return RSVP.all([
gadget.aq_getAttachment({ gadget.aq_getAttachment({
"_id": jio_key, "_id": jio_key,
...@@ -84,17 +85,12 @@ ...@@ -84,17 +85,12 @@
]); ]);
}) })
.push(function (result_list) { .push(function (result_list) {
console.log("generic spreadsheet RENDER4");
console.log(JSON.parse(result_list[0]));
var i, content, var i, content,
data = JSON.parse(result_list[0]) data = JSON.parse(result_list[0])
.application_configuration.Input; .application_configuration.input;
console.log(data);
for (i = 0; i <= Object.keys(data).length; i += 1) { for (i = 0; i <= Object.keys(data).length; i += 1) {
if (Object.keys(data)[i] === options.action) { if (Object.keys(data)[i] === options.action) {
console.log("content");
content = data[options.action].configuration.columns; content = data[options.action].configuration.columns;
console.log(content);
} }
} }
// application_configuration.input.view_???_spreasheet.configuration // application_configuration.input.view_???_spreasheet.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