diff --git a/resources/views/partials/bootstrap-table.blade.php b/resources/views/partials/bootstrap-table.blade.php index c9e682dc87..57ac6a4d7e 100644 --- a/resources/views/partials/bootstrap-table.blade.php +++ b/resources/views/partials/bootstrap-table.blade.php @@ -116,32 +116,30 @@ // These methods dynamically add/remove hidden input values in the bulk actions form $('.snipe-table').on('check.bs.table .btSelectItem', function (row, $element) { var buttonName = $(this).data('bulk-button-id'); - var formName = $(this).data('bulk-form-id'); var tableId = $(this).data('id-table'); $(buttonName).removeAttr('disabled'); - $(formName).append(''); + $(buttonName).after(''); }); - $('.snipe-table').on('uncheck.bs.table .btSelectItem', function (row, $element) { - var tableId = $(this).data('id-table'); - $( "#" + tableId + "_checkbox_" + $element.id).remove(); - }); - - $('.snipe-table').on('check-all.bs.table', function (event, rowsAfter) { var buttonName = $(this).data('bulk-button-id'); $(buttonName).removeAttr('disabled'); - var formName = $(this).data('bulk-form-id'); var tableId = $(this).data('id-table'); for (var i in rowsAfter) { - $(formName).append(''); + $(buttonName).after(''); } }); + $('.snipe-table').on('uncheck.bs.table .btSelectItem', function (row, $element) { + var tableId = $(this).data('id-table'); + $( "#" + tableId + "_checkbox_" + $element.id).remove(); + }); + + // Handle whether or not the edit button should be disabled $('.snipe-table').on('uncheck.bs.table', function () {