equal
deleted
inserted
replaced
319 }, 100); |
319 }, 100); |
320 |
320 |
321 _thRedrawUsers(); |
321 _thRedrawUsers(); |
322 |
322 |
323 // register model events |
323 // register model events |
324 this.renkan.project.on("change:save_status", function(){ |
324 this.renkan.project.on("change:saveStatus", function(){ |
325 switch (_this.renkan.project.get("save_status")) { |
325 switch (_this.renkan.project.get("saveStatus")) { |
326 case 0: //clean |
326 case 0: //clean |
327 _this.$.find(".Rk-Save-Button").removeClass("to-save"); |
327 _this.$.find(".Rk-Save-Button").removeClass("to-save"); |
328 _this.$.find(".Rk-Save-Button").removeClass("saving"); |
328 _this.$.find(".Rk-Save-Button").removeClass("saving"); |
329 _this.$.find(".Rk-Save-Button").addClass("saved"); |
329 _this.$.find(".Rk-Save-Button").addClass("saved"); |
330 break; |
330 break; |
339 _this.$.find(".Rk-Save-Button").addClass("saving"); |
339 _this.$.find(".Rk-Save-Button").addClass("saving"); |
340 break; |
340 break; |
341 } |
341 } |
342 }); |
342 }); |
343 |
343 |
344 this.renkan.project.on("change:loading_status", function(){ |
344 this.renkan.project.on("change:loadingStatus", function(){ |
345 if (_this.renkan.project.get("loading_status")){ |
345 if (_this.renkan.project.get("loadingStatus")){ |
346 var animate = _this.$.find(".loader").addClass("run"); |
346 var animate = _this.$.find(".loader").addClass("run"); |
347 var timer = setTimeout(function(){ |
347 var timer = setTimeout(function(){ |
348 _this.$.find(".loader").hide(250); |
348 _this.$.find(".loader").hide(250); |
349 }, 3000); |
349 }, 3000); |
350 } |
350 } |
361 } |
361 } |
362 }); |
362 }); |
363 |
363 |
364 this.renkan.project.on("add:nodes", function(_node) { |
364 this.renkan.project.on("add:nodes", function(_node) { |
365 _this.addRepresentation("Node", _node); |
365 _this.addRepresentation("Node", _node); |
366 if (!_this.renkan.project.get("loading_status")){ |
366 if (!_this.renkan.project.get("loadingStatus")){ |
367 _thRedraw(); |
367 _thRedraw(); |
368 } |
368 } |
369 }); |
369 }); |
370 this.renkan.project.on("add:edges", function(_edge) { |
370 this.renkan.project.on("add:edges", function(_edge) { |
371 _this.addRepresentation("Edge", _edge); |
371 _this.addRepresentation("Edge", _edge); |
372 if (!_this.renkan.project.get("loading_status")){ |
372 if (!_this.renkan.project.get("loadingStatus")){ |
373 _thRedraw(); |
373 _thRedraw(); |
374 } |
374 } |
375 }); |
375 }); |
376 this.renkan.project.on("change:title", function(_model, _title) { |
376 this.renkan.project.on("change:title", function(_model, _title) { |
377 var el = _this.$.find(".Rk-PadTitle"); |
377 var el = _this.$.find(".Rk-PadTitle"); |