feature #593, dynamic bloc size instead of fixed at 100.

1000 by default or half of the element list. The action should alway require at
least 2 ajax calls, even for 2 photos to delete (exception for 1 photo, of
course)
This commit is contained in:
plegall
2017-01-09 14:10:39 +01:00
parent 3fb5651143
commit edff7540eb
@@ -256,7 +256,10 @@ jQuery('#applyAction').click(function(e) {
progressBar_max = elements.length;
var todo = 0;
var deleteBlockSize = 100;
var deleteBlockSize = Math.min(
Number((elements.length/2).toFixed()),
1000
);
var image_ids = Array();
jQuery('#applyActionBlock').hide();