work in progress category UI

refactor hack from earlier
This commit is contained in:
Sam
2013-07-17 14:54:21 +10:00
parent 5a7e78f0fc
commit 625204c8bd
5 changed files with 18 additions and 19 deletions

View File

@@ -10,14 +10,12 @@ Discourse.SiteContentType = Discourse.Model.extend({});
Discourse.SiteContentType.reopenClass({
findAll: function() {
var promise = new Em.Deferred();
Discourse.ajax("/admin/site_content_types").then(function(data) {
return Discourse.ajax("/admin/site_content_types").then(function(data) {
var contentTypes = Em.A();
data.forEach(function (ct) {
contentTypes.pushObject(Discourse.SiteContentType.create(ct));
});
promise.resolve(contentTypes);
return contentTypes;
});
return promise;
}
});