mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
work in progress category UI
refactor hack from earlier
This commit is contained in:
@@ -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;
|
||||
}
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user