| author | rougeronj |
| Tue, 02 Jun 2015 16:42:02 +0200 | |
| changeset 455 | 18b9be54174d |
| parent 449 | aae670254c49 |
| parent 444 | 19f0b7803aed |
| child 461 | 48235ed6b07d |
| permissions | -rw-r--r-- |
|
444
19f0b7803aed
add schema version + dataloaders to ensure data migrations + small correction for php server exmple + a readme for the php server example
ymh <ymh.work@gmail.com>
parents:
443
diff
changeset
|
1 |
(function(root) { |
| 195 | 2 |
"use strict"; |
|
293
fba23fde14ba
Correct jshint errors and force it on build
ymh <ymh.work@gmail.com>
parents:
282
diff
changeset
|
3 |
|
| 23 | 4 |
var Backbone = root.Backbone; |
|
293
fba23fde14ba
Correct jshint errors and force it on build
ymh <ymh.work@gmail.com>
parents:
282
diff
changeset
|
5 |
|
| 23 | 6 |
var Models = root.Rkns.Models = {}; |
|
293
fba23fde14ba
Correct jshint errors and force it on build
ymh <ymh.work@gmail.com>
parents:
282
diff
changeset
|
7 |
|
| 23 | 8 |
Models.getUID = function(obj) { |
|
414
276042cb477c
correct fix size, improve control on view save button and related init state
ymh <ymh.work@gmail.com>
parents:
362
diff
changeset
|
9 |
var guid = 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, |
|
276042cb477c
correct fix size, improve control on view save button and related init state
ymh <ymh.work@gmail.com>
parents:
362
diff
changeset
|
10 |
function(c) { |
|
276042cb477c
correct fix size, improve control on view save button and related init state
ymh <ymh.work@gmail.com>
parents:
362
diff
changeset
|
11 |
var r = Math.random() * 16 | 0, v = c === 'x' ? r |
|
276042cb477c
correct fix size, improve control on view save button and related init state
ymh <ymh.work@gmail.com>
parents:
362
diff
changeset
|
12 |
: (r & 0x3 | 0x8); |
|
276042cb477c
correct fix size, improve control on view save button and related init state
ymh <ymh.work@gmail.com>
parents:
362
diff
changeset
|
13 |
return v.toString(16); |
|
276042cb477c
correct fix size, improve control on view save button and related init state
ymh <ymh.work@gmail.com>
parents:
362
diff
changeset
|
14 |
}); |
|
276042cb477c
correct fix size, improve control on view save button and related init state
ymh <ymh.work@gmail.com>
parents:
362
diff
changeset
|
15 |
if (typeof obj !== 'undefined') { |
| 298 | 16 |
return obj.type + "-" + guid; |
17 |
} |
|
18 |
else { |
|
19 |
return guid; |
|
20 |
} |
|
| 23 | 21 |
}; |
|
293
fba23fde14ba
Correct jshint errors and force it on build
ymh <ymh.work@gmail.com>
parents:
282
diff
changeset
|
22 |
|
| 23 | 23 |
var RenkanModel = Backbone.RelationalModel.extend({ |
24 |
idAttribute : "_id", |
|
|
414
276042cb477c
correct fix size, improve control on view save button and related init state
ymh <ymh.work@gmail.com>
parents:
362
diff
changeset
|
25 |
constructor : function(options) { |
|
293
fba23fde14ba
Correct jshint errors and force it on build
ymh <ymh.work@gmail.com>
parents:
282
diff
changeset
|
26 |
|
| 23 | 27 |
if (typeof options !== "undefined") { |
| 27 | 28 |
options._id = options._id || options.id || Models.getUID(this); |
| 68 | 29 |
options.title = options.title || ""; |
| 23 | 30 |
options.description = options.description || ""; |
31 |
options.uri = options.uri || ""; |
|
|
293
fba23fde14ba
Correct jshint errors and force it on build
ymh <ymh.work@gmail.com>
parents:
282
diff
changeset
|
32 |
|
|
414
276042cb477c
correct fix size, improve control on view save button and related init state
ymh <ymh.work@gmail.com>
parents:
362
diff
changeset
|
33 |
if (typeof this.prepare === "function") { |
| 23 | 34 |
options = this.prepare(options); |
35 |
} |
|
36 |
} |
|
37 |
Backbone.RelationalModel.prototype.constructor.call(this, options); |
|
38 |
}, |
|
|
414
276042cb477c
correct fix size, improve control on view save button and related init state
ymh <ymh.work@gmail.com>
parents:
362
diff
changeset
|
39 |
validate : function() { |
|
276042cb477c
correct fix size, improve control on view save button and related init state
ymh <ymh.work@gmail.com>
parents:
362
diff
changeset
|
40 |
if (!this.type) { |
| 23 | 41 |
return "object has no type"; |
42 |
} |
|
43 |
}, |
|
44 |
addReference : function(_options, _propName, _list, _id, _default) { |
|
45 |
var _element = _list.get(_id); |
|
|
414
276042cb477c
correct fix size, improve control on view save button and related init state
ymh <ymh.work@gmail.com>
parents:
362
diff
changeset
|
46 |
if (typeof _element === "undefined" && |
|
276042cb477c
correct fix size, improve control on view save button and related init state
ymh <ymh.work@gmail.com>
parents:
362
diff
changeset
|
47 |
typeof _default !== "undefined") { |
|
276042cb477c
correct fix size, improve control on view save button and related init state
ymh <ymh.work@gmail.com>
parents:
362
diff
changeset
|
48 |
_options[_propName] = _default; |
| 23 | 49 |
} |
50 |
else { |
|
|
414
276042cb477c
correct fix size, improve control on view save button and related init state
ymh <ymh.work@gmail.com>
parents:
362
diff
changeset
|
51 |
_options[_propName] = _element; |
| 23 | 52 |
} |
53 |
} |
|
54 |
}); |
|
|
293
fba23fde14ba
Correct jshint errors and force it on build
ymh <ymh.work@gmail.com>
parents:
282
diff
changeset
|
55 |
|
| 23 | 56 |
// USER |
57 |
var User = Models.User = RenkanModel.extend({ |
|
|
414
276042cb477c
correct fix size, improve control on view save button and related init state
ymh <ymh.work@gmail.com>
parents:
362
diff
changeset
|
58 |
type : "user", |
|
276042cb477c
correct fix size, improve control on view save button and related init state
ymh <ymh.work@gmail.com>
parents:
362
diff
changeset
|
59 |
prepare : function(options) { |
| 23 | 60 |
options.color = options.color || "#666666"; |
61 |
return options; |
|
| 24 | 62 |
}, |
|
414
276042cb477c
correct fix size, improve control on view save button and related init state
ymh <ymh.work@gmail.com>
parents:
362
diff
changeset
|
63 |
toJSON : function() { |
| 24 | 64 |
return { |
|
414
276042cb477c
correct fix size, improve control on view save button and related init state
ymh <ymh.work@gmail.com>
parents:
362
diff
changeset
|
65 |
_id : this.get("_id"), |
|
276042cb477c
correct fix size, improve control on view save button and related init state
ymh <ymh.work@gmail.com>
parents:
362
diff
changeset
|
66 |
title : this.get("title"), |
|
276042cb477c
correct fix size, improve control on view save button and related init state
ymh <ymh.work@gmail.com>
parents:
362
diff
changeset
|
67 |
uri : this.get("uri"), |
|
276042cb477c
correct fix size, improve control on view save button and related init state
ymh <ymh.work@gmail.com>
parents:
362
diff
changeset
|
68 |
description : this.get("description"), |
|
276042cb477c
correct fix size, improve control on view save button and related init state
ymh <ymh.work@gmail.com>
parents:
362
diff
changeset
|
69 |
color : this.get("color") |
| 27 | 70 |
}; |
|
211
d87f6bdee43d
upgrade libs + add no minified versions of libs + improve build + allow disabling zoom on scroll
ymh <ymh.work@gmail.com>
parents:
195
diff
changeset
|
71 |
} |
| 23 | 72 |
}); |
|
293
fba23fde14ba
Correct jshint errors and force it on build
ymh <ymh.work@gmail.com>
parents:
282
diff
changeset
|
73 |
|
| 23 | 74 |
// NODE |
75 |
var Node = Models.Node = RenkanModel.extend({ |
|
|
414
276042cb477c
correct fix size, improve control on view save button and related init state
ymh <ymh.work@gmail.com>
parents:
362
diff
changeset
|
76 |
type : "node", |
|
276042cb477c
correct fix size, improve control on view save button and related init state
ymh <ymh.work@gmail.com>
parents:
362
diff
changeset
|
77 |
relations : [ { |
|
276042cb477c
correct fix size, improve control on view save button and related init state
ymh <ymh.work@gmail.com>
parents:
362
diff
changeset
|
78 |
type : Backbone.HasOne, |
|
276042cb477c
correct fix size, improve control on view save button and related init state
ymh <ymh.work@gmail.com>
parents:
362
diff
changeset
|
79 |
key : "created_by", |
|
276042cb477c
correct fix size, improve control on view save button and related init state
ymh <ymh.work@gmail.com>
parents:
362
diff
changeset
|
80 |
relatedModel : User |
|
276042cb477c
correct fix size, improve control on view save button and related init state
ymh <ymh.work@gmail.com>
parents:
362
diff
changeset
|
81 |
} ], |
|
276042cb477c
correct fix size, improve control on view save button and related init state
ymh <ymh.work@gmail.com>
parents:
362
diff
changeset
|
82 |
prepare : function(options) { |
| 195 | 83 |
var project = options.project; |
|
414
276042cb477c
correct fix size, improve control on view save button and related init state
ymh <ymh.work@gmail.com>
parents:
362
diff
changeset
|
84 |
this.addReference(options, "created_by", project.get("users"), |
|
276042cb477c
correct fix size, improve control on view save button and related init state
ymh <ymh.work@gmail.com>
parents:
362
diff
changeset
|
85 |
options.created_by, project.current_user); |
| 23 | 86 |
options.description = options.description || ""; |
87 |
return options; |
|
| 24 | 88 |
}, |
|
414
276042cb477c
correct fix size, improve control on view save button and related init state
ymh <ymh.work@gmail.com>
parents:
362
diff
changeset
|
89 |
toJSON : function() { |
| 24 | 90 |
return { |
|
414
276042cb477c
correct fix size, improve control on view save button and related init state
ymh <ymh.work@gmail.com>
parents:
362
diff
changeset
|
91 |
_id : this.get("_id"), |
|
276042cb477c
correct fix size, improve control on view save button and related init state
ymh <ymh.work@gmail.com>
parents:
362
diff
changeset
|
92 |
title : this.get("title"), |
|
276042cb477c
correct fix size, improve control on view save button and related init state
ymh <ymh.work@gmail.com>
parents:
362
diff
changeset
|
93 |
uri : this.get("uri"), |
|
276042cb477c
correct fix size, improve control on view save button and related init state
ymh <ymh.work@gmail.com>
parents:
362
diff
changeset
|
94 |
description : this.get("description"), |
|
276042cb477c
correct fix size, improve control on view save button and related init state
ymh <ymh.work@gmail.com>
parents:
362
diff
changeset
|
95 |
position : this.get("position"), |
|
276042cb477c
correct fix size, improve control on view save button and related init state
ymh <ymh.work@gmail.com>
parents:
362
diff
changeset
|
96 |
image : this.get("image"), |
|
276042cb477c
correct fix size, improve control on view save button and related init state
ymh <ymh.work@gmail.com>
parents:
362
diff
changeset
|
97 |
color : this.get("color"), |
|
276042cb477c
correct fix size, improve control on view save button and related init state
ymh <ymh.work@gmail.com>
parents:
362
diff
changeset
|
98 |
created_by : this.get("created_by") ? this.get("created_by") |
|
276042cb477c
correct fix size, improve control on view save button and related init state
ymh <ymh.work@gmail.com>
parents:
362
diff
changeset
|
99 |
.get("_id") : null, |
|
276042cb477c
correct fix size, improve control on view save button and related init state
ymh <ymh.work@gmail.com>
parents:
362
diff
changeset
|
100 |
size : this.get("size"), |
|
276042cb477c
correct fix size, improve control on view save button and related init state
ymh <ymh.work@gmail.com>
parents:
362
diff
changeset
|
101 |
clip_path : this.get("clip_path"), |
| 449 | 102 |
shape : this.get("shape"), |
103 |
type : this.get("type") |
|
| 27 | 104 |
}; |
|
211
d87f6bdee43d
upgrade libs + add no minified versions of libs + improve build + allow disabling zoom on scroll
ymh <ymh.work@gmail.com>
parents:
195
diff
changeset
|
105 |
} |
| 23 | 106 |
}); |
|
293
fba23fde14ba
Correct jshint errors and force it on build
ymh <ymh.work@gmail.com>
parents:
282
diff
changeset
|
107 |
|
| 23 | 108 |
// EDGE |
109 |
var Edge = Models.Edge = RenkanModel.extend({ |
|
|
414
276042cb477c
correct fix size, improve control on view save button and related init state
ymh <ymh.work@gmail.com>
parents:
362
diff
changeset
|
110 |
type : "edge", |
|
276042cb477c
correct fix size, improve control on view save button and related init state
ymh <ymh.work@gmail.com>
parents:
362
diff
changeset
|
111 |
relations : [ { |
|
276042cb477c
correct fix size, improve control on view save button and related init state
ymh <ymh.work@gmail.com>
parents:
362
diff
changeset
|
112 |
type : Backbone.HasOne, |
|
276042cb477c
correct fix size, improve control on view save button and related init state
ymh <ymh.work@gmail.com>
parents:
362
diff
changeset
|
113 |
key : "created_by", |
|
276042cb477c
correct fix size, improve control on view save button and related init state
ymh <ymh.work@gmail.com>
parents:
362
diff
changeset
|
114 |
relatedModel : User |
|
276042cb477c
correct fix size, improve control on view save button and related init state
ymh <ymh.work@gmail.com>
parents:
362
diff
changeset
|
115 |
}, { |
|
276042cb477c
correct fix size, improve control on view save button and related init state
ymh <ymh.work@gmail.com>
parents:
362
diff
changeset
|
116 |
type : Backbone.HasOne, |
|
276042cb477c
correct fix size, improve control on view save button and related init state
ymh <ymh.work@gmail.com>
parents:
362
diff
changeset
|
117 |
key : "from", |
|
276042cb477c
correct fix size, improve control on view save button and related init state
ymh <ymh.work@gmail.com>
parents:
362
diff
changeset
|
118 |
relatedModel : Node |
|
276042cb477c
correct fix size, improve control on view save button and related init state
ymh <ymh.work@gmail.com>
parents:
362
diff
changeset
|
119 |
}, { |
|
276042cb477c
correct fix size, improve control on view save button and related init state
ymh <ymh.work@gmail.com>
parents:
362
diff
changeset
|
120 |
type : Backbone.HasOne, |
|
276042cb477c
correct fix size, improve control on view save button and related init state
ymh <ymh.work@gmail.com>
parents:
362
diff
changeset
|
121 |
key : "to", |
|
276042cb477c
correct fix size, improve control on view save button and related init state
ymh <ymh.work@gmail.com>
parents:
362
diff
changeset
|
122 |
relatedModel : Node |
|
276042cb477c
correct fix size, improve control on view save button and related init state
ymh <ymh.work@gmail.com>
parents:
362
diff
changeset
|
123 |
} ], |
|
276042cb477c
correct fix size, improve control on view save button and related init state
ymh <ymh.work@gmail.com>
parents:
362
diff
changeset
|
124 |
prepare : function(options) { |
| 195 | 125 |
var project = options.project; |
|
414
276042cb477c
correct fix size, improve control on view save button and related init state
ymh <ymh.work@gmail.com>
parents:
362
diff
changeset
|
126 |
this.addReference(options, "created_by", project.get("users"), |
|
276042cb477c
correct fix size, improve control on view save button and related init state
ymh <ymh.work@gmail.com>
parents:
362
diff
changeset
|
127 |
options.created_by, project.current_user); |
|
276042cb477c
correct fix size, improve control on view save button and related init state
ymh <ymh.work@gmail.com>
parents:
362
diff
changeset
|
128 |
this.addReference(options, "from", project.get("nodes"), |
|
276042cb477c
correct fix size, improve control on view save button and related init state
ymh <ymh.work@gmail.com>
parents:
362
diff
changeset
|
129 |
options.from); |
| 23 | 130 |
this.addReference(options, "to", project.get("nodes"), options.to); |
131 |
return options; |
|
| 24 | 132 |
}, |
|
414
276042cb477c
correct fix size, improve control on view save button and related init state
ymh <ymh.work@gmail.com>
parents:
362
diff
changeset
|
133 |
toJSON : function() { |
| 24 | 134 |
return { |
|
414
276042cb477c
correct fix size, improve control on view save button and related init state
ymh <ymh.work@gmail.com>
parents:
362
diff
changeset
|
135 |
_id : this.get("_id"), |
|
276042cb477c
correct fix size, improve control on view save button and related init state
ymh <ymh.work@gmail.com>
parents:
362
diff
changeset
|
136 |
title : this.get("title"), |
|
276042cb477c
correct fix size, improve control on view save button and related init state
ymh <ymh.work@gmail.com>
parents:
362
diff
changeset
|
137 |
uri : this.get("uri"), |
|
276042cb477c
correct fix size, improve control on view save button and related init state
ymh <ymh.work@gmail.com>
parents:
362
diff
changeset
|
138 |
description : this.get("description"), |
|
276042cb477c
correct fix size, improve control on view save button and related init state
ymh <ymh.work@gmail.com>
parents:
362
diff
changeset
|
139 |
from : this.get("from") ? this.get("from").get("_id") : null, |
|
276042cb477c
correct fix size, improve control on view save button and related init state
ymh <ymh.work@gmail.com>
parents:
362
diff
changeset
|
140 |
to : this.get("to") ? this.get("to").get("_id") : null, |
|
276042cb477c
correct fix size, improve control on view save button and related init state
ymh <ymh.work@gmail.com>
parents:
362
diff
changeset
|
141 |
color : this.get("color"), |
|
276042cb477c
correct fix size, improve control on view save button and related init state
ymh <ymh.work@gmail.com>
parents:
362
diff
changeset
|
142 |
created_by : this.get("created_by") ? this.get("created_by") |
|
276042cb477c
correct fix size, improve control on view save button and related init state
ymh <ymh.work@gmail.com>
parents:
362
diff
changeset
|
143 |
.get("_id") : null |
| 27 | 144 |
}; |
|
211
d87f6bdee43d
upgrade libs + add no minified versions of libs + improve build + allow disabling zoom on scroll
ymh <ymh.work@gmail.com>
parents:
195
diff
changeset
|
145 |
} |
| 23 | 146 |
}); |
|
293
fba23fde14ba
Correct jshint errors and force it on build
ymh <ymh.work@gmail.com>
parents:
282
diff
changeset
|
147 |
|
| 281 | 148 |
// View |
149 |
var View = Models.View = RenkanModel.extend({ |
|
|
414
276042cb477c
correct fix size, improve control on view save button and related init state
ymh <ymh.work@gmail.com>
parents:
362
diff
changeset
|
150 |
type : "view", |
|
276042cb477c
correct fix size, improve control on view save button and related init state
ymh <ymh.work@gmail.com>
parents:
362
diff
changeset
|
151 |
relations : [ { |
|
276042cb477c
correct fix size, improve control on view save button and related init state
ymh <ymh.work@gmail.com>
parents:
362
diff
changeset
|
152 |
type : Backbone.HasOne, |
|
276042cb477c
correct fix size, improve control on view save button and related init state
ymh <ymh.work@gmail.com>
parents:
362
diff
changeset
|
153 |
key : "created_by", |
|
276042cb477c
correct fix size, improve control on view save button and related init state
ymh <ymh.work@gmail.com>
parents:
362
diff
changeset
|
154 |
relatedModel : User |
|
276042cb477c
correct fix size, improve control on view save button and related init state
ymh <ymh.work@gmail.com>
parents:
362
diff
changeset
|
155 |
} ], |
|
276042cb477c
correct fix size, improve control on view save button and related init state
ymh <ymh.work@gmail.com>
parents:
362
diff
changeset
|
156 |
prepare : function(options) { |
| 299 | 157 |
var project = options.project; |
|
414
276042cb477c
correct fix size, improve control on view save button and related init state
ymh <ymh.work@gmail.com>
parents:
362
diff
changeset
|
158 |
this.addReference(options, "created_by", project.get("users"), |
|
276042cb477c
correct fix size, improve control on view save button and related init state
ymh <ymh.work@gmail.com>
parents:
362
diff
changeset
|
159 |
options.created_by, project.current_user); |
| 299 | 160 |
options.description = options.description || ""; |
|
414
276042cb477c
correct fix size, improve control on view save button and related init state
ymh <ymh.work@gmail.com>
parents:
362
diff
changeset
|
161 |
if (typeof options.offset !== "undefined") { |
| 299 | 162 |
var offset = {}; |
163 |
if (Array.isArray(options.offset)) { |
|
|
414
276042cb477c
correct fix size, improve control on view save button and related init state
ymh <ymh.work@gmail.com>
parents:
362
diff
changeset
|
164 |
offset.x = options.offset[0]; |
|
276042cb477c
correct fix size, improve control on view save button and related init state
ymh <ymh.work@gmail.com>
parents:
362
diff
changeset
|
165 |
offset.y = options.offset.length > 1 ? options.offset[1] |
|
276042cb477c
correct fix size, improve control on view save button and related init state
ymh <ymh.work@gmail.com>
parents:
362
diff
changeset
|
166 |
: options.offset[0]; |
| 299 | 167 |
} |
168 |
else if (options.offset.x != null) { |
|
|
414
276042cb477c
correct fix size, improve control on view save button and related init state
ymh <ymh.work@gmail.com>
parents:
362
diff
changeset
|
169 |
offset.x = options.offset.x; |
|
276042cb477c
correct fix size, improve control on view save button and related init state
ymh <ymh.work@gmail.com>
parents:
362
diff
changeset
|
170 |
offset.y = options.offset.y; |
| 299 | 171 |
} |
172 |
options.offset = offset; |
|
173 |
} |
|
174 |
return options; |
|
175 |
}, |
|
|
414
276042cb477c
correct fix size, improve control on view save button and related init state
ymh <ymh.work@gmail.com>
parents:
362
diff
changeset
|
176 |
toJSON : function() { |
| 282 | 177 |
return { |
|
414
276042cb477c
correct fix size, improve control on view save button and related init state
ymh <ymh.work@gmail.com>
parents:
362
diff
changeset
|
178 |
_id : this.get("_id"), |
|
276042cb477c
correct fix size, improve control on view save button and related init state
ymh <ymh.work@gmail.com>
parents:
362
diff
changeset
|
179 |
zoom_level : this.get("zoom_level"), |
|
276042cb477c
correct fix size, improve control on view save button and related init state
ymh <ymh.work@gmail.com>
parents:
362
diff
changeset
|
180 |
offset : this.get("offset"), |
|
276042cb477c
correct fix size, improve control on view save button and related init state
ymh <ymh.work@gmail.com>
parents:
362
diff
changeset
|
181 |
title : this.get("title"), |
|
276042cb477c
correct fix size, improve control on view save button and related init state
ymh <ymh.work@gmail.com>
parents:
362
diff
changeset
|
182 |
description : this.get("description"), |
|
276042cb477c
correct fix size, improve control on view save button and related init state
ymh <ymh.work@gmail.com>
parents:
362
diff
changeset
|
183 |
created_by : this.get("created_by") ? this.get("created_by") |
| 449 | 184 |
.get("_id") : null, |
185 |
hidden_nodes: this.get("hidden_nodes") |
|
|
414
276042cb477c
correct fix size, improve control on view save button and related init state
ymh <ymh.work@gmail.com>
parents:
362
diff
changeset
|
186 |
// Don't need project id |
| 282 | 187 |
}; |
188 |
} |
|
| 281 | 189 |
}); |
|
293
fba23fde14ba
Correct jshint errors and force it on build
ymh <ymh.work@gmail.com>
parents:
282
diff
changeset
|
190 |
|
| 23 | 191 |
// PROJECT |
192 |
var Project = Models.Project = RenkanModel.extend({ |
|
|
444
19f0b7803aed
add schema version + dataloaders to ensure data migrations + small correction for php server exmple + a readme for the php server example
ymh <ymh.work@gmail.com>
parents:
443
diff
changeset
|
193 |
schemaVersion : "1", |
|
414
276042cb477c
correct fix size, improve control on view save button and related init state
ymh <ymh.work@gmail.com>
parents:
362
diff
changeset
|
194 |
type : "project", |
|
443
4c7ab16e5845
best coding convention for loadingstatus and savingstatus, rempve loadingatatus form export
ymh <ymh.work@gmail.com>
parents:
435
diff
changeset
|
195 |
blacklist : [ 'saveStatus', 'loadingStatus',], |
|
414
276042cb477c
correct fix size, improve control on view save button and related init state
ymh <ymh.work@gmail.com>
parents:
362
diff
changeset
|
196 |
relations : [ { |
|
276042cb477c
correct fix size, improve control on view save button and related init state
ymh <ymh.work@gmail.com>
parents:
362
diff
changeset
|
197 |
type : Backbone.HasMany, |
|
276042cb477c
correct fix size, improve control on view save button and related init state
ymh <ymh.work@gmail.com>
parents:
362
diff
changeset
|
198 |
key : "users", |
|
276042cb477c
correct fix size, improve control on view save button and related init state
ymh <ymh.work@gmail.com>
parents:
362
diff
changeset
|
199 |
relatedModel : User, |
|
276042cb477c
correct fix size, improve control on view save button and related init state
ymh <ymh.work@gmail.com>
parents:
362
diff
changeset
|
200 |
reverseRelation : { |
|
276042cb477c
correct fix size, improve control on view save button and related init state
ymh <ymh.work@gmail.com>
parents:
362
diff
changeset
|
201 |
key : 'project', |
|
276042cb477c
correct fix size, improve control on view save button and related init state
ymh <ymh.work@gmail.com>
parents:
362
diff
changeset
|
202 |
includeInJSON : '_id' |
|
211
d87f6bdee43d
upgrade libs + add no minified versions of libs + improve build + allow disabling zoom on scroll
ymh <ymh.work@gmail.com>
parents:
195
diff
changeset
|
203 |
} |
|
414
276042cb477c
correct fix size, improve control on view save button and related init state
ymh <ymh.work@gmail.com>
parents:
362
diff
changeset
|
204 |
}, { |
|
276042cb477c
correct fix size, improve control on view save button and related init state
ymh <ymh.work@gmail.com>
parents:
362
diff
changeset
|
205 |
type : Backbone.HasMany, |
|
276042cb477c
correct fix size, improve control on view save button and related init state
ymh <ymh.work@gmail.com>
parents:
362
diff
changeset
|
206 |
key : "nodes", |
|
276042cb477c
correct fix size, improve control on view save button and related init state
ymh <ymh.work@gmail.com>
parents:
362
diff
changeset
|
207 |
relatedModel : Node, |
|
276042cb477c
correct fix size, improve control on view save button and related init state
ymh <ymh.work@gmail.com>
parents:
362
diff
changeset
|
208 |
reverseRelation : { |
|
276042cb477c
correct fix size, improve control on view save button and related init state
ymh <ymh.work@gmail.com>
parents:
362
diff
changeset
|
209 |
key : 'project', |
|
276042cb477c
correct fix size, improve control on view save button and related init state
ymh <ymh.work@gmail.com>
parents:
362
diff
changeset
|
210 |
includeInJSON : '_id' |
|
211
d87f6bdee43d
upgrade libs + add no minified versions of libs + improve build + allow disabling zoom on scroll
ymh <ymh.work@gmail.com>
parents:
195
diff
changeset
|
211 |
} |
|
414
276042cb477c
correct fix size, improve control on view save button and related init state
ymh <ymh.work@gmail.com>
parents:
362
diff
changeset
|
212 |
}, { |
|
276042cb477c
correct fix size, improve control on view save button and related init state
ymh <ymh.work@gmail.com>
parents:
362
diff
changeset
|
213 |
type : Backbone.HasMany, |
|
276042cb477c
correct fix size, improve control on view save button and related init state
ymh <ymh.work@gmail.com>
parents:
362
diff
changeset
|
214 |
key : "edges", |
|
276042cb477c
correct fix size, improve control on view save button and related init state
ymh <ymh.work@gmail.com>
parents:
362
diff
changeset
|
215 |
relatedModel : Edge, |
|
276042cb477c
correct fix size, improve control on view save button and related init state
ymh <ymh.work@gmail.com>
parents:
362
diff
changeset
|
216 |
reverseRelation : { |
|
276042cb477c
correct fix size, improve control on view save button and related init state
ymh <ymh.work@gmail.com>
parents:
362
diff
changeset
|
217 |
key : 'project', |
|
276042cb477c
correct fix size, improve control on view save button and related init state
ymh <ymh.work@gmail.com>
parents:
362
diff
changeset
|
218 |
includeInJSON : '_id' |
|
211
d87f6bdee43d
upgrade libs + add no minified versions of libs + improve build + allow disabling zoom on scroll
ymh <ymh.work@gmail.com>
parents:
195
diff
changeset
|
219 |
} |
|
414
276042cb477c
correct fix size, improve control on view save button and related init state
ymh <ymh.work@gmail.com>
parents:
362
diff
changeset
|
220 |
}, { |
|
276042cb477c
correct fix size, improve control on view save button and related init state
ymh <ymh.work@gmail.com>
parents:
362
diff
changeset
|
221 |
type : Backbone.HasMany, |
|
276042cb477c
correct fix size, improve control on view save button and related init state
ymh <ymh.work@gmail.com>
parents:
362
diff
changeset
|
222 |
key : "views", |
|
276042cb477c
correct fix size, improve control on view save button and related init state
ymh <ymh.work@gmail.com>
parents:
362
diff
changeset
|
223 |
relatedModel : View, |
|
276042cb477c
correct fix size, improve control on view save button and related init state
ymh <ymh.work@gmail.com>
parents:
362
diff
changeset
|
224 |
reverseRelation : { |
|
276042cb477c
correct fix size, improve control on view save button and related init state
ymh <ymh.work@gmail.com>
parents:
362
diff
changeset
|
225 |
key : 'project', |
|
276042cb477c
correct fix size, improve control on view save button and related init state
ymh <ymh.work@gmail.com>
parents:
362
diff
changeset
|
226 |
includeInJSON : '_id' |
| 281 | 227 |
} |
|
414
276042cb477c
correct fix size, improve control on view save button and related init state
ymh <ymh.work@gmail.com>
parents:
362
diff
changeset
|
228 |
} ], |
|
276042cb477c
correct fix size, improve control on view save button and related init state
ymh <ymh.work@gmail.com>
parents:
362
diff
changeset
|
229 |
addUser : function(_props, _options) { |
| 23 | 230 |
_props.project = this; |
| 56 | 231 |
var _user = User.findOrCreate(_props); |
232 |
this.get("users").push(_user, _options); |
|
| 23 | 233 |
return _user; |
234 |
}, |
|
|
414
276042cb477c
correct fix size, improve control on view save button and related init state
ymh <ymh.work@gmail.com>
parents:
362
diff
changeset
|
235 |
addNode : function(_props, _options) { |
|
293
fba23fde14ba
Correct jshint errors and force it on build
ymh <ymh.work@gmail.com>
parents:
282
diff
changeset
|
236 |
_props.project = this; |
| 56 | 237 |
var _node = Node.findOrCreate(_props); |
238 |
this.get("nodes").push(_node, _options); |
|
| 23 | 239 |
return _node; |
240 |
}, |
|
|
414
276042cb477c
correct fix size, improve control on view save button and related init state
ymh <ymh.work@gmail.com>
parents:
362
diff
changeset
|
241 |
addEdge : function(_props, _options) { |
| 23 | 242 |
_props.project = this; |
| 56 | 243 |
var _edge = Edge.findOrCreate(_props); |
244 |
this.get("edges").push(_edge, _options); |
|
| 23 | 245 |
return _edge; |
246 |
}, |
|
|
414
276042cb477c
correct fix size, improve control on view save button and related init state
ymh <ymh.work@gmail.com>
parents:
362
diff
changeset
|
247 |
addView : function(_props, _options) { |
| 281 | 248 |
_props.project = this; |
249 |
// TODO: check if need to replace with create only |
|
250 |
var _view = View.findOrCreate(_props); |
|
251 |
// TODO: Should we remember only one view? |
|
252 |
this.get("views").push(_view, _options); |
|
253 |
return _view; |
|
254 |
}, |
|
|
414
276042cb477c
correct fix size, improve control on view save button and related init state
ymh <ymh.work@gmail.com>
parents:
362
diff
changeset
|
255 |
removeNode : function(_model) { |
| 23 | 256 |
this.get("nodes").remove(_model); |
257 |
}, |
|
|
414
276042cb477c
correct fix size, improve control on view save button and related init state
ymh <ymh.work@gmail.com>
parents:
362
diff
changeset
|
258 |
removeEdge : function(_model) { |
| 23 | 259 |
this.get("edges").remove(_model); |
260 |
}, |
|
|
414
276042cb477c
correct fix size, improve control on view save button and related init state
ymh <ymh.work@gmail.com>
parents:
362
diff
changeset
|
261 |
validate : function(options) { |
| 24 | 262 |
var _project = this; |
| 433 | 263 |
_.each( |
264 |
[].concat(options.users, options.nodes, options.edges,options.views), |
|
265 |
function(_item) { |
|
|
414
276042cb477c
correct fix size, improve control on view save button and related init state
ymh <ymh.work@gmail.com>
parents:
362
diff
changeset
|
266 |
if (_item) { |
|
212
ee7b5831d382
correct model to accept null objects ?
ymh <ymh.work@gmail.com>
parents:
211
diff
changeset
|
267 |
_item.project = _project; |
|
ee7b5831d382
correct model to accept null objects ?
ymh <ymh.work@gmail.com>
parents:
211
diff
changeset
|
268 |
} |
| 433 | 269 |
} |
270 |
); |
|
| 24 | 271 |
}, |
|
443
4c7ab16e5845
best coding convention for loadingstatus and savingstatus, rempve loadingatatus form export
ymh <ymh.work@gmail.com>
parents:
435
diff
changeset
|
272 |
getSchemaVersion : function(data) { |
|
4c7ab16e5845
best coding convention for loadingstatus and savingstatus, rempve loadingatatus form export
ymh <ymh.work@gmail.com>
parents:
435
diff
changeset
|
273 |
var t = data; |
|
4c7ab16e5845
best coding convention for loadingstatus and savingstatus, rempve loadingatatus form export
ymh <ymh.work@gmail.com>
parents:
435
diff
changeset
|
274 |
if(typeof(t) === "undefined") { |
|
4c7ab16e5845
best coding convention for loadingstatus and savingstatus, rempve loadingatatus form export
ymh <ymh.work@gmail.com>
parents:
435
diff
changeset
|
275 |
t = this; |
|
4c7ab16e5845
best coding convention for loadingstatus and savingstatus, rempve loadingatatus form export
ymh <ymh.work@gmail.com>
parents:
435
diff
changeset
|
276 |
} |
|
4c7ab16e5845
best coding convention for loadingstatus and savingstatus, rempve loadingatatus form export
ymh <ymh.work@gmail.com>
parents:
435
diff
changeset
|
277 |
var version = t.schemaVersion; |
|
4c7ab16e5845
best coding convention for loadingstatus and savingstatus, rempve loadingatatus form export
ymh <ymh.work@gmail.com>
parents:
435
diff
changeset
|
278 |
if(!version) { |
|
4c7ab16e5845
best coding convention for loadingstatus and savingstatus, rempve loadingatatus form export
ymh <ymh.work@gmail.com>
parents:
435
diff
changeset
|
279 |
return 1; |
|
4c7ab16e5845
best coding convention for loadingstatus and savingstatus, rempve loadingatatus form export
ymh <ymh.work@gmail.com>
parents:
435
diff
changeset
|
280 |
} |
|
4c7ab16e5845
best coding convention for loadingstatus and savingstatus, rempve loadingatatus form export
ymh <ymh.work@gmail.com>
parents:
435
diff
changeset
|
281 |
else { |
|
4c7ab16e5845
best coding convention for loadingstatus and savingstatus, rempve loadingatatus form export
ymh <ymh.work@gmail.com>
parents:
435
diff
changeset
|
282 |
return version; |
|
4c7ab16e5845
best coding convention for loadingstatus and savingstatus, rempve loadingatatus form export
ymh <ymh.work@gmail.com>
parents:
435
diff
changeset
|
283 |
} |
|
4c7ab16e5845
best coding convention for loadingstatus and savingstatus, rempve loadingatatus form export
ymh <ymh.work@gmail.com>
parents:
435
diff
changeset
|
284 |
}, |
| 23 | 285 |
// Add event handler to remove edges when a node is removed |
|
414
276042cb477c
correct fix size, improve control on view save button and related init state
ymh <ymh.work@gmail.com>
parents:
362
diff
changeset
|
286 |
initialize : function() { |
| 23 | 287 |
var _this = this; |
288 |
this.on("remove:nodes", function(_node) { |
|
289 |
_this.get("edges").remove( |
|
|
414
276042cb477c
correct fix size, improve control on view save button and related init state
ymh <ymh.work@gmail.com>
parents:
362
diff
changeset
|
290 |
_this.get("edges").filter( |
|
276042cb477c
correct fix size, improve control on view save button and related init state
ymh <ymh.work@gmail.com>
parents:
362
diff
changeset
|
291 |
function(_edge) { |
|
276042cb477c
correct fix size, improve control on view save button and related init state
ymh <ymh.work@gmail.com>
parents:
362
diff
changeset
|
292 |
return _edge.get("from") === _node || |
|
276042cb477c
correct fix size, improve control on view save button and related init state
ymh <ymh.work@gmail.com>
parents:
362
diff
changeset
|
293 |
_edge.get("to") === _node; |
|
276042cb477c
correct fix size, improve control on view save button and related init state
ymh <ymh.work@gmail.com>
parents:
362
diff
changeset
|
294 |
})); |
| 23 | 295 |
}); |
|
362
8f33cbeb4f32
Add blacklist and override project.toJSON to exclude attributes in blackList
rougeronj
parents:
332
diff
changeset
|
296 |
}, |
|
414
276042cb477c
correct fix size, improve control on view save button and related init state
ymh <ymh.work@gmail.com>
parents:
362
diff
changeset
|
297 |
toJSON : function() { |
|
276042cb477c
correct fix size, improve control on view save button and related init state
ymh <ymh.work@gmail.com>
parents:
362
diff
changeset
|
298 |
var json = _.clone(this.attributes); |
|
443
4c7ab16e5845
best coding convention for loadingstatus and savingstatus, rempve loadingatatus form export
ymh <ymh.work@gmail.com>
parents:
435
diff
changeset
|
299 |
json.schema_version = this.schemaVersion; |
|
414
276042cb477c
correct fix size, improve control on view save button and related init state
ymh <ymh.work@gmail.com>
parents:
362
diff
changeset
|
300 |
for ( var attr in json) { |
|
276042cb477c
correct fix size, improve control on view save button and related init state
ymh <ymh.work@gmail.com>
parents:
362
diff
changeset
|
301 |
if ((json[attr] instanceof Backbone.Model) || |
|
276042cb477c
correct fix size, improve control on view save button and related init state
ymh <ymh.work@gmail.com>
parents:
362
diff
changeset
|
302 |
(json[attr] instanceof Backbone.Collection) || |
|
276042cb477c
correct fix size, improve control on view save button and related init state
ymh <ymh.work@gmail.com>
parents:
362
diff
changeset
|
303 |
(json[attr] instanceof RenkanModel)) { |
|
276042cb477c
correct fix size, improve control on view save button and related init state
ymh <ymh.work@gmail.com>
parents:
362
diff
changeset
|
304 |
json[attr] = json[attr].toJSON(); |
|
276042cb477c
correct fix size, improve control on view save button and related init state
ymh <ymh.work@gmail.com>
parents:
362
diff
changeset
|
305 |
} |
|
276042cb477c
correct fix size, improve control on view save button and related init state
ymh <ymh.work@gmail.com>
parents:
362
diff
changeset
|
306 |
} |
|
276042cb477c
correct fix size, improve control on view save button and related init state
ymh <ymh.work@gmail.com>
parents:
362
diff
changeset
|
307 |
return _.omit(json, this.blacklist); |
| 23 | 308 |
} |
309 |
}); |
|
|
293
fba23fde14ba
Correct jshint errors and force it on build
ymh <ymh.work@gmail.com>
parents:
282
diff
changeset
|
310 |
|
|
414
276042cb477c
correct fix size, improve control on view save button and related init state
ymh <ymh.work@gmail.com>
parents:
362
diff
changeset
|
311 |
var RosterUser = Models.RosterUser = Backbone.Model |
|
276042cb477c
correct fix size, improve control on view save button and related init state
ymh <ymh.work@gmail.com>
parents:
362
diff
changeset
|
312 |
.extend({ |
|
276042cb477c
correct fix size, improve control on view save button and related init state
ymh <ymh.work@gmail.com>
parents:
362
diff
changeset
|
313 |
type : "roster_user", |
|
276042cb477c
correct fix size, improve control on view save button and related init state
ymh <ymh.work@gmail.com>
parents:
362
diff
changeset
|
314 |
idAttribute : "_id", |
|
293
fba23fde14ba
Correct jshint errors and force it on build
ymh <ymh.work@gmail.com>
parents:
282
diff
changeset
|
315 |
|
|
414
276042cb477c
correct fix size, improve control on view save button and related init state
ymh <ymh.work@gmail.com>
parents:
362
diff
changeset
|
316 |
constructor : function(options) { |
|
293
fba23fde14ba
Correct jshint errors and force it on build
ymh <ymh.work@gmail.com>
parents:
282
diff
changeset
|
317 |
|
|
414
276042cb477c
correct fix size, improve control on view save button and related init state
ymh <ymh.work@gmail.com>
parents:
362
diff
changeset
|
318 |
if (typeof options !== "undefined") { |
|
276042cb477c
correct fix size, improve control on view save button and related init state
ymh <ymh.work@gmail.com>
parents:
362
diff
changeset
|
319 |
options._id = options._id || |
|
276042cb477c
correct fix size, improve control on view save button and related init state
ymh <ymh.work@gmail.com>
parents:
362
diff
changeset
|
320 |
options.id || |
|
276042cb477c
correct fix size, improve control on view save button and related init state
ymh <ymh.work@gmail.com>
parents:
362
diff
changeset
|
321 |
Models.getUID(this); |
|
276042cb477c
correct fix size, improve control on view save button and related init state
ymh <ymh.work@gmail.com>
parents:
362
diff
changeset
|
322 |
options.title = options.title || "(untitled " + this.type + ")"; |
|
276042cb477c
correct fix size, improve control on view save button and related init state
ymh <ymh.work@gmail.com>
parents:
362
diff
changeset
|
323 |
options.description = options.description || ""; |
|
276042cb477c
correct fix size, improve control on view save button and related init state
ymh <ymh.work@gmail.com>
parents:
362
diff
changeset
|
324 |
options.uri = options.uri || ""; |
|
276042cb477c
correct fix size, improve control on view save button and related init state
ymh <ymh.work@gmail.com>
parents:
362
diff
changeset
|
325 |
options.project = options.project || null; |
|
276042cb477c
correct fix size, improve control on view save button and related init state
ymh <ymh.work@gmail.com>
parents:
362
diff
changeset
|
326 |
options.site_id = options.site_id || 0; |
|
293
fba23fde14ba
Correct jshint errors and force it on build
ymh <ymh.work@gmail.com>
parents:
282
diff
changeset
|
327 |
|
|
414
276042cb477c
correct fix size, improve control on view save button and related init state
ymh <ymh.work@gmail.com>
parents:
362
diff
changeset
|
328 |
if (typeof this.prepare === "function") { |
|
276042cb477c
correct fix size, improve control on view save button and related init state
ymh <ymh.work@gmail.com>
parents:
362
diff
changeset
|
329 |
options = this.prepare(options); |
|
276042cb477c
correct fix size, improve control on view save button and related init state
ymh <ymh.work@gmail.com>
parents:
362
diff
changeset
|
330 |
} |
|
276042cb477c
correct fix size, improve control on view save button and related init state
ymh <ymh.work@gmail.com>
parents:
362
diff
changeset
|
331 |
} |
|
276042cb477c
correct fix size, improve control on view save button and related init state
ymh <ymh.work@gmail.com>
parents:
362
diff
changeset
|
332 |
Backbone.Model.prototype.constructor.call(this, options); |
|
276042cb477c
correct fix size, improve control on view save button and related init state
ymh <ymh.work@gmail.com>
parents:
362
diff
changeset
|
333 |
}, |
|
293
fba23fde14ba
Correct jshint errors and force it on build
ymh <ymh.work@gmail.com>
parents:
282
diff
changeset
|
334 |
|
|
414
276042cb477c
correct fix size, improve control on view save button and related init state
ymh <ymh.work@gmail.com>
parents:
362
diff
changeset
|
335 |
validate : function() { |
|
276042cb477c
correct fix size, improve control on view save button and related init state
ymh <ymh.work@gmail.com>
parents:
362
diff
changeset
|
336 |
if (!this.type) { |
|
276042cb477c
correct fix size, improve control on view save button and related init state
ymh <ymh.work@gmail.com>
parents:
362
diff
changeset
|
337 |
return "object has no type"; |
|
276042cb477c
correct fix size, improve control on view save button and related init state
ymh <ymh.work@gmail.com>
parents:
362
diff
changeset
|
338 |
} |
|
276042cb477c
correct fix size, improve control on view save button and related init state
ymh <ymh.work@gmail.com>
parents:
362
diff
changeset
|
339 |
}, |
|
293
fba23fde14ba
Correct jshint errors and force it on build
ymh <ymh.work@gmail.com>
parents:
282
diff
changeset
|
340 |
|
|
414
276042cb477c
correct fix size, improve control on view save button and related init state
ymh <ymh.work@gmail.com>
parents:
362
diff
changeset
|
341 |
prepare : function(options) { |
|
276042cb477c
correct fix size, improve control on view save button and related init state
ymh <ymh.work@gmail.com>
parents:
362
diff
changeset
|
342 |
options.color = options.color || "#666666"; |
|
276042cb477c
correct fix size, improve control on view save button and related init state
ymh <ymh.work@gmail.com>
parents:
362
diff
changeset
|
343 |
return options; |
|
276042cb477c
correct fix size, improve control on view save button and related init state
ymh <ymh.work@gmail.com>
parents:
362
diff
changeset
|
344 |
}, |
|
293
fba23fde14ba
Correct jshint errors and force it on build
ymh <ymh.work@gmail.com>
parents:
282
diff
changeset
|
345 |
|
|
414
276042cb477c
correct fix size, improve control on view save button and related init state
ymh <ymh.work@gmail.com>
parents:
362
diff
changeset
|
346 |
toJSON : function() { |
|
276042cb477c
correct fix size, improve control on view save button and related init state
ymh <ymh.work@gmail.com>
parents:
362
diff
changeset
|
347 |
return { |
|
276042cb477c
correct fix size, improve control on view save button and related init state
ymh <ymh.work@gmail.com>
parents:
362
diff
changeset
|
348 |
_id : this.get("_id"), |
|
276042cb477c
correct fix size, improve control on view save button and related init state
ymh <ymh.work@gmail.com>
parents:
362
diff
changeset
|
349 |
title : this.get("title"), |
|
276042cb477c
correct fix size, improve control on view save button and related init state
ymh <ymh.work@gmail.com>
parents:
362
diff
changeset
|
350 |
uri : this.get("uri"), |
|
276042cb477c
correct fix size, improve control on view save button and related init state
ymh <ymh.work@gmail.com>
parents:
362
diff
changeset
|
351 |
description : this.get("description"), |
|
276042cb477c
correct fix size, improve control on view save button and related init state
ymh <ymh.work@gmail.com>
parents:
362
diff
changeset
|
352 |
color : this.get("color"), |
|
276042cb477c
correct fix size, improve control on view save button and related init state
ymh <ymh.work@gmail.com>
parents:
362
diff
changeset
|
353 |
project : (this.get("project") != null) ? this.get( |
|
276042cb477c
correct fix size, improve control on view save button and related init state
ymh <ymh.work@gmail.com>
parents:
362
diff
changeset
|
354 |
"project").get("id") : null, |
|
276042cb477c
correct fix size, improve control on view save button and related init state
ymh <ymh.work@gmail.com>
parents:
362
diff
changeset
|
355 |
site_id : this.get("site_id") |
|
276042cb477c
correct fix size, improve control on view save button and related init state
ymh <ymh.work@gmail.com>
parents:
362
diff
changeset
|
356 |
}; |
|
276042cb477c
correct fix size, improve control on view save button and related init state
ymh <ymh.work@gmail.com>
parents:
362
diff
changeset
|
357 |
} |
|
276042cb477c
correct fix size, improve control on view save button and related init state
ymh <ymh.work@gmail.com>
parents:
362
diff
changeset
|
358 |
}); |
|
276042cb477c
correct fix size, improve control on view save button and related init state
ymh <ymh.work@gmail.com>
parents:
362
diff
changeset
|
359 |
|
|
276042cb477c
correct fix size, improve control on view save button and related init state
ymh <ymh.work@gmail.com>
parents:
362
diff
changeset
|
360 |
var UsersList = Models.UsersList = Backbone.Collection.extend({ |
|
276042cb477c
correct fix size, improve control on view save button and related init state
ymh <ymh.work@gmail.com>
parents:
362
diff
changeset
|
361 |
model : RosterUser |
| 56 | 362 |
}); |
|
293
fba23fde14ba
Correct jshint errors and force it on build
ymh <ymh.work@gmail.com>
parents:
282
diff
changeset
|
363 |
|
|
444
19f0b7803aed
add schema version + dataloaders to ensure data migrations + small correction for php server exmple + a readme for the php server example
ymh <ymh.work@gmail.com>
parents:
443
diff
changeset
|
364 |
})(window); |