Hello,
A quick question from someone who sometimes struggles with javascript. For various reasons I need to know the order of uploaded files even if the user has not changed the order yet. I can see that the ordering is triggered by the following js:
$(".photos-crud").sortable({
handle: '.move-box',
opacity: 0.6,
cursor: 'move',
revert: true,
update: function() {
var order = $(this).sortable("serialize");
$.post("<?php echo $ordering_url?>", order, function(theResponse){});
}
});
Is there an easy way to call this when the image has finished uploading, rather than when the images have been ordered? I've tried attaching the following code to the onComplete callback of the createUploader but to no avail. Any help would be greatly appreciated! Thanks
var order = $(".photos-crud").sortable("serialize");
$.post("<?php echo $ordering_url?>", order, function(theResponse){});