send the id to the template and construct an proper url for each node passing the id to the parameter idNode
authorrougeronj
Fri, 12 Jun 2015 15:41:26 +0200
changeset 479 be510a7fc5ac
parent 478 d40fac25b36a
child 480 a5da9a586297
send the id to the template and construct an proper url for each node passing the id to the parameter idNode
client/js/renderer/nodeeditor.js
client/templates/nodeeditor_readonly.html
--- a/client/js/renderer/nodeeditor.js	Fri Jun 12 15:14:48 2015 +0200
+++ b/client/js/renderer/nodeeditor.js	Fri Jun 12 15:41:26 2015 +0200
@@ -25,6 +25,7 @@
             this.editor_$
             .html(_template({
                 node: {
+                    _id: _model.get("_id"),
                     has_creator: !!_model.get("created_by"),
                     title: _model.get("title"),
                     uri: _model.get("uri"),
--- a/client/templates/nodeeditor_readonly.html	Fri Jun 12 15:14:48 2015 +0200
+++ b/client/templates/nodeeditor_readonly.html	Fri Jun 12 15:41:26 2015 +0200
@@ -26,4 +26,4 @@
         <%- shortenText(node.created_by_title, 25) %>
     </p>
 <% } %>
-    <a href="/#?idnode=<%-node.id%>" target="_blank"><%-renkan.translate("Link to the node")%></a>
+    <a href="#?idnode=<%-node._id%>"><%-renkan.translate("Link to the node")%></a>