2013-09-08 20:17:16 +04:00
|
|
|
/*global Ghost, Backbone */
|
|
|
|
(function () {
|
2013-09-24 14:46:30 +04:00
|
|
|
'use strict';
|
2013-09-08 20:17:16 +04:00
|
|
|
Ghost.Models.uploadModal = Backbone.Model.extend({
|
|
|
|
|
|
|
|
options: {
|
2013-09-17 20:24:53 +04:00
|
|
|
close: true,
|
2013-09-24 14:46:30 +04:00
|
|
|
type: 'action',
|
2013-09-17 20:24:53 +04:00
|
|
|
style: ["wide"],
|
|
|
|
animation: 'fade',
|
2013-09-08 20:17:16 +04:00
|
|
|
afterRender: function () {
|
|
|
|
this.$('.js-drop-zone').upload();
|
|
|
|
},
|
|
|
|
confirm: {
|
|
|
|
reject: {
|
|
|
|
func: function () { // The function called on rejection
|
|
|
|
return true;
|
|
|
|
},
|
|
|
|
buttonClass: true,
|
|
|
|
text: "Cancel" // The reject button text
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
|
|
|
content: {
|
|
|
|
template: 'uploadImage'
|
|
|
|
},
|
|
|
|
|
|
|
|
initialize: function (options) {
|
|
|
|
this.options.id = options.id;
|
|
|
|
this.options.key = options.key;
|
|
|
|
this.options.src = options.src;
|
|
|
|
this.options.confirm.accept = options.accept;
|
|
|
|
}
|
|
|
|
});
|
|
|
|
|
|
|
|
}());
|