equal
deleted
inserted
replaced
327 _this.$.find(".Rk-Save-Button").addClass("saving"); |
327 _this.$.find(".Rk-Save-Button").addClass("saving"); |
328 break; |
328 break; |
329 } |
329 } |
330 }); |
330 }); |
331 |
331 |
|
332 this.renkan.project.on("change:loading_status", function(){ |
|
333 if (_this.renkan.project.get("loading_status")){ |
|
334 var animate = _this.$.find(".loader").addClass("run"); |
|
335 var timer = setTimeout(function(){ |
|
336 _this.$.find(".loader").hide(250); |
|
337 }, 3000); |
|
338 } |
|
339 }); |
|
340 |
332 this.renkan.project.on("add:users remove:users", _thRedrawUsers); |
341 this.renkan.project.on("add:users remove:users", _thRedrawUsers); |
333 |
342 |
334 this.renkan.project.on("add:views remove:views", function(_node) { |
343 this.renkan.project.on("add:views remove:views", function(_node) { |
335 if(_this.renkan.project.get('views').length > 0) { |
344 if(_this.renkan.project.get('views').length > 0) { |
336 _this.$.find(".Rk-ZoomSetSaved").show(); |
345 _this.$.find(".Rk-ZoomSetSaved").show(); |
340 } |
349 } |
341 }); |
350 }); |
342 |
351 |
343 this.renkan.project.on("add:nodes", function(_node) { |
352 this.renkan.project.on("add:nodes", function(_node) { |
344 _this.addRepresentation("Node", _node); |
353 _this.addRepresentation("Node", _node); |
345 _thRedraw(); |
354 if (!_this.renkan.project.get("loading_status")){ |
|
355 _thRedraw(); |
|
356 } |
346 }); |
357 }); |
347 this.renkan.project.on("add:edges", function(_edge) { |
358 this.renkan.project.on("add:edges", function(_edge) { |
348 _this.addRepresentation("Edge", _edge); |
359 _this.addRepresentation("Edge", _edge); |
349 _thRedraw(); |
360 if (!_this.renkan.project.get("loading_status")){ |
|
361 _thRedraw(); |
|
362 } |
350 }); |
363 }); |
351 this.renkan.project.on("change:title", function(_model, _title) { |
364 this.renkan.project.on("change:title", function(_model, _title) { |
352 var el = _this.$.find(".Rk-PadTitle"); |
365 var el = _this.$.find(".Rk-PadTitle"); |
353 if (el.is("input")) { |
366 if (el.is("input")) { |
354 if (el.val() !== _title) { |
367 if (el.val() !== _title) { |
463 |
476 |
464 }; |
477 }; |
465 |
478 |
466 _(Scene.prototype).extend({ |
479 _(Scene.prototype).extend({ |
467 template: _.template( |
480 template: _.template( |
468 '<% if (options.show_top_bar) { %><div class="Rk-TopBar"><% if (!options.editor_mode) { %><h2 class="Rk-PadTitle"><%- project.get("title") || translate("Untitled project")%></h2>' + |
481 '<% if (options.show_top_bar) { %><div class="Rk-TopBar"><div class="loader"></div><% if (!options.editor_mode) { %><h2 class="Rk-PadTitle"><%- project.get("title") || translate("Untitled project")%></h2>' + |
469 '<% } else { %><input type="text" class="Rk-PadTitle" value="<%- project.get("title") || "" %>" placeholder="<%-translate("Untitled project")%>" /><% } %>' + |
482 '<% } else { %><input type="text" class="Rk-PadTitle" value="<%- project.get("title") || "" %>" placeholder="<%-translate("Untitled project")%>" /><% } %>' + |
470 '<% if (options.show_user_list) { %><div class="Rk-Users"><div class="Rk-CurrentUser"><% if (options.show_user_color) { %><div class="Rk-Edit-ColorPicker-Wrapper"><span class="Rk-CurrentUser-Color"><% if (options.user_color_editable) { %><span class="Rk-Edit-ColorTip"></span><% } %></span>' + |
483 '<% if (options.show_user_list) { %><div class="Rk-Users"><div class="Rk-CurrentUser"><% if (options.show_user_color) { %><div class="Rk-Edit-ColorPicker-Wrapper"><span class="Rk-CurrentUser-Color"><% if (options.user_color_editable) { %><span class="Rk-Edit-ColorTip"></span><% } %></span>' + |
471 '<% if (options.user_color_editable) { print(colorPicker) } %></div><% } %><span class="Rk-CurrentUser-Name"><unknown user></span></div><ul class="Rk-UserList"></ul></div><% } %>' + |
484 '<% if (options.user_color_editable) { print(colorPicker) } %></div><% } %><span class="Rk-CurrentUser-Name"><unknown user></span></div><ul class="Rk-UserList"></ul></div><% } %>' + |
472 '<% if (options.home_button_url) {%><div class="Rk-TopBar-Separator"></div><a class="Rk-TopBar-Button Rk-Home-Button" href="<%- options.home_button_url %>"><div class="Rk-TopBar-Tooltip"><div class="Rk-TopBar-Tooltip-Contents">' + |
485 '<% if (options.home_button_url) {%><div class="Rk-TopBar-Separator"></div><a class="Rk-TopBar-Button Rk-Home-Button" href="<%- options.home_button_url %>"><div class="Rk-TopBar-Tooltip"><div class="Rk-TopBar-Tooltip-Contents">' + |
473 '<%- translate(options.home_button_title) %></div></div></a><% } %>' + |
486 '<%- translate(options.home_button_title) %></div></div></a><% } %>' + |