0
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2025-01-13 22:41:32 -05:00
ghost/core/client/components/upload-modal.js

33 lines
821 B
JavaScript
Raw Normal View History

2014-03-30 23:07:05 -05:00
/*global console */
import ModalDialog from 'ghost/components/modal-dialog';
var UploadModal = ModalDialog.extend({
layoutName: 'components/modal-dialog',
didInsertElement: function () {
this._super();
// @TODO: get this real
console.log('UploadController:afterRender');
// var filestorage = $('#' + this.options.model.id).data('filestorage');
// this.$('.js-drop-zone').upload({fileStorage: filestorage});
},
actions: {
closeModal: function () {
this.sendAction();
},
confirm: function (type) {
var func = this.get('confirm.' + type + '.func');
if (typeof func === 'function') {
func();
}
this.sendAction();
}
},
});
export default UploadModal;