Bugzilla – Attachment 33654 Details for
Bug 13271
Subject search links broken if XSLT and OPACPopupAuthorsSearch are both off
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 13271 - Subject search links broken if XSLT and OPACPopupAuthorsSearch are both off
Bug-13271---Subject-search-links-broken-if-XSLT-an.patch (text/plain), 7.54 KB, created by
Owen Leonard
on 2014-11-18 14:41:39 UTC
(
hide
)
Description:
Bug 13271 - Subject search links broken if XSLT and OPACPopupAuthorsSearch are both off
Filename:
MIME Type:
Creator:
Owen Leonard
Created:
2014-11-18 14:41:39 UTC
Size:
7.54 KB
patch
obsolete
>From 31f470e29bc5ac5a2acc3c526b9fa5e55ade04a5 Mon Sep 17 00:00:00 2001 >From: Owen Leonard <oleonard@myacpl.org> >Date: Tue, 18 Nov 2014 09:16:53 -0500 >Subject: [PATCH] Bug 13271 - Subject search links broken if XSLT and > OPACPopupAuthorsSearch are both off >Content-Type: text/plain; charset="utf-8" > >This patch corrects some faults in the OPAC's bootstrap template which >prevent additional author and subject searches from working correctly >with OPACPopupAuthorsSearch both on and off. > >Some JavaScript has been removed because it was used only by the prog >theme and is obsolete. > >Locate a title with multiple subjects and additional authors. Test the >following conditions: > >OPACXSLTDetailsDisplay is blank and OPACPopupAuthorsSearch is off: > > - Clicking an additional author or subject link should directly trigger > the correct search without an JavaScript error. > >OPACXSLTDetailsDisplay is blank and OPACPopupAuthorsSearch is on: > > - Clicking an additional author or subject link should trigger a modal > window where you can select options for searching. Checking boxes and > submitting the form should perform the correct search. > >OPACXSLTDetailsDisplay is set to "default" and OPACPopupAuthorsSearch is >on OR off: > > - Clicking an additional author or subject link should directly trigger > the correct search without an JavaScript error. > (OPACPopupAuthorsSearch only works with the non-XSL view). > >For extra credit: Test with JavaScript disabled and confirm that link >still work correctly. >--- > .../opac-tmpl/bootstrap/en/modules/opac-detail.tt | 30 +++++++++----------- > 1 file changed, 13 insertions(+), 17 deletions(-) > >diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-detail.tt b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-detail.tt >index e641d76..de270be 100644 >--- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-detail.tt >+++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-detail.tt >@@ -154,7 +154,7 @@ > </ul> > </div> > <div class="modal-footer"> >- <a href="#" class="btn btn-primary">Search</a> >+ <a id="validAuthorSearch" href="#" class="btn btn-primary">Search</a> > <a href="#" class="cancel" data-dismiss="modal" aria-hidden="true">Cancel</a> > </div> > </div> >@@ -164,9 +164,14 @@ > [% authorsloop = loop %] > [% FOREACH MARCAUTHOR_SUBFIELDS_LOO IN MARCAUTHOR.MARCAUTHOR_SUBFIELDS_LOOP %] > [% MARCAUTHOR_SUBFIELDS_LOO.separator %] >- <a role="button" data-toggle="modal" title="â¡[% MARCAUTHOR_SUBFIELDS_LOO.code %] [% MARCAUTHOR_SUBFIELDS_LOO.value %]" >+ [% IF Koha.Preference( 'OPACPopupAuthorsSearch' ) == 1 %] >+ <a role="button" data-toggle="modal" title="â¡[% MARCAUTHOR_SUBFIELDS_LOO.code %] [% MARCAUTHOR_SUBFIELDS_LOO.value %]" > class="showauthors" data-count="[% authorsloop.count %]" > href="/cgi-bin/koha/opac-search.pl?q=[% FOREACH link_loo IN MARCAUTHOR_SUBFIELDS_LOO.link_loop %][% link_loo.operator |url %][% link_loo.limit |url %]:[% link_loo.link |url %][% END %]#authorSearch">[% MARCAUTHOR_SUBFIELDS_LOO.value %]</a> >+ [% ELSE %] >+ <a title="â¡[% MARCAUTHOR_SUBFIELDS_LOO.code %] [% MARCAUTHOR_SUBFIELDS_LOO.value %]" >+ class="showauthors" href="/cgi-bin/koha/opac-search.pl?q=[% FOREACH link_loo IN MARCAUTHOR_SUBFIELDS_LOO.link_loop %][% link_loo.operator |url %][% link_loo.limit |url %]:[% link_loo.link |url %][% END %]">[% MARCAUTHOR_SUBFIELDS_LOO.value %]</a> >+ [% END %] > [% END %] > [% IF (MARCAUTHOR.authoritylink) %] > <a class='authlink' href="/cgi-bin/koha/opac-authoritiesdetail.pl?authid=[% MARCAUTHOR.authoritylink %]"><img style="vertical-align:middle" height="15" width="15" src="[% interface %]/[% theme %]/images/filefind.png"></a> >@@ -281,7 +286,11 @@ > [% subjectsloop = loop %] > [% FOREACH SUBFIELD IN MARCSUBJCT.MARCSUBJECT_SUBFIELDS_LOOP %] > [% SUBFIELD.separator %] >- <a role="button" data-toggle="modal" title="$[% SUBFIELD.code %] [% SUBFIELD.value %]" href="/cgi-bin/koha/opac-search.pl?q=[% FOREACH link_loo IN SUBFIELD.link_loop %][% link_loo.operator |url %][% link_loo.limit |url %]:[% link_loo.link |url %][% END %]#subjectSearch" onclick="showSubjects(this, [% subjectsloop.count %], [% loop.count %]); return false;">[% SUBFIELD.value %]</a> >+ [% IF Koha.Preference( 'OPACPopupAuthorsSearch' ) == 1 %] >+ <a role="button" data-toggle="modal" title="$[% SUBFIELD.code %] [% SUBFIELD.value %]" href="/cgi-bin/koha/opac-search.pl?q=[% FOREACH link_loo IN SUBFIELD.link_loop %][% link_loo.operator |url %][% link_loo.limit |url %]:[% link_loo.link |url %][% END %]#subjectSearch" onclick="showSubjects(this, [% subjectsloop.count %], [% loop.count %]); return false;">[% SUBFIELD.value %]</a> >+ [% ELSE %] >+ <a title="$[% SUBFIELD.code %] [% SUBFIELD.value %]" href="/cgi-bin/koha/opac-search.pl?q=[% FOREACH link_loo IN SUBFIELD.link_loop %][% link_loo.operator |url %][% link_loo.limit |url %]:[% link_loo.link |url %][% END %]">[% SUBFIELD.value %]</a> >+ [% END %] > [% END %] > [% IF (MARCSUBJCT.authoritylink) %] > <a class="authlink" href="/cgi-bin/koha/opac-authoritiesdetail.pl?authid=[% MARCSUBJCT.authoritylink %]"><img style="vertical-align:middle" height="15" width="15" src="[% interface %]/[% theme %]/images/filefind.png" /></a> >@@ -1744,25 +1753,12 @@ > //<![CDATA[ > function showAuthors(element){ > var authornumber = $(element).attr("data-count"); >- // Hide subjects menu if displayed >- hideMenu(".subjectSearch"); > > // Check checkbox related to the clicked link > $("#authorsList input[type='checkbox']").attr('checked', false); > $("#author_"+authornumber).attr('checked', true); > > makeAuthorRequest(); >- >- // Display menu >- var left = element.offsetLeft || 0; >- var top = element.offsetTop || 0; >- $('.authorSearch').css('display', 'block'); >- $('.authorSearch').css('left', left); >- $('.authorSearch').css('top', top + 15); >- } >- >- function hideMenu(elem) { >- $(elem).css('display', 'none'); > } > > function checkAll(checkbox, elem) { >@@ -1825,7 +1821,7 @@ > } > } > $(document).ready(function() { >- $("a.showauthors").click(function(){ >+ $("a.showauthors").click(function(e){ > e.preventDefault(); > showAuthors(this); > }); >-- >1.7.9.5
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 13271
:
33654
|
33804
|
33806