diff -r d0da34fda4b4 -r 7b517a54b708 server/src/main/webapp/static/js/paper-renderer.js --- a/server/src/main/webapp/static/js/paper-renderer.js Mon Dec 31 13:37:31 2012 +0100 +++ b/server/src/main/webapp/static/js/paper-renderer.js Tue Jan 01 09:28:03 2013 +0100 @@ -295,9 +295,9 @@ this.node_image.position = this.paper_coords; } } - + Rkns._.each(this.project.get("edges").filter(function (ed) { return ((ed.to === this.model) || (ed.from === this.model));}), function(edge, index, list){ - var repr = this.renderer.getRepresentationByModel(edge); + var repr = this.renderer.getRepresentationByModel(edge); if(repr != null && typeof repr.from_representation.paper_coords !== "undefined" && typeof repr.to_representation.paper_coords !== "undefined") { repr.redraw(); } @@ -946,9 +946,7 @@ this.renkan = _renkan; this.$ = Rkns.$(".Rk-Render"); this.representations = []; - this.$.html(this.template({ - l10n: _renkan.l10n - })) + this.$.html(this.template(_renkan)); this.canvas_$ = this.$.find(".Rk-Canvas"); this.editor_$ = this.$.find(".Rk-Editor"); this.notif_$ = this.$.find(".Rk-Notifications"); @@ -1065,9 +1063,17 @@ this.addRepresentations("Node", this.renkan.project.get("nodes")); this.addRepresentations("Edge", this.renkan.project.get("edges")); + this.renkan.project.on("change:title", function() { + _this.$.find(".Rk-PadTitle").val(_renkan.project.get("title")); + }); + + this.$.find(".Rk-PadTitle").on("keyup input paste", function() { + _renkan.project.set({"title": $(this).val()}); + }) + this.renkan.project.get("users").each(function(_user) { _this.addUser(_user); - }) + }); this.renkan.project.on("add:users", function(_user) { _this.addUser(_user); @@ -1085,11 +1091,12 @@ } Rkns.Renderer.Scene.prototype.template = Rkns._.template( - '

<%=l10n.untitled_project%>

' + '
" placeholder="<%=l10n.untitled_project%>" />' + '
<unknown user>
    ' + '
    <%=l10n.full_screen%>
    ' + '
    <%=l10n.add_node%>
    ' + '
    <%=l10n.add_edge%>
    ' + + '
    <%=l10n.save_project%>
    ' + '
    ' + '
    ' + '
    '