From d86d26b9571307abc2074c8a57d8a9e2336f0d56 Mon Sep 17 00:00:00 2001 From: cobbspur Date: Sun, 15 Sep 2013 15:54:12 +0100 Subject: [PATCH] Fixed settings general pane to display current blog cover in uploader - removed unused ids and options.id from uploadImage modal template --- core/client/tpl/modals/uploadImage.hbs | 2 +- core/client/views/settings.js | 16 ++++++++-------- 2 files changed, 9 insertions(+), 9 deletions(-) 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 cbe0269cf4..6844879ade 100644 --- a/core/client/views/settings.js +++ b/core/client/views/settings.js @@ -199,14 +199,14 @@ }, showLogo: function () { var settings = this.model.toJSON(); - this.showUpload('#logo', 'logo', settings.logo); + this.showUpload('logo', settings.logo); }, showCover: function () { 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; @@ -253,15 +253,15 @@ }, showCover: function () { 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');