Beautiful and powerful HTML file uploading tool. A jQuery, PHP and Node.js plugin that transforms the standard input into a revolutionary and fancy field on your page.
141
stars
25
forks
source link
How to stop execution after delete or if any error occurred ,it keep going inside 'sorter' on_sort callback #25
We have appended files and doing sorting, But When we upload any invalid image or invalid no. of images, then user get error alert,after that, it goes inside onSort callback (Look like a bug) :- Sorting Section Is Given Below :-
'sorter'=> array(
'onSort'=> "js:function(list, listEl, parentEl, newInputEl, inputEl) {
updateListingIndex(list);
}"
),
And Remove/delete file section is given below :-
'onRemove' => "js:function(item){
$.ajax({
url : '/sell/ImageDelete',
data: {
'image_value' : item.data.image_value,
'listingId' : '$listingId'
},
method: 'POST',
success :function (result) {
data = JSON.parse(result);
if(data.result != '1') {
$('.ListingImage-error').html(data.error);
}
}
});
}",
I believe there is no point of calling sort function after error happens,It looks like a bug, return false is not working, Please Please Provide Your suggestion
We have appended files and doing sorting, But When we upload any invalid image or invalid no. of images, then user get error alert,after that, it goes inside onSort callback (Look like a bug) :- Sorting Section Is Given Below :-
'sorter'=> array( 'onSort'=> "js:function(list, listEl, parentEl, newInputEl, inputEl) { updateListingIndex(list); }" ), And Remove/delete file section is given below :-
'onRemove' => "js:function(item){
$.ajax({ url : '/sell/ImageDelete', data: { 'image_value' : item.data.image_value, 'listingId' : '$listingId' }, method: 'POST', success :function (result) { data = JSON.parse(result); if(data.result != '1') { $('.ListingImage-error').html(data.error); } } });
}", I believe there is no point of calling sort function after error happens,It looks like a bug, return false is not working, Please Please Provide Your suggestion