diff --git a/application/views/bands/index.php b/application/views/bands/index.php index bc3e5f4f..0c9faefd 100644 --- a/application/views/bands/index.php +++ b/application/views/bands/index.php @@ -43,8 +43,6 @@ CW QRG - - @@ -70,9 +68,6 @@ - - -
diff --git a/assets/js/sections/bands.js b/assets/js/sections/bands.js index 98bdab4c..7e686941 100644 --- a/assets/js/sections/bands.js +++ b/assets/js/sections/bands.js @@ -1,3 +1,9 @@ +$('.bandtable').on('click', 'input[type="checkbox"]', function() { + var clickedbandid = $(this).closest('td').attr("class"); + clickedbandid = clickedbandid.match(/\d+/)[0]; + saveBand(clickedbandid); +}); + $('.bandtable').DataTable({ "pageLength": 25, responsive: false, @@ -171,8 +177,6 @@ function deactivateAllBands() { } function saveBand(id) { - $(".btnband_"+id).addClass('running'); - $(".btnband_"+id).prop('disabled', true); $.ajax({ url: base_url + 'index.php/band/saveBand', type: 'post', @@ -189,10 +193,6 @@ function saveBand(id) { 'vucc': $(".vucc_"+id+" input[type='checkbox']").is(":checked") }, success: function (html) { - $(".alert").remove(); - $('.card-body').prepend(''); - $(".btnband_"+id).removeClass('running'); - $(".btnband_"+id).prop('disabled', false); } }); } \ No newline at end of file