FEATURE: custom emojis

This commit is contained in:
Régis Hanol
2014-12-23 01:12:26 +01:00
parent 6e1601c10d
commit 45dbdb6896
3536 changed files with 477 additions and 245 deletions

View File

@ -0,0 +1,20 @@
export default Ember.ArrayController.extend({
sortProperties: ["name"],
actions: {
emojiUploaded: function (emoji) {
this.pushObject(emoji);
},
destroy: function(emoji) {
var self = this;
return bootbox.confirm(I18n.t("admin.emoji.delete_confirm", { name: emoji.name }), I18n.t("no_value"), I18n.t("yes_value"), function (destroy) {
if (destroy) {
return Discourse.ajax("/admin/customize/emojis/" + emoji.name, { type: "DELETE" }).then(function() {
self.removeObject(emoji);
});
}
});
}
}
});