Added remove artwork option, and a few changes.
This commit is contained in:
parent
9f2d941c87
commit
2bb0976300
6 changed files with 106 additions and 39 deletions
|
@ -1609,7 +1609,7 @@ function readArtworkURL(input, id) {
|
|||
$('.artwork-preview-'+id).css('background-image', 'url('+e.target.result +')');
|
||||
$('.artwork-preview-'+id).hide();
|
||||
$('.artwork-preview-'+id).fadeIn(500);
|
||||
$('.artwork_uploaded_'+id).val(function() {
|
||||
$('.set_artwork_'+id).val(function() {
|
||||
return e.target.result;
|
||||
});
|
||||
}
|
||||
|
@ -1678,6 +1678,25 @@ $(document).ready(function() {
|
|||
resizeAdvancedSearch();
|
||||
});
|
||||
|
||||
// delete artwork
|
||||
$(document).on('click', '.delete-artwork', function(event) {
|
||||
event.preventDefault();
|
||||
event.stopPropagation();
|
||||
var id = $(this).attr('data-id');
|
||||
$('.artwork-preview-'+id).css('background-image', 'url('+ baseUrl +'css/images/no-cover.jpg)');
|
||||
$('.artwork-preview-'+id).hide();
|
||||
$('.artwork-preview-'+id).fadeIn(500);
|
||||
$('.artwork_'+id).val(function() {
|
||||
return "";
|
||||
});
|
||||
$('.set_artwork_'+id).val(function() {
|
||||
return "";
|
||||
});
|
||||
$('.remove_artwork_'+id).val(function() {
|
||||
return 1;
|
||||
});
|
||||
});
|
||||
|
||||
// image upload by clicking on the artwork container
|
||||
$(document).on('change', '.artworkUpload', 'input', function(event) {
|
||||
event.preventDefault();
|
||||
|
@ -1760,7 +1779,7 @@ $(document).ready(function() {
|
|||
$('.artwork-preview-'+id).css('background-image', 'url('+ data +')');
|
||||
$('.artwork-preview-'+id).hide();
|
||||
$('.artwork-preview-'+id).fadeIn(500);
|
||||
$('.artwork_uploaded_'+id).val(function() {
|
||||
$('.set_artwork_'+id).val(function() {
|
||||
return data;
|
||||
});
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue