Bugzilla – Attachment 25309 Details for
Bug 11753
Replace jQuery qTip plugin with Bootstrap tooltip on patron search form
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 11753 - Replace jQuery qTip plugin with Bootstrap tooltip on patron search form
Bug-11753---Replace-jQuery-qTip-plugin-with-Bootst.patch (text/plain), 4.49 KB, created by
Chris Cormack
on 2014-02-16 05:13:33 UTC
(
hide
)
Description:
Bug 11753 - Replace jQuery qTip plugin with Bootstrap tooltip on patron search form
Filename:
MIME Type:
Creator:
Chris Cormack
Created:
2014-02-16 05:13:33 UTC
Size:
4.49 KB
patch
obsolete
>From e26ae93cc277898203e1aea5a257e32019a896d6 Mon Sep 17 00:00:00 2001 >From: Owen Leonard <oleonard@myacpl.org> >Date: Wed, 12 Feb 2014 12:19:02 -0500 >Subject: [PATCH] Bug 11753 - Replace jQuery qTip plugin with Bootstrap tooltip > on patron search form > >The qTip plugin is out of date and incompatible with recent versions of >jQuery. This patch replaces use of qTip on the patron search form with a >Bootstrap tooltip implementation. > >To test, apply the patch and view /cgi-bin/koha/members/members-home.pl > >- Expand the patron search form by clicking the [+] >- Change 'search fields' from 'Standard' to 'Date of birth' >- A tooltip should appear giving details about the date format required >- Change the 'search fields' to something else. The tooltip should not > appear. > >Revision: Removed inclusion of qTip plugin from global header include. >The other instance of qTip usage occurs on a page which loads the plugin >separately. > >Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz> >--- > .../intranet-tmpl/prog/en/includes/doc-head-close.inc | 1 - > .../intranet-tmpl/prog/en/includes/patron-search.inc | 18 ++++++------------ > 2 files changed, 6 insertions(+), 13 deletions(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/doc-head-close.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/doc-head-close.inc >index e702aa5..11f6f38 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/includes/doc-head-close.inc >+++ b/koha-tmpl/intranet-tmpl/prog/en/includes/doc-head-close.inc >@@ -13,7 +13,6 @@ > <script type="text/javascript" src="[% interface %]/lib/shortcut/shortcut.js"></script> > <script type="text/javascript" src="[% interface %]/lib/jquery/plugins/jquery.cookie.min.js"></script> > <script type="text/javascript" src="[% interface %]/lib/jquery/plugins/jquery.highlight-3.js"></script> >-<script type="text/javascript" src="[% themelang %]/lib/jquery/plugins/jquery.qtip.js"></script> > <script type="text/javascript" src="[% interface %]/lib/bootstrap/bootstrap.min.js"></script> > <script type="text/javascript" src="[% interface %]/lib/jquery/plugins/jquery.validate.min.js"></script> > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/patron-search.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/patron-search.inc >index ac581ee..bccd39c 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/includes/patron-search.inc >+++ b/koha-tmpl/intranet-tmpl/prog/en/includes/patron-search.inc >@@ -5,7 +5,7 @@ > <div id="patron_search" class="residentsearch"> > <p class="tip">Enter patron card number or partial name:</p> > <form action="/cgi-bin/koha/members/member.pl" method="post"> >- <input id="searchmember" size="25" class="focus" name="member" type="text" value="[% member %]"/> >+ <input id="searchmember" data-toggle="tooltip" size="25" class="focus" name="member" type="text" value="[% member %]"/> > <span class="filteraction" id="filteraction_off"> <a href="#" onclick="$('#filters').toggle();$('.filteraction').toggle();">[-]</a></span> > <span class="filteraction" id="filteraction_on"> <a href="#" onclick="$('#filters').toggle();$('.filteraction').toggle();">[+]</a></span> > >@@ -28,21 +28,15 @@ > $("#searchfields").change(function() { > if ( $(this).val() == 'dateofbirth' ) { > [% IF dateformat == 'us' %] >- [% SET format = 'MM/DD/YYYY' %] >+ var MSG_DATE_FORMAT = _("Dates of birth should be entered in the format 'MM/DD/YYYY'"); > [% ELSIF dateformat == 'iso' %] >- [% SET format = 'YYYY-MM-DD' %] >+ var MSG_DATE_FORMAT = _("Dates of birth should be entered in the format 'YYYY-MM-DD'"); > [% ELSIF dateformat == 'metric' %] >- [% SET format = 'DD/MM/YYYY' %] >+ var MSG_DATE_FORMAT = _("Dates of birth should be entered in the format 'DD/MM/YYYY'"); > [% END %] >- >- $('#searchmember').qtip({ >- content: 'Dates of birth should be entered in the format "[% format %]"', >- style: { >- tip: 'topLeft' >- } >- }) >+ $('#searchmember').attr("title",MSG_DATE_FORMAT).tooltip('show'); > } else { >- $('#searchmember').qtip('destroy'); >+ $('#searchmember').tooltip('destroy'); > } > }); > </script> >-- >1.8.5.3
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 11753
:
25215
|
25216
|
25309
|
25339