equal
deleted
inserted
replaced
17 }); |
17 }); |
18 _proj.set({ |
18 _proj.set({ |
19 saveStatus : 0 |
19 saveStatus : 0 |
20 }); |
20 }); |
21 _renkan.renderer.redrawActive = true; |
21 _renkan.renderer.redrawActive = true; |
22 _renkan.renderer.fixSize(); |
|
23 }); |
22 }); |
24 }; |
23 }; |
25 var _save = function() { |
24 var _save = function() { |
26 _proj.set({ |
25 _proj.set({ |
27 saveStatus : 2 |
26 saveStatus : 2 |
43 |
42 |
44 }; |
43 }; |
45 var _thrSave = Rkns._.throttle(function() { |
44 var _thrSave = Rkns._.throttle(function() { |
46 setTimeout(_save, 100); |
45 setTimeout(_save, 100); |
47 }, 1000); |
46 }, 1000); |
|
47 |
|
48 //TODO: Rearrange to avoid the 2 firts PUT due to a change in the project model |
|
49 // Take car of setting up the listener correctly to listen the save action on the view |
48 _proj.on("add:nodes add:edges add:users add:views", function(_model) { |
50 _proj.on("add:nodes add:edges add:users add:views", function(_model) { |
49 _model.on("change remove", function(_model) { |
51 _model.on("change remove", function(_model) { |
50 _thrSave(); |
52 _thrSave(); |
51 }); |
53 }); |
52 _thrSave(); |
54 _thrSave(); |