Ghost/ghost/admin/app/components/gh-image-uploader-with-preview.js
2016-10-07 17:32:30 +01:00

41 lines
1.0 KiB
JavaScript

import Component from 'ember-component';
import {invokeAction} from 'ember-invoke-action';
export default Component.extend({
actions: {
update() {
if (typeof this.attrs.update === 'function') {
this.attrs.update(...arguments);
}
},
onInput() {
if (typeof this.attrs.onInput === 'function') {
this.attrs.onInput(...arguments);
}
},
uploadStarted() {
if (typeof this.attrs.uploadStarted === 'function') {
this.attrs.uploadStarted(...arguments);
}
},
uploadFinished() {
if (typeof this.attrs.uploadFinished === 'function') {
this.attrs.uploadFinished(...arguments);
}
},
formChanged() {
if (typeof this.attrs.formChanged === 'function') {
this.attrs.formChanged(...arguments);
}
},
remove() {
invokeAction(this, 'remove');
}
}
});