2018-06-15 23:03:24 +08:00
|
|
|
import computed from "ember-addons/ember-computed-decorators";
|
2015-11-13 05:08:19 +08:00
|
|
|
|
|
|
|
export default Ember.Component.extend({
|
2018-06-15 23:03:24 +08:00
|
|
|
classNames: ["controls"],
|
2015-11-13 05:08:19 +08:00
|
|
|
|
2018-06-15 23:03:24 +08:00
|
|
|
buttonDisabled: Ember.computed.or("model.isSaving", "saveDisabled"),
|
2015-11-13 05:08:19 +08:00
|
|
|
|
2018-06-15 23:03:24 +08:00
|
|
|
@computed("model.isSaving")
|
2015-11-13 05:08:19 +08:00
|
|
|
savingText(saving) {
|
2018-06-15 23:03:24 +08:00
|
|
|
return saving ? "saving" : "save";
|
2015-11-13 05:08:19 +08:00
|
|
|
},
|
|
|
|
|
|
|
|
actions: {
|
|
|
|
saveChanges() {
|
|
|
|
this.sendAction();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
});
|