Ember Upgrade: 1.0

This commit is contained in:
Robin Ward
2013-09-16 14:08:55 -04:00
parent 01075c5e7a
commit be0ce08cc2
110 changed files with 19597 additions and 8477 deletions

View File

@ -9,22 +9,25 @@
Discourse.AdminUserController = Discourse.ObjectController.extend({
editingTitle: false,
toggleTitleEdit: function() {
this.set('editingTitle', !this.editingTitle);
},
saveTitle: function() {
Discourse.ajax("/users/" + this.get('username').toLowerCase(), {
data: {title: this.get('title')},
type: 'PUT'
}).then(null, function(e){
bootbox.alert(I18n.t("generic_error_with_reason", {error: "http: " + e.status + " - " + e.body}));
});
this.toggleTitleEdit();
},
showApproval: function() {
return Discourse.SiteSettings.must_approve_users;
}.property()
}.property(),
actions: {
toggleTitleEdit: function() {
this.toggleProperty('editingTitle');
},
saveTitle: function() {
Discourse.ajax("/users/" + this.get('username').toLowerCase(), {
data: {title: this.get('title')},
type: 'PUT'
}).then(null, function(e){
bootbox.alert(I18n.t("generic_error_with_reason", {error: "http: " + e.status + " - " + e.body}));
});
this.send('toggleTitleEdit');
}
}
});