Use ember computed property shortcuts

This commit is contained in:
Neil Lalonde 2014-02-13 14:45:03 -05:00
parent 3a9d2292ea
commit 85eba22d65
1 changed files with 2 additions and 5 deletions

View File

@ -21,11 +21,8 @@ Discourse.PreferencesController = Discourse.ObjectController.extend({
return false;
}.property('saving', 'name', 'email'),
deleteDisabled: function() {
if (!this.get('can_delete_account')) return true;
if (this.get('saving')) return true;
if (this.get('deleting')) return true;
}.property('deleting', 'saving', 'can_delete_account'),
cannotDeleteAccount: Em.computed.not('can_delete_account'),
deleteDisabled: Em.computed.or('saving', 'deleting', 'cannotDeleteAccount'),
canEditName: function() {
return Discourse.SiteSettings.enable_names;