mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-12-28 21:33:24 +03:00
2305329041
* Smoother animations * Removed blurring in Chrome temporarily * Centering is now done in CSS (the height is calculated in JS to work in FF and Opera) * Modals now need close: true to be set to enable the close icon and shortcuts for closing (ESC key, background clicking)
36 lines
1001 B
JavaScript
36 lines
1001 B
JavaScript
/*global Ghost, Backbone */
|
|
(function () {
|
|
"use strict";
|
|
Ghost.Models.uploadModal = Backbone.Model.extend({
|
|
|
|
options: {
|
|
close: true,
|
|
type: "action",
|
|
style: ["wide"],
|
|
animation: 'fade',
|
|
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;
|
|
}
|
|
});
|
|
|
|
}()); |