# HG changeset patch # User veltr # Date 1346251231 -7200 # Node ID 8aa0cac741a09ac927cc351cebe86e269e335d86 # Parent 95a1e550e5b17be2a87de04728ef3fccea93c384 _id corrections diff -r 95a1e550e5b1 -r 8aa0cac741a0 client/js/paper-renderer.js --- a/client/js/paper-renderer.js Wed Aug 29 16:35:07 2012 +0200 +++ b/client/js/paper-renderer.js Wed Aug 29 16:40:31 2012 +0200 @@ -429,8 +429,8 @@ var _data = { id: Rkns.Utils.getUID('edge'), created_by: this.renderer.renkan.current_user, - from: this.from_representation.model.get("id"), - to: _target.model.get("id") + from: this.from_representation.model.get("_id"), + to: _target.model.get("_id") }; this.project.addEdge(_data); } diff -r 95a1e550e5b1 -r 8aa0cac741a0 client/js/renkan-publish.js --- a/client/js/renkan-publish.js Wed Aug 29 16:35:07 2012 +0200 +++ b/client/js/renkan-publish.js Wed Aug 29 16:40:31 2012 +0200 @@ -59,7 +59,7 @@ constructor: function(options) { if (typeof options !== "undefined") { - options._id = options.id || Rkns.Models.getUID(this); + options._id = options._id || options.id || Rkns.Models.getUID(this); options.title = options.title || "(untitled " + this.type + ")"; options.description = options.description || ""; options.uri = options.uri || ""; @@ -95,7 +95,7 @@ }, toJSON: function() { return { - id: this.get("id"), + id: this.get("_id"), title: this.get("title"), uri: this.get("uri"), description: this.get("description"), @@ -120,12 +120,12 @@ }, toJSON: function() { return { - id: this.get("id"), + id: this.get("_id"), title: this.get("title"), uri: this.get("uri"), description: this.get("description"), position: this.get("position"), - created_by: this.get("created_by").get("id") + created_by: this.get("created_by").get("_id") } }, }); @@ -159,13 +159,13 @@ }, toJSON: function() { return { - id: this.get("id"), + id: this.get("_id"), title: this.get("title"), uri: this.get("uri"), description: this.get("description"), - from: this.get("from").get("id"), - to: this.get("to").get("id"), - created_by: this.get("created_by").get("id"), + from: this.get("from").get("_id"), + to: this.get("to").get("_id"), + created_by: this.get("created_by").get("_id"), } }, });