--- a/client/js/models.js Fri May 22 17:48:14 2015 +0200
+++ b/client/js/models.js Mon May 25 01:18:12 2015 +0200
@@ -191,8 +191,9 @@
// PROJECT
var Project = Models.Project = RenkanModel.extend({
+ schemaVersion : 1,
type : "project",
- blacklist : [ 'save_status', ],
+ blacklist : [ 'saveStatus', 'loadingStatus',],
relations : [ {
type : Backbone.HasMany,
key : "users",
@@ -269,6 +270,19 @@
}
);
},
+ getSchemaVersion : function(data) {
+ var t = data;
+ if(typeof(t) === "undefined") {
+ t = this;
+ }
+ var version = t.schemaVersion;
+ if(!version) {
+ return 1;
+ }
+ else {
+ return version;
+ }
+ },
// Add event handler to remove edges when a node is removed
initialize : function() {
var _this = this;
@@ -283,6 +297,7 @@
},
toJSON : function() {
var json = _.clone(this.attributes);
+ json.schema_version = this.schemaVersion;
for ( var attr in json) {
if ((json[attr] instanceof Backbone.Model) ||
(json[attr] instanceof Backbone.Collection) ||