mirror of
https://github.com/codeninjasllc/discourse.git
synced 2024-12-03 12:27:35 -05:00
25 lines
606 B
JavaScript
25 lines
606 B
JavaScript
|
Discourse.Group = Discourse.Model.extend({
|
||
|
|
||
|
});
|
||
|
|
||
|
Discourse.Group.reopenClass({
|
||
|
findAll: function(){
|
||
|
var list = Discourse.SelectableArray.create();
|
||
|
|
||
|
list.addObject(Discourse.Group.create({id: 1, name: "all mods", members: ["A","b","c"]}));
|
||
|
list.addObject(Discourse.Group.create({id: 2, name: "other mods", members: ["A","b","c"]}));
|
||
|
|
||
|
return list;
|
||
|
},
|
||
|
|
||
|
find: function(id) {
|
||
|
var promise = new Em.Deferred();
|
||
|
|
||
|
setTimeout(function(){
|
||
|
promise.resolve(Discourse.Group.create({id: 1, name: "all mods", members: ["A","b","c"]}));
|
||
|
}, 1000);
|
||
|
|
||
|
return promise;
|
||
|
}
|
||
|
});
|