diff --git a/core/client/tpl/modals/uploadImage.hbs b/core/client/tpl/modals/uploadImage.hbs index 2daf864d87..eb5666a07e 100644 --- a/core/client/tpl/modals/uploadImage.hbs +++ b/core/client/tpl/modals/uploadImage.hbs @@ -1,4 +1,4 @@
- +
diff --git a/core/client/views/settings.js b/core/client/views/settings.js index b8263df92d..94cf8347f2 100644 --- a/core/client/views/settings.js +++ b/core/client/views/settings.js @@ -200,15 +200,15 @@ showLogo: function (e) { e.preventDefault(); var settings = this.model.toJSON(); - this.showUpload('#logo', 'logo', settings.logo); + this.showUpload('logo', settings.logo); }, showCover: function (e) { e.preventDefault(); var settings = this.model.toJSON(); - this.showUpload('#cover', 'cover', settings.icon); + this.showUpload('cover', settings.cover); }, - showUpload: function (id, key, src) { - var self = this, upload = new Ghost.Models.uploadModal({'id': id, 'key': key, 'src': src, 'accept': { + showUpload: function (key, src) { + var self = this, upload = new Ghost.Models.uploadModal({'key': key, 'src': src, 'accept': { func: function () { // The function called on acceptance var data = {}, themes; @@ -256,15 +256,15 @@ showCover: function (e) { e.preventDefault(); var user = this.model.toJSON(); - this.showUpload('#user-cover', 'cover', user.cover); + this.showUpload('cover', user.cover); }, showImage: function (e) { e.preventDefault(); var user = this.model.toJSON(); - this.showUpload('#user-image', 'image', user.image); + this.showUpload('image', user.image); }, - showUpload: function (id, key, src) { - var self = this, upload = new Ghost.Models.uploadModal({'id': id, 'key': key, 'src': src, 'accept': { + showUpload: function (key, src) { + var self = this, upload = new Ghost.Models.uploadModal({'key': key, 'src': src, 'accept': { func: function () { // The function called on acceptance var data = {}; data[key] = this.$('.js-upload-target').attr('src');