diff --git a/core/client/models/uploadModal.js b/core/client/models/uploadModal.js new file mode 100644 index 0000000000..07fdeb5423 --- /dev/null +++ b/core/client/models/uploadModal.js @@ -0,0 +1,36 @@ +/*global Ghost, Backbone */ +(function () { + "use strict"; + Ghost.Models.uploadModal = Backbone.Model.extend({ + + options: { + close: false, + type: "action", + style: "wide", + animation: 'fadeIn', + 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; + } + }); + +}()); \ No newline at end of file diff --git a/core/client/tpl/modals/uploadImage.hbs b/core/client/tpl/modals/uploadImage.hbs index 07f3525688..2daf864d87 100644 --- a/core/client/tpl/modals/uploadImage.hbs +++ b/core/client/tpl/modals/uploadImage.hbs @@ -1,4 +1,4 @@
- +
diff --git a/core/client/tpl/settings/user-profile.hbs b/core/client/tpl/settings/user-profile.hbs index 20f6565edd..da58a9e3d5 100644 --- a/core/client/tpl/settings/user-profile.hbs +++ b/core/client/tpl/settings/user-profile.hbs @@ -8,14 +8,14 @@
- +
- +