Permalink
Browse files

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)
  • Loading branch information...
1 parent 3fb5651 commit edff7540eb58ee5d1bf7a70c1a9a7e26d8884938 @plegall plegall committed Jan 9, 2017
Showing with 4 additions and 1 deletion.
  1. +4 −1 admin/themes/default/js/batchManagerGlobal.js
@@ -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();

0 comments on commit edff754

Please sign in to comment.