text: $(document).ready(function(){
  $('#activateModule').click(function(){
    var tblname = $('#modReactTable').DataTable();
    var selected = tblname.rows('tr.active').data();
    var selectedArr = [];
  
    for(var i = 0; i < selected.length; i++)
      {
        selectedArr[i] = selected[i][0];
      }
  
    $.ajax({
      type: "POST",
      url: "/maintenance/module-activate",
      data: {
          mod_id: selectedArr
      },
      success: function(result) {
        tblname.rows('tr.active').remove().draw();
        $('#moduleReactivateModal').modal('toggle');
        noty({
          type: 'error',
          layout: 'bottomRight',
          timeout: 3000,
          text: '<h4><center>Module(s) successfully reactivated!</center></h4>',
        });
  
      },
      error: function(result) {
          alert('error');
      }
    });
  });
  
  });
  