18 lines
292 B
JavaScript
18 lines
292 B
JavaScript
var Side = function(id) {
|
|
this.type = 'Side';
|
|
var self = this;
|
|
|
|
if (typeof(id) == 'object') {
|
|
for (x in id) {
|
|
self[x] = id[x];
|
|
}
|
|
} else {
|
|
App.request(App.service + '/side/' + id, function(json) {
|
|
for (x in json) {
|
|
self[x] = json[x];
|
|
}
|
|
});
|
|
}
|
|
}
|
|
|
|
App.cached.Side = {}; |