Ghost/ghost/admin/app/components/gh-image-uploader-with-preview.js

29 lines
726 B
JavaScript
Raw Normal View History

import Component from 'ember-component';
2016-09-24 18:48:06 +03:00
import {invokeAction} from 'ember-invoke-action';
export default Component.extend({
actions: {
update() {
if (typeof this.attrs.update === 'function') {
this.attrs.update(...arguments);
}
},
uploadStarted() {
if (typeof this.attrs.uploadStarted === 'function') {
this.attrs.uploadStarted(...arguments);
}
},
uploadFinished() {
if (typeof this.attrs.uploadFinished === 'function') {
this.attrs.uploadFinished(...arguments);
}
},
2016-09-24 18:48:06 +03:00
remove() {
invokeAction(this, 'remove');
}
}
});