Bugzilla – Attachment 124582 Details for
Bug 28958
Use Flatpickr on serials pages
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 28958: Use Flatpickr on serials pages
Bug-28958-Use-Flatpickr-on-serials-pages.patch (text/plain), 15.98 KB, created by
Owen Leonard
on 2021-09-07 13:36:19 UTC
(
hide
)
Description:
Bug 28958: Use Flatpickr on serials pages
Filename:
MIME Type:
Creator:
Owen Leonard
Created:
2021-09-07 13:36:19 UTC
Size:
15.98 KB
patch
obsolete
>From 4bd23ba020520663c5862fc44826296e2ce05491 Mon Sep 17 00:00:00 2001 >From: Owen Leonard <oleonard@myacpl.org> >Date: Tue, 7 Sep 2021 12:44:06 +0000 >Subject: [PATCH] Bug 28958: Use Flatpickr on serials pages > >This patch replaces the use of jQueryUI's datepicker on serials pages. > >To test, apply the patch and test the following serials pages to confirm >that datepickers work correctly. "Linked" date fields should prevent a >"to" selection which preceeds the selected "from" date. > >- Claims -> Choose vendor -> Filter missing issues (linked "from" and > "to" fields). >- Check expiration -> "Expiring before" field. >- Manage numbering patterns -> New numbering pattern -> "First issue > publication date" field. >- Serials advanced search -> "Expires before" field. >- Subscription search results -> Check multiple checkboxes -> Edit > selected serials: "Expiration date" field. >- Subscription details -> Serial collection -> Edit serials -> > "Published on" and "Expected on" fields. >- Subscription details -> Renew -> "Start date" field in the popup > window. >- Subscription details -> Edit subscription -> Page 2 -> "First issue > publication date," "Subscription start date," and "Subscription end > date" fields. >- Locate a subscription with manual history enabled. From the > subscription detail page, click the "Planning" tab, then "Edit > history" -> Linked fields "Subscription start date" and "Subscription > end date." >--- > .../prog/en/modules/serials/checkexpiration.tt | 2 +- > .../intranet-tmpl/prog/en/modules/serials/claims.tt | 4 ++-- > .../prog/en/modules/serials/serials-edit.tt | 10 ++++------ > .../prog/en/modules/serials/serials-search.tt | 2 +- > .../prog/en/modules/serials/subscription-add.tt | 8 ++++---- > .../prog/en/modules/serials/subscription-batchedit.tt | 2 +- > .../prog/en/modules/serials/subscription-history.tt | 4 ++-- > .../en/modules/serials/subscription-numberpatterns.tt | 2 +- > .../prog/en/modules/serials/subscription-renew.tt | 2 +- > 9 files changed, 17 insertions(+), 19 deletions(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/serials/checkexpiration.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/serials/checkexpiration.tt >index cdd8861dae..42f2f42626 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/serials/checkexpiration.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/serials/checkexpiration.tt >@@ -54,7 +54,7 @@ > [% END %] > > <li><label for="date" class="required">Expiring before:</label> >- <input id="date" type="text" name="date" size="10" value="[% date | $KohaDates %]" class="required focus datepicker" required="required" /> >+ <input id="date" type="text" name="date" size="10" value="[% date | $KohaDates %]" class="required focus flatpickr" required="required" /> > <span class="required">Required</span> > <div class="hint">[% INCLUDE 'date-format.inc' %]</div></li> > </ol> >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/serials/claims.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/serials/claims.tt >index 2ab6873e28..32b3af5a78 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/serials/claims.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/serials/claims.tt >@@ -93,9 +93,9 @@ > <ol> > <li> > <label for="from">From:</label> >- <input type="text" name="begindate" id="from" value="[% begindate | html %]" size="10" maxlength="10" class="datepickerfrom" /> >+ <input type="text" name="begindate" id="from" value="[% begindate | html %]" size="10" maxlength="10" class="flatpickrfrom" /> > <label for="to" style="float:none;">To:</label> >- <input type="text" name="enddate" id="to" value="[% enddate | html %]" size="10" maxlength="10" class="datepickerto" /> >+ <input type="text" name="enddate" id="to" value="[% enddate | html %]" size="10" maxlength="10" class="flatpickrto" /> > <span class="hint">[% INCLUDE 'date-format.inc' %]</span> > <input id="filterByDate" type="button" value="OK" /> > <a href="#" id="clearfilter"><i class="fa fa-remove"></i> Clear filter</a> >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/serials/serials-edit.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/serials/serials-edit.tt >index 781ac6b168..4be920bdc0 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/serials/serials-edit.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/serials/serials-edit.tt >@@ -62,8 +62,6 @@ $(document).ready(function() { > } > return true; > }); >- >- $(".datepicker").datepicker(); > }); > //]]> > </script> >@@ -143,13 +141,13 @@ $(document).ready(function() { > Issue <input type="text" name="serialseq" id="serialseq[% serialslis.serialid | html %]" value="[% serialslis.serialseq | html %]" size="20" maxlength="100" /> > </td> > <td> >- <input type="text" name="publisheddate" value="[% serialslis.publisheddate | html %]" size="10" maxlength="15" class="datepicker" /> >+ <input type="text" name="publisheddate" value="[% serialslis.publisheddate | html %]" size="10" maxlength="15" class="flatpickr" /> > </td> > <td> > <input type="text" name="publisheddatetext" value="[% serialslis.publisheddatetext | html %]" size="10" maxlength="100" /> > </td> > <td> >- <input type="text" name="planneddate" value="[% serialslis.planneddate | html %]" size="10" maxlength="15" class="datepicker" /> >+ <input type="text" name="planneddate" value="[% serialslis.planneddate | html %]" size="10" maxlength="15" class="flatpickr" /> > </td> > <td> > [% IF ( serialslis.editdisable ) %] >@@ -306,13 +304,13 @@ $(document).ready(function() { > Supplemental issue <input type="text" name="serialseq" id="serialseq[% newserialloo.serialid | html %]" value="" size="20" maxlength="100" onchange="if (this.value!=''){unHideItems('items[% newserialloo.subscriptionid | html %][% newserialloo.serialid | html %]','label[% newserialloo.subscriptionid | html %][% newserialloo.serialid | html %]', '[% newserialloo.serialid | html %]')} else {HideItems('items[% newserialloo.subscriptionid | html %][% newserialloo.serialid | html %]','label[% newserialloo.subscriptionid | html %][% newserialloo.serialid | html %]')}" /> > </td> > <td> >- <input type="text" name="publisheddate" value="[% newserialloo.publisheddate | html %]" size="10" maxlength="15" class="datepicker" /> >+ <input type="text" name="publisheddate" value="[% newserialloo.publisheddate | html %]" size="10" maxlength="15" class="flatpickr" /> > </td> > <td> > <input type="text" name="publisheddatetext" value="[% newserialloo.publisheddatetext | html %]" size="10" maxlength="100" /> > </td> > <td> >- <input type="text" name="planneddate" value="[% newserialloo.planneddate | html %]" size="10" maxlength="15" class="datepicker" /> >+ <input type="text" name="planneddate" value="[% newserialloo.planneddate | html %]" size="10" maxlength="15" class="flatpickr" /> > </td> > <td> > <select name="status" id="addstatus[% newserialloo.serialid | html %]" onchange="if (this.value==2){unHideItems('items'+'[% newserialloo.subscriptionid | html %][% newserialloo.serialid | html %]','label[% newserialloo.subscriptionid | html %][% newserialloo.serialid | html %]','[% newserialloo.serialid | html %]'); changeDate(this, '[% newserialloo.arriveddate | html %]')} else if (this.value==7){changeDate(this, '[% newserialloo.arriveddate | html %]')} else { HideItems('items'+'[% newserialloo.subscriptionid | html %]'+[% newserialloo.serialid | html %],'label[% serialslis.subscriptionid | html %][% serialslis.serialid | html %]'); changeDate(this, '[% serialslis.planneddate | html %]')}" > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/serials/serials-search.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/serials/serials-search.tt >index 587d8fa13a..d2c979a3d2 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/serials/serials-search.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/serials/serials-search.tt >@@ -276,7 +276,7 @@ > </li> > <li> > <label for="to">Expires before:</label> >- <input type="text" id="to" name="expiration_date_filter" value="[% expiration_date_filter | $KohaDates %]" size="10" maxlength="10" class="datepickerto" /> >+ <input type="text" id="to" name="expiration_date_filter" value="[% expiration_date_filter | $KohaDates %]" size="10" maxlength="10" class="flatpickr" /> > </li> > [% INCLUDE 'additional-fields-entry.inc' available=additional_fields_for_subscription values=additional_field_filters wrap_fieldset=0 %] > </ol> >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/serials/subscription-add.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/serials/subscription-add.tt >index 789596e4ec..5de924a268 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/serials/subscription-add.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/serials/subscription-add.tt >@@ -263,7 +263,7 @@ fieldset.rows table { clear: none; margin: 0; } > <li> > <label for="acqui_date" class="required">First issue publication date:</label> > [% UNLESS (more_than_one_serial) %] >- <input type="text" size="10" id="acqui_date" name="firstacquidate" value="[% firstacquidate | $KohaDates %]" class="datepicker required" required="required" /> >+ <input type="text" size="10" id="acqui_date" name="firstacquidate" value="[% firstacquidate | $KohaDates %]" class="flatpickr required" required="required" /> > [% ELSE %] > [% firstacquidate | $KohaDates %] > <input type="hidden" id="acqui_date" name="firstacquidate" value="[% firstacquidate | $KohaDates %]"/> >@@ -273,7 +273,7 @@ fieldset.rows table { clear: none; margin: 0; } > [% IF (more_than_one_serial) %] > <li> > <label for="nextacquidate">Next issue publication date:</label> >- <input type="text" size="10" id="nextacquidate" name="nextacquidate" value="[% nextacquidate | $KohaDates %]" class="datepicker" /> >+ <input type="text" size="10" id="nextacquidate" name="nextacquidate" value="[% nextacquidate | $KohaDates %]" class="flatpickr" /> > </li> > [% END %] > <li> >@@ -327,11 +327,11 @@ fieldset.rows table { clear: none; margin: 0; } > </li> > <li> > <label for="from" class="required"> Subscription start date:</label> >- <input type="text" size="10" id="from" name="startdate" value="[% startdate | $KohaDates %]" class="datepickerfrom required" required="required" /> >+ <input type="text" size="10" id="from" name="startdate" value="[% startdate | $KohaDates %]" class="flatpickrfrom required" required="required" /> > </li> > <li> > <label for="to">Subscription end date:</label> >- <input type="text" size="10" id="to" name="enddate" value="[% enddate | $KohaDates %]" class="datepickerto" /> >+ <input type="text" size="10" id="to" name="enddate" value="[% enddate | $KohaDates %]" class="flatpickrto" /> > </li> > <li> > <label for="numberpattern" class="required">Numbering pattern:</label> >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/serials/subscription-batchedit.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/serials/subscription-batchedit.tt >index c6219f9058..360b18e41d 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/serials/subscription-batchedit.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/serials/subscription-batchedit.tt >@@ -142,7 +142,7 @@ > </li> > <li> > <label for="enddate">Expiration date: </label> >- <input type="text" class="datepicker" id="enddate" name="enddate" placeholder="No change"/> >+ <input type="text" class="flatpickr" id="enddate" name="enddate" placeholder="No change"/> > </li> > [% FOREACH field IN additional_fields %] > <li> >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/serials/subscription-history.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/serials/subscription-history.tt >index 23bdbc6d63..56827085ac 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/serials/subscription-history.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/serials/subscription-history.tt >@@ -41,14 +41,14 @@ > <tr> > <td>Subscription start date</td> > <td> >- <input type="text" size="10" name="histstartdate" value="[% histstartdate | $KohaDates %]" class="datepickerfrom" /> (start date of the 1st subscription) >+ <input type="text" size="10" name="histstartdate" value="[% histstartdate | $KohaDates %]" class="flatpickrfrom" /> (start date of the 1st subscription) > <div class="hint">[% INCLUDE 'date-format.inc' %]</div> > </td> > </tr> > <tr> > <td>Subscription end date</td> > <td> >- <input type="text" size="10" name="histenddate" value="[% histenddate | $KohaDates %]" class="datepickerto" />(if empty, subscription is still active) >+ <input type="text" size="10" name="histenddate" value="[% histenddate | $KohaDates %]" class="flatpickrto" />(if empty, subscription is still active) > <div class="hint">[% INCLUDE 'date-format.inc' %]</div> > </td> > </tr> >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/serials/subscription-numberpatterns.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/serials/subscription-numberpatterns.tt >index 833643aba3..802698e678 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/serials/subscription-numberpatterns.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/serials/subscription-numberpatterns.tt >@@ -200,7 +200,7 @@ > </li> > <li> > <label for="firstacquidate">First issue publication date: </label> >- <input type="text" id="firstacquidate" class="datepicker" size="10" /> >+ <input type="text" id="firstacquidate" class="flatpickr" size="10" /> > </li> > <li> > <label for="sublength">Subscription length:</label> >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/serials/subscription-renew.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/serials/subscription-renew.tt >index 7d570fe8ab..3cf27e27a5 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/serials/subscription-renew.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/serials/subscription-renew.tt >@@ -34,7 +34,7 @@ > <ol> > <li> > <label for="startdate">Start date: </label> >- <input type="text" size="10" id="startdate" name="startdate" value="[% startdate | html %]" class="datepicker"/> >+ <input type="text" size="10" id="startdate" name="startdate" value="[% startdate | html %]" class="flatpickr"/> > <div class="hint">[% INCLUDE 'date-format.inc' %]</div> > </li> > <li> >-- >2.20.1
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 28958
:
124582
|
125494