mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-12-14 09:52:09 +03:00
a47980149f
GH-ISSUE 2373
33 lines
827 B
JavaScript
33 lines
827 B
JavaScript
/*global console */
|
|
|
|
import ModalDialog from 'ghost/components/gh-modal-dialog';
|
|
|
|
var UploadModal = ModalDialog.extend({
|
|
layoutName: 'components/gh-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;
|