Fixed upload and edit buttons for profile and banner images

This commit is contained in:
Andy Strobel 2014-07-08 18:08:27 +02:00
parent 833ab7ca4c
commit 26e5d94c6a

View File

@ -93,38 +93,6 @@ $(function() {
})
// show buttons at image rollover
$('#profilefileupload').mouseover(function() {
$('#profile-image-upload-buttons').show();
})
// show buttons also at buttons rollover (better: prevent the mouseleave event)
$('#profile-image-upload-buttons').mouseover(function() {
$('#profile-image-upload-buttons').show();
})
// hide buttons at image mouse leave
$('#profilefileupload').mouseleave(function() {
$('#profile-image-upload-buttons').hide();
})
// show buttons at image rollover
$('#bannerfileupload, .img-profile-data').mouseover(function() {
$('#banner-image-upload-buttons').show();
})
// show buttons also at buttons rollover (better: prevent the mouseleave event)
$('#banner-image-upload-buttons').mouseover(function() {
$('#banner-image-upload-buttons').show();
})
// hide buttons at image mouse leave
$('#bannerfileupload, .img-profile-data').mouseleave(function() {
$('#banner-image-upload-buttons').hide();
})
/**
* Handle upload errors for profile and banner images
*/
@ -144,4 +112,35 @@ $(document).ready(function() {
e.preventDefault();
});
// show buttons at image rollover
$('#profilefileupload').mouseover(function() {
$('#profile-image-upload-buttons').show();
})
// show buttons also at buttons rollover (better: prevent the mouseleave event)
$('#profile-image-upload-buttons').mouseover(function() {
$('#profile-image-upload-buttons').show();
})
// hide buttons at image mouse leave
$('#profilefileupload').mouseleave(function() {
$('#profile-image-upload-buttons').hide();
})
// show buttons at image rollover
$('#bannerfileupload, .img-profile-data').mouseover(function() {
$('#banner-image-upload-buttons').show();
})
// show buttons also at buttons rollover (better: prevent the mouseleave event)
$('#banner-image-upload-buttons').mouseover(function() {
$('#banner-image-upload-buttons').show();
})
// hide buttons at image mouse leave
$('#bannerfileupload, .img-profile-data').mouseleave(function() {
$('#banner-image-upload-buttons').hide();
})
});