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

JS: remove some needless variables

parent bf6d8b4c
......@@ -5,16 +5,14 @@
function saveGraph(evt) {
var gadget = this,
graph_data,
graph_gadget;
graph_data;
return new RSVP.Queue()
.push(function () {
// Prevent double click
evt.target.getElementsByClassName("ui-btn")[0].disabled = true;
return gadget.getDeclaredGadget("productionline_graph");
})
.push(function (graphgadget) {
graph_gadget = graphgadget;
.push(function (graph_gadget) {
return graph_gadget.getData();
})
.push(function (data) {
......@@ -26,10 +24,13 @@
});
})
.push(function (body) {
var data = JSON.parse(body);
data.nodes = JSON.parse(graph_data).nodes;
data.edges = JSON.parse(graph_data).edges;
data.preference = JSON.parse(graph_data).preference;
var data = JSON.parse(body),
json_graph_data = JSON.parse(graph_data);
data.nodes = json_graph_data.nodes;
data.edges = json_graph_data.edges;
data.preference = json_graph_data.preferences;
return gadget.aq_putAttachment({
"_id": gadget.props.jio_key,
"_attachment": "body.json",
......
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