Bugzilla – Attachment 33806 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]
[PASSED QA] Bug 13271 - Subject search links broken if XSLT and OPACPopupAuthorsSearch are both off
PASSED-QA-Bug-13271---Subject-search-links-broken-.patch (text/plain), 7.83 KB, created by
Katrin Fischer
on 2014-11-22 10:07:58 UTC
(
hide
)
Description:
[PASSED QA] Bug 13271 - Subject search links broken if XSLT and OPACPopupAuthorsSearch are both off
Filename:
MIME Type:
Creator:
Katrin Fischer
Created:
2014-11-22 10:07:58 UTC
Size:
7.83 KB
patch
obsolete
>From 1d45f38daee94ad7a04a4f25062edf63497a0427 Mon Sep 17 00:00:00 2001 >From: Owen Leonard <oleonard@myacpl.org> >Date: Tue, 18 Nov 2014 09:16:53 -0500 >Subject: [PATCH] [PASSED QA] Bug 13271 - Subject search links broken if XSLT > and OPACPopupAuthorsSearch are both off > >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. > >Signed-off-by: Frederic Demians <f.demians@tamil.fr> > >I confirm the bug and the solution. Before various JS errors: "ReferenceError: >e is not defined" and "ReferenceError: showSubjects is not defined". After: >Comforting silence, and functionnality. > >Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de> >Works as described. >--- > .../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 52089b1..28a3686 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> >@@ -1745,25 +1754,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) { >@@ -1826,7 +1822,7 @@ > } > } > $(document).ready(function() { >- $("a.showauthors").click(function(){ >+ $("a.showauthors").click(function(e){ > e.preventDefault(); > showAuthors(this); > }); >-- >1.9.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 13271
:
33654
|
33804
| 33806