Bugzilla – Attachment 90551 Details for
Bug 14794
Searching patron by birthday returns no results if format incorrect
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 14794: Display JS tooltip whenever dateofbirth is being searched
Bug-14794-Display-JS-tooltip-whenever-dateofbirth-.patch (text/plain), 2.97 KB, created by
Katrin Fischer
on 2019-06-13 05:52:07 UTC
(
hide
)
Description:
Bug 14794: Display JS tooltip whenever dateofbirth is being searched
Filename:
MIME Type:
Creator:
Katrin Fischer
Created:
2019-06-13 05:52:07 UTC
Size:
2.97 KB
patch
obsolete
>From 3161c24e8ee2b88670e0541f54b2979a6befa259 Mon Sep 17 00:00:00 2001 >From: Nick Clemens <nick@bywatersolutions.com> >Date: Fri, 7 Jun 2019 14:53:16 +0000 >Subject: [PATCH] Bug 14794: Display JS tooltip whenever dateofbirth is being > searched > >This updates the code that adds a tooltip for the correct date format >to display after the initial search > >To test: >1 - Do a patron search, choosing date of birth as the search field >2 - Note on choosing that field you get a tooltip defining the format >3 - Do a search >4 - Note tooltip is gone, but date fo birth is still selected as the field to search >5 - Apply patch, reload >6 - Note tooltip shows after initial search and until field is changed > >Signed-off-by: Maryse Simard <maryse.simard@inlibro.com> > >Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> >--- > koha-tmpl/intranet-tmpl/prog/js/members-menu.js | 36 ++++++++++++++----------- > 1 file changed, 21 insertions(+), 15 deletions(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/js/members-menu.js b/koha-tmpl/intranet-tmpl/prog/js/members-menu.js >index 235467dd1c..ad39b990cb 100644 >--- a/koha-tmpl/intranet-tmpl/prog/js/members-menu.js >+++ b/koha-tmpl/intranet-tmpl/prog/js/members-menu.js >@@ -15,22 +15,10 @@ $(document).ready(function(){ > } else { > $("#filteraction_off").toggle(); > } >+ >+ searchfield_date_tooltip(); > $("#searchfieldstype").change(function() { >- var MSG_DATE_FORMAT = ""; >- if ( $(this).val() == 'dateofbirth' ) { >- if( dateformat == 'us' ){ >- MSG_DATE_FORMAT = MSG_DATE_FORMAT_US; >- } else if( dateformat == 'iso' ){ >- MSG_DATE_FORMAT = MSG_DATE_FORMAT_ISO; >- } else if( dateformat == 'metric' ){ >- MSG_DATE_FORMAT = MSG_DATE_FORMAT_METRIC; >- } else if( dateformat == 'dmydot' ){ >- MSG_DATE_FORMAT = MSG_DATE_FORMAT_DMYDOT; >- } >- $('#searchmember').attr("title", MSG_DATE_FORMAT).tooltip('show'); >- } else { >- $('#searchmember').tooltip('destroy'); >- } >+ searchfield_date_tooltip(); > }); > > if( CAN_user_borrowers_edit_borrowers ){ >@@ -104,6 +92,24 @@ $(document).ready(function(){ > }); > }); > >+function searchfield_date_tooltip() { >+ var MSG_DATE_FORMAT = ""; >+ if ( $("#searchfieldstype").val() == 'dateofbirth' ) { >+ if( dateformat == 'us' ){ >+ MSG_DATE_FORMAT = MSG_DATE_FORMAT_US; >+ } else if( dateformat == 'iso' ){ >+ MSG_DATE_FORMAT = MSG_DATE_FORMAT_ISO; >+ } else if( dateformat == 'metric' ){ >+ MSG_DATE_FORMAT = MSG_DATE_FORMAT_METRIC; >+ } else if( dateformat == 'dmydot' ){ >+ MSG_DATE_FORMAT = MSG_DATE_FORMAT_DMYDOT; >+ } >+ $('#searchmember').attr("title", MSG_DATE_FORMAT).tooltip('show'); >+ } else { >+ $('#searchmember').tooltip('destroy'); >+ } >+} >+ > function confirm_updatechild() { > var is_confirmed = window.confirm( MSG_CONFIRM_UPDATE_CHILD ); > if (is_confirmed) { >-- >2.11.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 14794
:
90424
|
90428
|
90455
| 90551 |
90552