discourse/app/assets/javascripts/admin/controllers/admin-site-text-edit.js.es6

17 lines
470 B
Plaintext
Raw Normal View History

export default Ember.Controller.extend({
saved: false,
saveDisabled: function() {
if (this.get('model.isSaving')) { return true; }
if ((!this.get('allow_blank')) && Ember.isEmpty(this.get('model.value'))) { return true; }
return false;
}.property('model.iSaving', 'model.value'),
2013-09-17 02:08:55 +08:00
actions: {
saveChanges() {
const model = this.get('model');
model.save(model.getProperties('value')).then(() => this.set('saved', true));
2013-09-17 02:08:55 +08:00
}
}
2013-09-17 02:08:55 +08:00
});