update batch actions JS to respond to dynamically added elements

for @amuntasim in #2731