[Bps-public-commit] rt-extension-spamfilter branch master updated. 7b234cb40aec3877279beb2daf35301237306084
BPS Git Server
git at git.bestpractical.com
Thu Jul 13 20:40:22 UTC 2023
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "rt-extension-spamfilter".
The branch, master has been updated
via 7b234cb40aec3877279beb2daf35301237306084 (commit)
via 46d676e1859f66c789a413601b1bf9d4cd17bef3 (commit)
via a4d1c1fa54bd262fcb5c9dafc865808eb2a7f787 (commit)
via 801c0c6ea979802d6036e14f0c57265ce9775aa9 (commit)
via eb51bb2ed637e0ac40025c57f3d70b305393ea66 (commit)
via 677d40409c07d9bacfdd8e3f08c62e0a4f2dc537 (commit)
from aa57a36f23fffbd8b9c3aba7b0d6e60dbfe49474 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit 7b234cb40aec3877279beb2daf35301237306084
Author: sunnavy <sunnavy at bestpractical.com>
Date: Thu Jul 13 16:37:52 2023 -0400
Prep 0.06
diff --git a/Changes b/Changes
index 205485e..e59053e 100644
--- a/Changes
+++ b/Changes
@@ -1,5 +1,10 @@
Revision history for RT-Extension-SpamFilter
+0.06 2023-07-13
+ - Implement multiple selection of checkboxes holding shift key
+ - Add option to configure rows per page in spam list
+ - Implement checkbox selection for spam filter actions
+
0.05 2023-07-10
- Pass search arguments to make OrderBy/Pagination really work
diff --git a/META.yml b/META.yml
index 20e6512..e3f8999 100644
--- a/META.yml
+++ b/META.yml
@@ -24,7 +24,7 @@ requires:
resources:
license: http://opensource.org/licenses/gpl-license.php
repository: https://github.com/bestpractical/rt-extension-spamfilter
-version: '0.05'
+version: '0.06'
x_module_install_rtx_version: '0.43'
x_requires_rt: 4.0.0
x_rt_too_new: 5.2.0
diff --git a/README b/README
index cd8d8da..8a0530d 100644
--- a/README
+++ b/README
@@ -27,7 +27,7 @@ INSTALLATION
If you are upgrading this module, check for upgrading instructions
in case changes need to be made to your database.
- Patch RT earlier than 5.0.2
+ Patch RT earlier than 5.0.5
patch -d /opt/rt5 -p1 < patches/0001-Pass-action-info-to-GetCurrentUser-for-email-interfa.patch
Set up spam filter rules (see "CONFIGURATION" for details.)
@@ -62,6 +62,8 @@ CONFIGURATION
}
);
+ Set($SpamListRowsPerPage, 50);
+
@SpamFilters
The @SpamFilters array is an array of hashes. Each hash must contain the
following keys:
@@ -86,6 +88,10 @@ CONFIGURATION
The $SpamFilterThreshold is the score above which an incoming message is
considered to be spam and placed in the spam list.
+ $SpamListRowsPerPage
+ The $SpamListRowsPerPage is an optional configuration to change the
+ number of rows to display per page in the spam list. Default is 50.
+
AUTHOR
Best Practical Solutions, LLC <modules at bestpractical.com>
diff --git a/lib/RT/Extension/SpamFilter.pm b/lib/RT/Extension/SpamFilter.pm
index 8d8affb..bfb5b77 100644
--- a/lib/RT/Extension/SpamFilter.pm
+++ b/lib/RT/Extension/SpamFilter.pm
@@ -3,7 +3,7 @@ use warnings;
package RT::Extension::SpamFilter;
-our $VERSION = '0.05';
+our $VERSION = '0.06';
sub MessageScore {
my $class = shift;
commit 46d676e1859f66c789a413601b1bf9d4cd17bef3
Merge: aa57a36 a4d1c1f
Author: sunnavy <sunnavy at bestpractical.com>
Date: Thu Jul 13 16:30:03 2023 -0400
Merge branch 'add-checkbox-selection'
commit a4d1c1fa54bd262fcb5c9dafc865808eb2a7f787
Author: Ronaldo Richieri <ronaldo at bestpractical.com>
Date: Thu Jul 13 09:00:05 2023 -0300
Implement multiple selection of checkboxes holding shift key
Improve the selection of large number of Tickets/Messages by holding
shift key and clicking on the checkbox.
diff --git a/html/Tools/SpamFilter/List.html b/html/Tools/SpamFilter/List.html
index a312038..1bf7846 100644
--- a/html/Tools/SpamFilter/List.html
+++ b/html/Tools/SpamFilter/List.html
@@ -52,6 +52,10 @@
.custom-checkbox label {
white-space: nowrap;
}
+ /* allow multiple checkboxes to be checked holding shift key*/
+ .checkbox {
+ z-index: 1;
+ }
</style>
<script type="text/javascript">
jQuery( function() {
@@ -94,6 +98,38 @@
}
}
});
+ // Enable shift selection of checkboxes
+ lastReleaseSelected = null;
+ lastDeleteSelected = null;
+ ReleaseCheckboxes = jQuery('input.not_spam');
+ DeleteCheckboxes = jQuery('input.discard');
+ jQuery('input.not_spam,input.discard').click( function (e) {
+ // get id and split it
+ var id = this.id.split('-');
+ if (id[0] == 'Release') {
+ if (!lastReleaseSelected) {
+ lastReleaseSelected = this;
+ return;
+ }
+ if (e.shiftKey) {
+ var start = ReleaseCheckboxes.index(this);
+ var end = ReleaseCheckboxes.index(lastReleaseSelected);
+ ReleaseCheckboxes.slice(Math.min(start,end), Math.max(start,end)+ 1).prop('checked', lastReleaseSelected.checked).change();
+ }
+ lastReleaseSelected = this;
+ } else {
+ if (!lastDeleteSelected) {
+ lastDeleteSelected = this;
+ return;
+ }
+ if (e.shiftKey) {
+ var start = DeleteCheckboxes.index(this);
+ var end = DeleteCheckboxes.index(lastDeleteSelected);
+ DeleteCheckboxes.slice(Math.min(start,end), Math.max(start,end)+ 1).prop('checked', lastDeleteSelected.checked).change();
+ }
+ lastDeleteSelected = this;
+ }
+ });
});
</script>
commit 801c0c6ea979802d6036e14f0c57265ce9775aa9
Author: Ronaldo Richieri <ronaldo at bestpractical.com>
Date: Thu Jul 13 09:03:23 2023 -0300
Add option to configure rows per page in spam list
diff --git a/html/Tools/SpamFilter/List.html b/html/Tools/SpamFilter/List.html
index 0b9a86b..a312038 100644
--- a/html/Tools/SpamFilter/List.html
+++ b/html/Tools/SpamFilter/List.html
@@ -159,7 +159,7 @@ unless ($Format) {
$Order ||= 'ASC';
$OrderBy ||= 'id';
-$Rows ||= $ARGS{RowsPerPage} || 50;
+$Rows ||= $ARGS{RowsPerPage} || RT->Config->Get('SpamListRowsPerPage') || 50;
$Page = 1 unless $Page && $Page > 0;
use RT::Spams;
diff --git a/lib/RT/Extension/SpamFilter.pm b/lib/RT/Extension/SpamFilter.pm
index 3b9b02c..8d8affb 100644
--- a/lib/RT/Extension/SpamFilter.pm
+++ b/lib/RT/Extension/SpamFilter.pm
@@ -113,6 +113,8 @@ is shown below:
}
);
+ Set($SpamListRowsPerPage, 50);
+
=head2 C<@SpamFilters>
The C<@SpamFilters> array is an array of hashes. Each hash
@@ -146,6 +148,11 @@ presence of the spam header and then add the score you configure.
The C<$SpamFilterThreshold> is the score above which an incoming message
is considered to be spam and placed in the spam list.
+=head2 C<$SpamListRowsPerPage>
+
+The C<$SpamListRowsPerPage> is an optional configuration to change the
+number of rows to display per page in the spam list. Default is 50.
+
=head1 AUTHOR
Best Practical Solutions, LLC E<lt>modules at bestpractical.comE<gt>
-----------------------------------------------------------------------
Summary of changes:
Changes | 5 ++
META.yml | 2 +-
README | 8 +-
html/Elements/RT__Spam/ColumnMap | 65 ++++++++++-----
html/Tools/SpamFilter/List.html | 169 +++++++++++++++++++++++++++++++++------
lib/RT/Extension/SpamFilter.pm | 11 ++-
6 files changed, 211 insertions(+), 49 deletions(-)
hooks/post-receive
--
rt-extension-spamfilter
More information about the Bps-public-commit
mailing list