FIX: confusing UI when clicking Delete All Posts button

This commit is contained in:
Neil Lalonde 2014-08-14 14:26:40 -04:00
parent 5aac2822ed
commit 26a404f4d0
1 changed files with 1 additions and 5 deletions

View File

@ -68,16 +68,12 @@ Discourse.AdminUser = Discourse.User.extend({
}.property('can_delete_all_posts'), }.property('can_delete_all_posts'),
deleteAllPosts: function() { deleteAllPosts: function() {
this.set('can_delete_all_posts', false);
var user = this; var user = this;
var message = I18n.t('admin.user.delete_all_posts_confirm', {posts: user.get('post_count'), topics: user.get('topic_count')}); var message = I18n.t('admin.user.delete_all_posts_confirm', {posts: user.get('post_count'), topics: user.get('topic_count')});
var buttons = [{ var buttons = [{
"label": I18n.t("composer.cancel"), "label": I18n.t("composer.cancel"),
"class": "cancel-inline", "class": "cancel-inline",
"link": true, "link": true
"callback": function() {
user.set('can_delete_all_posts', true);
}
}, { }, {
"label": '<i class="fa fa-exclamation-triangle"></i> ' + I18n.t("admin.user.delete_all_posts"), "label": '<i class="fa fa-exclamation-triangle"></i> ' + I18n.t("admin.user.delete_all_posts"),
"class": "btn btn-danger", "class": "btn btn-danger",