Bugzilla – Attachment 163594 Details for
Bug 36374
Some of our JS files should stay tidy
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 36374: flag JS files to keep tidy
Bug-36374-flag-JS-files-to-keep-tidy.patch (text/plain), 2.58 KB, created by
Martin Renvoize (ashimema)
on 2024-03-21 09:34:58 UTC
(
hide
)
Description:
Bug 36374: flag JS files to keep tidy
Filename:
MIME Type:
Creator:
Martin Renvoize (ashimema)
Created:
2024-03-21 09:34:58 UTC
Size:
2.58 KB
patch
obsolete
>From c530103acb5160a70f00d41ba5d009d48df6f9dc Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Thu, 21 Mar 2024 08:45:11 +0100 >Subject: [PATCH] Bug 36374: flag JS files to keep tidy > >Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> >--- > .../intranet-tmpl/prog/js/modals/add_catalog_concern.js | 1 + > koha-tmpl/intranet-tmpl/prog/js/modals/display_ticket.js | 1 + > koha-tmpl/intranet-tmpl/prog/js/modals/place_booking.js | 1 + > xt/js_tidy.t | 6 +++--- > 4 files changed, 6 insertions(+), 3 deletions(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/js/modals/add_catalog_concern.js b/koha-tmpl/intranet-tmpl/prog/js/modals/add_catalog_concern.js >index 10c0b3b2e99..7683f898873 100644 >--- a/koha-tmpl/intranet-tmpl/prog/js/modals/add_catalog_concern.js >+++ b/koha-tmpl/intranet-tmpl/prog/js/modals/add_catalog_concern.js >@@ -1,3 +1,4 @@ >+/* keep tidy */ > $(document).ready(function() { > > // Pre-populate empty message with template >diff --git a/koha-tmpl/intranet-tmpl/prog/js/modals/display_ticket.js b/koha-tmpl/intranet-tmpl/prog/js/modals/display_ticket.js >index b35a3a7557e..0812d7fccb0 100644 >--- a/koha-tmpl/intranet-tmpl/prog/js/modals/display_ticket.js >+++ b/koha-tmpl/intranet-tmpl/prog/js/modals/display_ticket.js >@@ -1,3 +1,4 @@ >+/* keep tidy */ > $(document).ready(function() { > $('#ticketDetailsModal').on('show.bs.modal', function(event) { > let modal = $(this); >diff --git a/koha-tmpl/intranet-tmpl/prog/js/modals/place_booking.js b/koha-tmpl/intranet-tmpl/prog/js/modals/place_booking.js >index 363dedf5926..20f493873b0 100644 >--- a/koha-tmpl/intranet-tmpl/prog/js/modals/place_booking.js >+++ b/koha-tmpl/intranet-tmpl/prog/js/modals/place_booking.js >@@ -1,3 +1,4 @@ >+/* keep tidy */ > let dataFetched = false; > let bookable_items, > bookings, >diff --git a/xt/js_tidy.t b/xt/js_tidy.t >index d9a4555279b..2667a18f732 100755 >--- a/xt/js_tidy.t >+++ b/xt/js_tidy.t >@@ -22,8 +22,8 @@ use FindBin(); > use Data::Dumper qw( Dumper ); > use Test::More tests => 1; > >-my @js_files; >-push @js_files, `git ls-files 'koha-tmpl/intranet-tmpl/prog/js/modals/place_booking.js'`; >+my $cmd = q{git grep -l '/\* keep tidy \*/' -- '*.js'}; >+my @js_files = qx{$cmd}; > > my @not_tidy; > foreach my $filepath (@js_files) { >@@ -35,4 +35,4 @@ foreach my $filepath (@js_files) { > } > } > >-is(scalar(@not_tidy), 0, 'No .js file should be messy') or diag Dumper \@not_tidy; >+is(scalar(@not_tidy), 0, sprintf('No .js file should be messy %s/%s', scalar(@not_tidy), scalar(@js_files))) or diag Dumper \@not_tidy; >-- >2.44.0
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 36374
:
163555
|
163556
|
163558
|
163559
|
163560
|
163587
|
163588
|
163589
|
163591
|
163592
|
163593
|
163594
|
163595
|
163596
|
165732
|
165733
|
165734
|
165735
|
165736
|
165737
|
165738
|
165739
|
165740
|
165741
|
165742
|
165743