Update batch actions functionality, move javascript into widget