|
Lines 125-131
Link Here
|
| 125 |
[% XSLTBloc | $raw %] |
125 |
[% XSLTBloc | $raw %] |
| 126 |
[% ELSE %] |
126 |
[% ELSE %] |
| 127 |
<h1 class="title">[% INCLUDE 'biblio-title.inc' %]</h1> |
127 |
<h1 class="title">[% INCLUDE 'biblio-title.inc' %]</h1> |
| 128 |
[% IF ( author ) %]<h5 class="author">by <a href="/cgi-bin/koha/opac-search.pl?q=au:[% author |url %]">[% author | html %]</a></h5>[% END %] |
128 |
[% IF ( author ) %]<h5 class="author">by <a class="contributors" href="/cgi-bin/koha/opac-search.pl?q=au:[% author |url %]">[% author | html %]</a></h5>[% END %] |
| 129 |
|
129 |
|
| 130 |
<span class="results_summary">[% UNLESS ( item_level_itypes ) %] |
130 |
<span class="results_summary">[% UNLESS ( item_level_itypes ) %] |
| 131 |
[ |
131 |
[ |
|
Lines 141-200
Link Here
|
| 141 |
[% IF ( MARCAUTHORS ) %] |
141 |
[% IF ( MARCAUTHORS ) %] |
| 142 |
<div class="results_summary"> |
142 |
<div class="results_summary"> |
| 143 |
<span class="label">Additional authors:</span> |
143 |
<span class="label">Additional authors:</span> |
| 144 |
[% IF OPACPopupAuthorsSearch %] |
|
|
| 145 |
<!-- Author search term selection modal --> |
| 146 |
<div id="authorSearch" class="modal hide" tabindex="-1" role="dialog" aria-labelledby="authorSearchLabel" aria-hidden="true"> |
| 147 |
<div class="modal-header"> |
| 148 |
<button type="button" class="closebtn" data-dismiss="modal" aria-hidden="true">×</button> |
| 149 |
<h3 id="authorSearchLabel">Select the item(s) to search</h3> |
| 150 |
</div> |
| 151 |
<div class="modal-body"> |
| 152 |
<input type="checkbox" onchange="checkAll(this, '#authorsList')" /> <b>All</b> |
| 153 |
<ul id="authorsList"> |
| 154 |
[% FOREACH MARCAUTHOR IN MARCAUTHORS %] |
| 155 |
<li> |
| 156 |
[% IF (MARCAUTHOR.authoritylink) %] |
| 157 |
<input type="checkbox" name="checkbox" |
| 158 |
id="author_[% loop.count | html %]" |
| 159 |
onclick="makeAuthorRequest()" |
| 160 |
value="an:[% MARCAUTHOR.authoritylink | html %]" /> |
| 161 |
[% ELSE %] |
| 162 |
<input type="checkbox" name="checkbox" |
| 163 |
id="author_[% loop.count | html %]" |
| 164 |
onclick="makeAuthorRequest()" |
| 165 |
value="au,wrdl:[% FOREACH SUBFIELD IN MARCAUTHOR.MARCAUTHOR_SUBFIELDS_LOOP %][% SUBFIELD.value |url %][% UNLESS (loop.last) %]+[% END %][% END %]" /> |
| 166 |
[% END %] |
| 167 |
<label for="author_[% loop.count | html %]"> |
| 168 |
[% FOREACH SUBFIELD IN MARCAUTHOR.MARCAUTHOR_SUBFIELDS_LOOP %] |
| 169 |
[% SUBFIELD.value | html %] |
| 170 |
[% END %] |
| 171 |
</label> |
| 172 |
</li> |
| 173 |
[% END # /FOREACH MARCAUTHORS %] |
| 174 |
</ul> |
| 175 |
</div> |
| 176 |
<div class="modal-footer"> |
| 177 |
<a id="validAuthorSearch" href="#" class="btn btn-primary">Search</a> |
| 178 |
<a href="#" class="cancel" data-dismiss="modal" aria-hidden="true">Cancel</a> |
| 179 |
</div> |
| 180 |
</div> |
| 181 |
[% END # /OPACPopupAuthorsSearch %] |
| 182 |
|
| 183 |
[% FOREACH MARCAUTHOR IN MARCAUTHORS %] |
144 |
[% FOREACH MARCAUTHOR IN MARCAUTHORS %] |
| 184 |
[% authorsloop = loop %] |
|
|
| 185 |
[% FOREACH MARCAUTHOR_SUBFIELDS_LOO IN MARCAUTHOR.MARCAUTHOR_SUBFIELDS_LOOP %] |
145 |
[% FOREACH MARCAUTHOR_SUBFIELDS_LOO IN MARCAUTHOR.MARCAUTHOR_SUBFIELDS_LOOP %] |
| 186 |
[% MARCAUTHOR_SUBFIELDS_LOO.separator | html %] |
146 |
[% MARCAUTHOR_SUBFIELDS_LOO.separator | html %] |
| 187 |
[% IF Koha.Preference( 'OPACPopupAuthorsSearch' ) == 1 %] |
147 |
[% IF ( MARCAUTHOR.authoritylink ) %] |
| 188 |
<a role="button" data-toggle="modal" title="‡[% MARCAUTHOR_SUBFIELDS_LOO.code | html %] [% MARCAUTHOR_SUBFIELDS_LOO.value | html %]" |
148 |
<a title="‡[% MARCAUTHOR_SUBFIELDS_LOO.code | html %] [% MARCAUTHOR_SUBFIELDS_LOO.value | html %]" class="contributors authority_link" data-authid="[% MARCAUTHOR.authoritylink | html %]" 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 %]"> |
| 189 |
class="showauthors" data-count="[% authorsloop.count | html %]" |
|
|
| 190 |
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 | html %]</a> |
| 191 |
[% ELSE %] |
149 |
[% ELSE %] |
| 192 |
<a title="‡[% MARCAUTHOR_SUBFIELDS_LOO.code | html %] [% MARCAUTHOR_SUBFIELDS_LOO.value | html %]" |
150 |
<a title="‡[% MARCAUTHOR_SUBFIELDS_LOO.code | html %] [% MARCAUTHOR_SUBFIELDS_LOO.value | html %]" class="contributors" 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 %]"> |
| 193 |
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 | html %]</a> |
|
|
| 194 |
[% END %] |
151 |
[% END %] |
|
|
152 |
[% MARCAUTHOR_SUBFIELDS_LOO.value | html %]</a> |
| 195 |
[% END %] |
153 |
[% END %] |
| 196 |
[% IF (MARCAUTHOR.authoritylink) %] |
154 |
[% IF (MARCAUTHOR.authoritylink) %] |
| 197 |
<a class='authlink' href="/cgi-bin/koha/opac-authoritiesdetail.pl?authid=[% MARCAUTHOR.authoritylink | html %]"><img style="vertical-align:middle" height="15" width="15" src="[% interface | html %]/[% theme | html %]/images/filefind.png"></a> |
155 |
<a class="authlink" href="/cgi-bin/koha/opac-authoritiesdetail.pl?authid=[% MARCAUTHOR.authoritylink | html %]"><i class="fa fa-search"></i></a> |
| 198 |
[% END %] |
156 |
[% END %] |
| 199 |
[% IF IDREF and MARCAUTHOR.unimarc3 %] |
157 |
[% IF IDREF and MARCAUTHOR.unimarc3 %] |
| 200 |
<a href="/cgi-bin/koha/opac-idref.pl?unimarc3=[% MARCAUTHOR.unimarc3 | uri %]" title="IdRef" rel="gb_page_center[600,500]">IdRef</a> |
158 |
<a href="/cgi-bin/koha/opac-idref.pl?unimarc3=[% MARCAUTHOR.unimarc3 | uri %]" title="IdRef" rel="gb_page_center[600,500]">IdRef</a> |
|
Lines 265-328
Link Here
|
| 265 |
[% END %] |
223 |
[% END %] |
| 266 |
|
224 |
|
| 267 |
[% IF ( MARCSUBJCTS ) %] |
225 |
[% IF ( MARCSUBJCTS ) %] |
| 268 |
<div class="results_summary subject"> |
226 |
<div class="results_summary subjects"> |
| 269 |
<span class="label">Subject(s):</span> |
227 |
<span class="label">Subject(s):</span> |
| 270 |
|
228 |
|
| 271 |
[% IF OPACPopupAuthorsSearch %] |
|
|
| 272 |
<!-- Search term selection modal --> |
| 273 |
<div id="subjectSearch" class="modal hide" tabindex="-1" role="dialog" aria-labelledby="subjectSearchLabel" aria-hidden="true"> |
| 274 |
<div class="modal-header"> |
| 275 |
<button type="button" class="closebtn" data-dismiss="modal" aria-hidden="true">×</button> |
| 276 |
<h3 id="subjectSearchLabel">Select the term(s) to search</h3> |
| 277 |
</div> |
| 278 |
<div id="subjectsList" class="modal-body"> |
| 279 |
<input type="checkbox" id="all_subjects" onchange="checkAll(this, '#subjectsList')" /> |
| 280 |
<label for="all_subjects"> |
| 281 |
<b>All</b> |
| 282 |
</label> |
| 283 |
[% FOREACH MARCSUBJCT IN MARCSUBJCTS %] |
| 284 |
[% subjectsloop = loop %] |
| 285 |
[% IF MARCSUBJCT.authoritylink %] |
| 286 |
<ul id="subjectsList[% loop.count | html %]" data-authid="[% MARCSUBJCT.authoritylink | html %]"> |
| 287 |
[% ELSE %] |
| 288 |
<ul id="subjectsList[% loop.count | html %]"> |
| 289 |
[% END %] |
| 290 |
[% FOREACH SUBFIELD IN MARCSUBJCT.MARCSUBJECT_SUBFIELDS_LOOP %] |
| 291 |
<li> |
| 292 |
<input type="checkbox" onclick="makeSubjectRequest()" name="checkbox" id="subject_[% subjectsloop.count | html %]_[% loop.count | html %]" value="su,wrdl:[% SUBFIELD.value |url %]" /> |
| 293 |
<label for="subject_[% subjectsloop.count | html %]_[% loop.count | html %]"> |
| 294 |
[% SUBFIELD.value | html %] |
| 295 |
</label> |
| 296 |
</li> |
| 297 |
[% END %] |
| 298 |
</ul> |
| 299 |
[% END %] |
| 300 |
</div> |
| 301 |
<div class="modal-footer"> |
| 302 |
<a href="#" id="validSubjectSearch" class="btn btn-primary">Search</a> |
| 303 |
<a href="#" class="cancel" data-dismiss="modal" aria-hidden="true">Cancel</a> |
| 304 |
</div> |
| 305 |
</div> |
| 306 |
[% END # /OPACPopupAuthorsSearch%] |
| 307 |
|
| 308 |
[% FOREACH MARCSUBJCT IN MARCSUBJCTS %] |
229 |
[% FOREACH MARCSUBJCT IN MARCSUBJCTS %] |
| 309 |
[% subjectsloop = loop %] |
230 |
[% subjectsloop = loop %] |
| 310 |
[% FOREACH SUBFIELD IN MARCSUBJCT.MARCSUBJECT_SUBFIELDS_LOOP %] |
231 |
[% FOREACH SUBFIELD IN MARCSUBJCT.MARCSUBJECT_SUBFIELDS_LOOP %] |
| 311 |
[% SUBFIELD.separator | html %] |
232 |
[% SUBFIELD.separator | html %] |
| 312 |
[% IF Koha.Preference( 'OPACPopupAuthorsSearch' ) == 1 %] |
233 |
<a title="[% '$' _ SUBFIELD.code _ ' ' _ SUBFIELD.value | html %]" class="subject" 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 | html %]</a> |
| 313 |
<a role="button" data-toggle="modal" title="[% '$' _ SUBFIELD.code _ ' ' _ SUBFIELD.value | html %]" 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 | html %], [% loop.count | html %]); return false;">[% SUBFIELD.value | html %]</a> |
|
|
| 314 |
[% ELSE %] |
| 315 |
<a title="[% '$' _ SUBFIELD.code _ ' ' _ SUBFIELD.value | html %]" 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 | html %]</a> |
| 316 |
[% END %] |
| 317 |
[% END %] |
234 |
[% END %] |
| 318 |
[% IF (MARCSUBJCT.authoritylink) %] |
235 |
[% IF (MARCSUBJCT.authoritylink) %] |
| 319 |
<a class="authlink" href="/cgi-bin/koha/opac-authoritiesdetail.pl?authid=[% MARCSUBJCT.authoritylink | html %]"><img style="vertical-align:middle" height="15" width="15" src="[% interface | html %]/[% theme | html %]/images/filefind.png" /></a> |
236 |
<a class="authlink" href="/cgi-bin/koha/opac-authoritiesdetail.pl?authid=[% MARCSUBJCT.authoritylink | html %]"><i class="fa fa-search"></i></a> |
| 320 |
[% END %] |
237 |
[% END %] |
| 321 |
[% UNLESS ( loop.last ) %] | [% END %] |
238 |
[% UNLESS ( loop.last ) %] | [% END %] |
| 322 |
[% END # / FOREACH MARCSUBJCTS %] |
239 |
[% END # / FOREACH MARCSUBJCTS %] |
| 323 |
</div> |
240 |
</div> |
| 324 |
[% ELSE # /IF MARCSUBJCTS %] |
241 |
[% ELSE # /IF MARCSUBJCTS %] |
| 325 |
[% IF ( subjects ) %]<span class="results_summary"><span class="label">Subject(s):</span> [% FOREACH subject IN subjects %]<a href="/cgi-bin/koha/opac-search.pl?q=su:[% subject.subject |url %]">[% subject.subject | html %]</a> | [% END %]</span>[% END %] |
242 |
[% IF ( subjects ) %]<span class="results_summary subjects"><span class="label">Subject(s):</span> [% FOREACH subject IN subjects %]<a class="subject" href="/cgi-bin/koha/opac-search.pl?q=su:[% subject.subject |url %]">[% subject.subject | html %]</a> | [% END %]</span>[% END %] |
| 326 |
[% END %] |
243 |
[% END %] |
| 327 |
|
244 |
|
| 328 |
[% IF ( copyrightdate ) %] |
245 |
[% IF ( copyrightdate ) %] |
|
Lines 1418-1423
Link Here
|
| 1418 |
</table> |
1335 |
</table> |
| 1419 |
[% END %][%# end of items_table block %] |
1336 |
[% END %][%# end of items_table block %] |
| 1420 |
|
1337 |
|
|
|
1338 |
[% IF ( OPACPopupAuthorsSearch ) %] |
| 1339 |
<!-- Modal --> |
| 1340 |
<div class="modal hide" id="multiSearch" tabindex="-1" role="dialog" aria-labelledby="multiSearchLabel"> |
| 1341 |
<div class="modal-dialog" role="document"> |
| 1342 |
<div class="modal-content"> |
| 1343 |
<div class="modal-header"> |
| 1344 |
<button type="button" class="closebtn" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button> |
| 1345 |
<h3 id="multiSearchLabel">Select the item(s) to search</h3> |
| 1346 |
</div> |
| 1347 |
<div class="modal-body"> |
| 1348 |
<a href="#" class="check_all"><i class="fa fa-check"></i> Select all</a> <span class="sep">|</span> |
| 1349 |
<a href="#" class="check_none"><i class="fa fa-remove"></i> Select none</a> |
| 1350 |
<ul id="termsList"> |
| 1351 |
</ul> |
| 1352 |
</div> |
| 1353 |
<div class="modal-footer"> |
| 1354 |
<a id="validMultiSearch" href="#" class="btn btn-primary">Search</a> |
| 1355 |
<a href="#" class="cancel" data-dismiss="modal" aria-hidden="true">Cancel</a> |
| 1356 |
</div> |
| 1357 |
</div> <!-- /.modal-content --> |
| 1358 |
</div> <!-- /.modal-dialog --> |
| 1359 |
</div> <!-- /#myModal --> |
| 1360 |
[% END %] |
| 1361 |
|
| 1421 |
[% BLOCK jsinclude %] |
1362 |
[% BLOCK jsinclude %] |
| 1422 |
[% INCLUDE 'datatables.inc' %] |
1363 |
[% INCLUDE 'datatables.inc' %] |
| 1423 |
[% INCLUDE 'columns_settings.inc' %] |
1364 |
[% INCLUDE 'columns_settings.inc' %] |
|
Lines 1441-1446
Link Here
|
| 1441 |
[% END %] |
1382 |
[% END %] |
| 1442 |
|
1383 |
|
| 1443 |
<script> |
1384 |
<script> |
|
|
1385 |
var OPACPopupAuthorsSearch = "[% Koha.Preference('OPACPopupAuthorsSearch') | html %]"; |
| 1444 |
[% IF ( OpacHighlightedWords ) %] |
1386 |
[% IF ( OpacHighlightedWords ) %] |
| 1445 |
var q_array = new Array(); // holds search terms if available |
1387 |
var q_array = new Array(); // holds search terms if available |
| 1446 |
|
1388 |
|
|
Lines 1786-1870
Link Here
|
| 1786 |
} |
1728 |
} |
| 1787 |
} |
1729 |
} |
| 1788 |
[% END # / IF IDreamBooksReviews || IDreamBooksReadometer %] |
1730 |
[% END # / IF IDreamBooksReviews || IDreamBooksReadometer %] |
| 1789 |
</script> |
|
|
| 1790 |
|
| 1791 |
[% IF OPACPopupAuthorsSearch %] |
| 1792 |
<script> |
| 1793 |
function showAuthors(element){ |
| 1794 |
var authornumber = $(element).attr("data-count"); |
| 1795 |
|
| 1796 |
// Check checkbox related to the clicked link |
| 1797 |
$("#authorsList input[type='checkbox']").attr('checked', false); |
| 1798 |
$("#author_"+authornumber).attr('checked', true); |
| 1799 |
|
1731 |
|
| 1800 |
makeAuthorRequest(); |
1732 |
$(document).ready(function() { |
| 1801 |
} |
1733 |
if( OPACPopupAuthorsSearch == "1" ){ |
|
|
1734 |
var terms = { |
| 1735 |
contributors : { |
| 1736 |
"label" : "author", |
| 1737 |
"keyword_search" : "au:", |
| 1738 |
}, |
| 1739 |
subject : { |
| 1740 |
"label" : "subject", |
| 1741 |
"keyword_search" : "su:", |
| 1742 |
} |
| 1743 |
} |
| 1744 |
$(".contributors,.subject").on("click", function(e){ |
| 1745 |
e.preventDefault(); |
| 1746 |
var term = $(this).attr("class"); |
| 1747 |
var selected_term = $(this).text(); |
| 1748 |
var term_links = $("." + term ); |
| 1749 |
if( term_links.length > 1 ){ |
| 1750 |
term_links.each(function( index ){ |
| 1751 |
var authid = ""; |
| 1752 |
var preselected = false; |
| 1753 |
var search_label = $(this).text().trim(); |
| 1754 |
if( $(this).text() == selected_term ){ preselected = true } |
| 1755 |
if( $(this).hasClass("authority_link") ){ |
| 1756 |
authid = $(this).data("authid"); |
| 1757 |
search_string = "an:" + authid; |
| 1758 |
} else { |
| 1759 |
search_string = terms[term]["keyword_search"] + encodeURIComponent( search_label ); |
| 1760 |
} |
| 1761 |
var termLink = $("<li>") |
| 1762 |
.append( $("<input>", { type: "checkbox", class: "select_term", value: search_string, id: terms[term]["label"] + index } ).prop("checked", preselected ) ) |
| 1763 |
.append(" ") |
| 1764 |
.append( $("<label>", { for: terms[term]["label"] + index, text: search_label } ) ) |
| 1765 |
$("#termsList").append( termLink ); |
| 1766 |
$("#multiSearch").modal("show"); |
| 1767 |
}); |
| 1768 |
} else { |
| 1769 |
location.href = $(this).attr("href"); |
| 1770 |
} |
| 1771 |
}); |
| 1802 |
|
1772 |
|
| 1803 |
function checkAll(checkbox, elem) { |
1773 |
$("#multiSearch").on("hide.bs.modal", function(){ |
| 1804 |
var check = $(checkbox).attr('checked') ? true : false; |
1774 |
$("#termsList").html(""); |
| 1805 |
$(elem).find("input[type='checkbox']").attr('checked', check); |
1775 |
}); |
| 1806 |
elem == "#authorsList" ? makeAuthorRequest() : makeSubjectRequest(); |
|
|
| 1807 |
} |
| 1808 |
|
1776 |
|
| 1809 |
function makeAuthorRequest(){ |
1777 |
$(".check_all").on("click", function(e){ |
| 1810 |
var values = []; |
1778 |
e.preventDefault(); |
|
|
1779 |
$(".select_term").each(function(){ |
| 1780 |
$(this).prop("checked", true ); |
| 1781 |
}); |
| 1782 |
}); |
| 1811 |
|
1783 |
|
| 1812 |
$("#authorsList").find("input[type='checkbox']:checked").each(function () { |
1784 |
$(".check_none").on("click", function(e){ |
| 1813 |
values.push($(this).val()); |
1785 |
e.preventDefault(); |
| 1814 |
}); |
1786 |
$(".select_term").each(function(){ |
|
|
1787 |
$(this).prop("checked", false ); |
| 1788 |
}); |
| 1789 |
}); |
| 1815 |
|
1790 |
|
| 1816 |
if (values.length > 0) { |
1791 |
$("#validMultiSearch").on("click", function(e){ |
| 1817 |
var request = "/cgi-bin/koha/opac-search.pl?q=" + values.join(' and '); |
1792 |
e.preventDefault(); |
| 1818 |
$("#validAuthorSearch").attr("href", request); |
1793 |
multiSearchRequest(); |
| 1819 |
} else { |
1794 |
}); |
| 1820 |
$("#validAuthorSearch").removeAttr("href"); |
|
|
| 1821 |
} |
1795 |
} |
|
|
1796 |
}); |
| 1822 |
|
1797 |
|
| 1823 |
} |
1798 |
function multiSearchRequest(){ |
| 1824 |
|
|
|
| 1825 |
//Subjects |
| 1826 |
function showSubjects(element, subjectnumber, subfieldnumber){ |
| 1827 |
|
| 1828 |
// Check checkbox related to the clicked link |
| 1829 |
$("#subjectsList input[type='checkbox']").attr('checked', false); |
| 1830 |
$("#subject_"+subjectnumber+"_"+subfieldnumber).attr('checked', true); |
| 1831 |
|
| 1832 |
makeSubjectRequest(); |
| 1833 |
|
| 1834 |
} |
| 1835 |
|
| 1836 |
function makeSubjectRequest() { |
| 1837 |
var values = []; |
1799 |
var values = []; |
| 1838 |
$("#subjectsList > ul").each(function() { |
1800 |
$(".select_term").each(function(){ |
| 1839 |
var all_checked = true; |
1801 |
if( $(this).prop("checked") ){ |
| 1840 |
var local_values = []; |
1802 |
values.push( $(this).val() ); |
| 1841 |
$(this).find('input[type="checkbox"]').each(function() { |
|
|
| 1842 |
if($(this).attr('checked')) { |
| 1843 |
local_values.push($(this).val()); |
| 1844 |
} else { |
| 1845 |
all_checked = false; |
| 1846 |
} |
| 1847 |
}); |
| 1848 |
var authid = $(this).attr('data-authid'); |
| 1849 |
if(all_checked && authid) { |
| 1850 |
values.push('an:' + authid); |
| 1851 |
} else { |
| 1852 |
values = values.concat(local_values); |
| 1853 |
} |
1803 |
} |
| 1854 |
}); |
1804 |
}); |
| 1855 |
if(values.length > 0) { |
1805 |
|
|
|
1806 |
if (values.length > 0) { |
| 1856 |
var request = "/cgi-bin/koha/opac-search.pl?q=" + values.join(' and '); |
1807 |
var request = "/cgi-bin/koha/opac-search.pl?q=" + values.join(' and '); |
| 1857 |
$("#validSubjectSearch").attr('href', request); |
1808 |
location.href = request; |
| 1858 |
} else { |
|
|
| 1859 |
$("#validSubjectSearch").removeAttr("href"); |
| 1860 |
} |
1809 |
} |
|
|
1810 |
|
| 1861 |
} |
1811 |
} |
| 1862 |
$(document).ready(function() { |
|
|
| 1863 |
$("a.showauthors").click(function(e){ |
| 1864 |
e.preventDefault(); |
| 1865 |
showAuthors(this); |
| 1866 |
}); |
| 1867 |
}); |
| 1868 |
</script> |
1812 |
</script> |
| 1869 |
[% END # / IF OPACPopupAuthorsSearch %] |
|
|
| 1870 |
[% END %] |
1813 |
[% END %] |