mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-12-02 16:41:24 +03:00
69d3a1460d
issue #1365 - added /*jslint unparam:true*/ to functions where absolutely necessary - added /*jslint unparam:true*/ to functions in which keeping parameter list added clarity to the underlying api, even when those parameters are not currently used - removed unused parameters in a few places
39 lines
1.2 KiB
JavaScript
39 lines
1.2 KiB
JavaScript
/*global Ghost, Backbone, $ */
|
|
(function () {
|
|
'use strict';
|
|
Ghost.Models.uploadModal = Ghost.TemplateModel.extend({
|
|
|
|
options: {
|
|
close: true,
|
|
type: 'action',
|
|
style: ["wide"],
|
|
animation: 'fade',
|
|
afterRender: function () {
|
|
var filestorage = $('#' + this.options.model.id).data('filestorage');
|
|
this.$('.js-drop-zone').upload({fileStorage: filestorage});
|
|
},
|
|
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;
|
|
this.options.acceptEncoding = options.acceptEncoding || 'image/*';
|
|
}
|
|
});
|
|
|
|
}());
|