mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-11-24 06:35:49 +03:00
Fixed settings general pane to display current blog cover in uploader
- removed unused ids and options.id from uploadImage modal template
This commit is contained in:
parent
71a92194ca
commit
d86d26b957
@ -1,4 +1,4 @@
|
||||
<section class="js-drop-zone">
|
||||
<img id="{{options.id}}" class="js-upload-target" src="{{options.src}}"{{#unless options.src}} style="display: none"{{/unless}} alt="logo">
|
||||
<img class="js-upload-target" src="{{options.src}}"{{#unless options.src}} style="display: none"{{/unless}} alt="logo">
|
||||
<input data-url="upload" class="js-fileupload" type="file" name="uploadimage">
|
||||
</section>
|
||||
|
@ -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');
|
||||
|
Loading…
Reference in New Issue
Block a user