Merge pull request #751 from cobbspur/hover

Added hover state for blog-logo and blog-cover using existing ids
This commit is contained in:
Hannah Wolfe 2013-09-15 09:14:54 -07:00
commit 1951149953
2 changed files with 8 additions and 5 deletions

View File

@ -22,7 +22,7 @@
<div class="form-group">
<label><strong>Blog Logo</strong></label>
{{#if logo}}
<a class="js-modal-logo"><img id="blog-logo" src="{{logo}}" alt="logo"></a>
<a class="js-modal-logo" href="#"><img id="blog-logo" src="{{logo}}" alt="logo"></a>
{{else}}
<a class="button-add js-modal-logo" href="#">Upload Image</a>
{{/if}}
@ -32,7 +32,7 @@
<div class="form-group">
<label><strong>Blog Cover</strong></label>
{{#if cover}}
<a class="js-modal-cover"><img id="blog-cover" src="{{cover}}" alt="cover photo"></a>
<a class="js-modal-cover" href="#"><img id="blog-cover" src="{{cover}}" alt="cover photo"></a>
{{else}}
<a class="button-add js-modal-cover" href="#">Upload Image</a>
{{/if}}

View File

@ -197,11 +197,13 @@
this.model.set({availableThemes: themes});
}
},
showLogo: function () {
showLogo: function (e) {
e.preventDefault();
var settings = this.model.toJSON();
this.showUpload('#logo', 'logo', settings.logo);
},
showCover: function () {
showCover: function (e) {
e.preventDefault();
var settings = this.model.toJSON();
this.showUpload('#cover', 'cover', settings.icon);
},
@ -251,7 +253,8 @@
'click .js-modal-cover': 'showCover',
'click .js-modal-image': 'showImage'
},
showCover: function () {
showCover: function (e) {
e.preventDefault();
var user = this.model.toJSON();
this.showUpload('#user-cover', 'cover', user.cover);
},