From a9465ee5437976526b18a439c18ed9c5d6db3d39 Mon Sep 17 00:00:00 2001 From: Ngobiri Falyne Date: Tue, 12 Apr 2022 08:25:20 +0100 Subject: [PATCH 1/2] Update_comments.html.erb Remove Duplicate Code in Spam2 --- app/views/spam2/_comments.html.erb | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/app/views/spam2/_comments.html.erb b/app/views/spam2/_comments.html.erb index 2249d5434f..964d8e9be8 100644 --- a/app/views/spam2/_comments.html.erb +++ b/app/views/spam2/_comments.html.erb @@ -2,11 +2,7 @@ $(document).ready(function () { var table = table_main("#comment_table"); $("#all").click(function () { //select all button - $('.selectedId').prop('checked', !$('.selectedId').prop('checked')); - var check = ($('.selectedId').filter(":checked").length == $('.selectedId').length); - $('#select-count').text($('.selectedId').filter(":checked").length); - $('#selectall').prop("checked", check); - disable_buttons('#selectall'); + select_all(); }); var pageselect_val = localStorage.getItem('page-select') || ''; $("#pageselect").val(pageselect_val); From 1668395feb1289ab3f1eeae3db505f81e761276e Mon Sep 17 00:00:00 2001 From: Ngobiri Falyne Date: Tue, 12 Apr 2022 09:14:14 +0100 Subject: [PATCH 2/2] Update_comments.html.erb Remove Duplicate Code in Spam2 --- app/views/spam2/_comments.html.erb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/views/spam2/_comments.html.erb b/app/views/spam2/_comments.html.erb index 964d8e9be8..790e024ce2 100644 --- a/app/views/spam2/_comments.html.erb +++ b/app/views/spam2/_comments.html.erb @@ -2,7 +2,7 @@ $(document).ready(function () { var table = table_main("#comment_table"); $("#all").click(function () { //select all button - select_all(); + select_all(); }); var pageselect_val = localStorage.getItem('page-select') || ''; $("#pageselect").val(pageselect_val);