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"), } }, });