|
Lines 1-10
Link Here
|
| 1 |
[% USE Koha %] |
1 |
[% USE Koha %] |
| 2 |
[% USE Biblio %] |
2 |
[% USE Biblio %] |
| 3 |
[% USE KohaDates %] |
3 |
[% USE KohaDates %] |
| 4 |
[% INCLUDE 'doc-head-open.inc' %] |
4 |
[% SET footerjs = 1 %] |
| 5 |
<title>Koha › Catalog › [% IF ( searchdesc ) %]Results of search [% IF ( query_desc ) %]for '[% query_desc | html %]'[% END %][% IF ( limit_desc ) %] with limit(s): '[% limit_desc | html %]'[% END %][% ELSE %]You did not specify any search criteria[% END %]</title> |
|
|
| 6 |
[% INCLUDE 'doc-head-close.inc' %] |
| 7 |
[% INCLUDE 'browser-strings.inc' %] |
| 8 |
[% IF BiblioDefaultViewmarc %] |
5 |
[% IF BiblioDefaultViewmarc %] |
| 9 |
[% SET DetailPage="MARCdetail.pl" %] |
6 |
[% SET DetailPage="MARCdetail.pl" %] |
| 10 |
[% ELSIF BiblioDefaultViewlabeled_marc %] |
7 |
[% ELSIF BiblioDefaultViewlabeled_marc %] |
|
Lines 14-272
Link Here
|
| 14 |
[% ELSE %] |
11 |
[% ELSE %] |
| 15 |
[% SET DetailPage="detail.pl" %] |
12 |
[% SET DetailPage="detail.pl" %] |
| 16 |
[% END %] |
13 |
[% END %] |
| 17 |
|
14 |
[% INCLUDE 'doc-head-open.inc' %] |
| 18 |
<!--[if lt IE 9]> |
15 |
<title>Koha › Catalog › [% IF ( searchdesc ) %]Results of search [% IF ( query_desc ) %]for '[% query_desc | html %]'[% END %][% IF ( limit_desc ) %] with limit(s): '[% limit_desc | html %]'[% END %][% ELSE %]You did not specify any search criteria[% END %]</title> |
| 19 |
<script type="text/javascript" src="[% interface %]/lib/shims/json2.min.js"></script> |
16 |
[% INCLUDE 'doc-head-close.inc' %] |
| 20 |
<![endif]--> |
|
|
| 21 |
<script type="text/javascript" src="[% interface %]/js/browser.js"></script> |
| 22 |
<script type="text/javascript" src="[% interface %]/lib/jquery/plugins/jquery.fixFloat.js"></script> |
| 23 |
<script type="text/javascript"> |
| 24 |
//<![CDATA[ |
| 25 |
var MSG_NO_ITEM_SELECTED = _("Nothing is selected."); |
| 26 |
var MSG_NON_RESERVES_SELECTED = _("One or more selected items cannot be placed on hold."); |
| 27 |
var q_array = new Array(); // will hold search terms, if present |
| 28 |
[% IF ( AmazonCoverImages ) %] |
| 29 |
// http://www.oreillynet.com/pub/a/javascript/2003/10/21/amazonhacks.html |
| 30 |
function verify_images() { |
| 31 |
$("img").each(function(i){ |
| 32 |
if ((this.src.indexOf('images-amazon.com') >= 0) || (this.src.indexOf('images.amazon.com') >=0)) { |
| 33 |
w = this.width; |
| 34 |
h = this.height; |
| 35 |
if ((w == 1) || (h == 1)) { |
| 36 |
this.src = 'https://images-na.ssl-images-amazon.com/images/G/01/x-site/icons/no-img-sm.gif'; |
| 37 |
} else if ((this.complete != null) && (!this.complete)) { |
| 38 |
this.src = 'https://images-na.ssl-images-amazon.com/images/G/01/x-site/icons/no-img-sm.gif'; |
| 39 |
} |
| 40 |
} |
| 41 |
}); |
| 42 |
} |
| 43 |
|
| 44 |
$(window).load(function() { |
| 45 |
verify_images(); |
| 46 |
}); |
| 47 |
[% END %] |
| 48 |
function Dopop(link) { |
| 49 |
newin=window.open(link,'popup','width=500,height=500,toolbar=false,scrollbars=yes,resizeable=yes'); |
| 50 |
} |
| 51 |
|
| 52 |
$(document).ready(function() { |
| 53 |
|
| 54 |
$("#searchheader").fixFloat(); |
| 55 |
|
| 56 |
$("#cartsubmit").click(function(e){ |
| 57 |
e.preventDefault(); |
| 58 |
var checkboxes = $("#searchresults").find(":checkbox"); |
| 59 |
addMultiple(checkboxes); |
| 60 |
}); |
| 61 |
|
| 62 |
$(".addtolist").on("click",function(e){ |
| 63 |
e.preventDefault(); |
| 64 |
var shelfnumber = $(this).data("shelfnumber"); |
| 65 |
var checkboxes = $("#searchresults").find(":checkbox"); |
| 66 |
var vshelf = vShelfAdd(checkboxes); |
| 67 |
if( vshelf ){ |
| 68 |
if( $(this).hasClass("morelists") ){ |
| 69 |
Dopop('/cgi-bin/koha/virtualshelves/addbybiblionumber.pl?' + vshelf); |
| 70 |
} else if( $(this).hasClass("newlist") ){ |
| 71 |
Dopop('/cgi-bin/koha/virtualshelves/addbybiblionumber.pl?newshelf=1&' + vshelf); |
| 72 |
} else { |
| 73 |
Dopop('/cgi-bin/koha/virtualshelves/addbybiblionumber.pl?shelfnumber='+shelfnumber+'&confirm=1&' + vshelf); |
| 74 |
} |
| 75 |
} |
| 76 |
}); |
| 77 |
|
| 78 |
$("#z3950submit").click(function(){ |
| 79 |
PopupZ3950(); |
| 80 |
return false; |
| 81 |
}); |
| 82 |
|
| 83 |
$("#searchheader").on("click",".placehold", function(){ |
| 84 |
$("#holdFor").val(""); |
| 85 |
placeHold(); |
| 86 |
$(".btn-group").removeClass("open"); |
| 87 |
return false; |
| 88 |
}); |
| 89 |
|
| 90 |
$(".placeholdfor").click(function(){ |
| 91 |
holdForPatron(); |
| 92 |
$(".btn-group").removeClass("open"); |
| 93 |
return false; |
| 94 |
}); |
| 95 |
|
| 96 |
$("#forgetholdfor").click(function(){ |
| 97 |
forgetPatron(); |
| 98 |
$(".btn-group").removeClass("open"); |
| 99 |
return false; |
| 100 |
}); |
| 101 |
|
| 102 |
$("#tagsel_span").html("<input id=\"tagsel_tag\" class=\"submit\" type=\"submit\" value=\"Tag\"/>"); |
| 103 |
|
| 104 |
$(".selection").show(); |
| 105 |
[% IF ( query_desc ) %] |
| 106 |
toHighlight = $("p,span.results_summary,a.title"); |
| 107 |
var query_desc = "[% query_desc |replace("'", "\'") |replace('"', '\"') |replace('\n', '\\n') |replace('\r', '\\r') | html %]"; |
| 108 |
q_array = query_desc.split(" "); |
| 109 |
// ensure that we don't have "" at the end of the array, which can |
| 110 |
// break the highlighter |
| 111 |
while (q_array.length > 0 && q_array[q_array.length-1] == "") { |
| 112 |
q_array = q_array.splice(0,-1); |
| 113 |
} |
| 114 |
highlightOn(); |
| 115 |
$("#highlight_toggle_on" ).hide().click(function(e) { |
| 116 |
e.preventDefault(); |
| 117 |
highlightOn(); |
| 118 |
}); |
| 119 |
$("#highlight_toggle_off").show().click(function(e) { |
| 120 |
e.preventDefault(); |
| 121 |
highlightOff(); |
| 122 |
}); |
| 123 |
[% END %] |
| 124 |
|
| 125 |
[% IF (SEARCH_RESULTS) %] |
| 126 |
var newresults = [ |
| 127 |
[%- FOREACH result IN SEARCH_RESULTS -%] |
| 128 |
[%- result.biblionumber %], |
| 129 |
[%- END -%] |
| 130 |
]; |
| 131 |
var browser = KOHA.browser('[% searchid %]', parseInt('[% biblionumber %]', 10)); |
| 132 |
browser.create([% SEARCH_RESULTS.first.result_number %], '[% query_cgi %]', '[% limit_cgi | uri %]','[% sort_cgi | uri %]', |
| 133 |
newresults, '[% total %]'); |
| 134 |
[% END %] |
| 135 |
[% IF (gotoPage && gotoNumber) %] |
| 136 |
[% IF (gotoNumber == 'first') %] |
| 137 |
window.location = '/cgi-bin/koha/catalogue/[% gotoPage %]?biblionumber=' + [% SEARCH_RESULTS.first.biblionumber %] + '&searchid=[% searchid %]'; |
| 138 |
[% ELSIF (gotoNumber == 'last') %] |
| 139 |
window.location = '/cgi-bin/koha/catalogue/[% gotoPage %]?biblionumber=' + [% SEARCH_RESULTS.last.biblionumber %] + '&searchid=[% searchid %]'; |
| 140 |
[% END %] |
| 141 |
[% END %] |
| 142 |
|
| 143 |
[% IF LocalCoverImages %] |
| 144 |
KOHA.LocalCover.LoadResultsCovers(); |
| 145 |
[% END %] |
| 146 |
|
| 147 |
$("#select_all").on("click",function(e){ |
| 148 |
e.preventDefault(); |
| 149 |
selectAll(); |
| 150 |
}); |
| 151 |
$("#clear_all").on("click",function(e){ |
| 152 |
e.preventDefault(); |
| 153 |
clearAll(); |
| 154 |
}); |
| 155 |
|
| 156 |
$("#searchresults").on("click",".addtocart",function(e){ |
| 157 |
e.preventDefault(); |
| 158 |
var selection_id = this.id; |
| 159 |
var biblionumber = selection_id.replace("cart",""); |
| 160 |
addRecord(biblionumber); |
| 161 |
}); |
| 162 |
|
| 163 |
$("#searchresults").on("click",".cartRemove",function(e){ |
| 164 |
e.preventDefault(); |
| 165 |
var selection_id = this.id; |
| 166 |
var biblionumber = selection_id.replace("cartR",""); |
| 167 |
delSingleRecord(biblionumber); |
| 168 |
}); |
| 169 |
|
| 170 |
}); |
| 171 |
|
| 172 |
|
| 173 |
[% IF ( query_desc ) %]function highlightOff() { |
| 174 |
toHighlight.removeHighlight(); |
| 175 |
$(".highlight_toggle").toggle(); |
| 176 |
} |
| 177 |
function highlightOn() { |
| 178 |
var x; |
| 179 |
for (x in q_array) { |
| 180 |
q_array[x] = q_array[x].toLowerCase(); |
| 181 |
var myStopwords = "[% Koha.Preference('NotHighlightedWords') %]".toLowerCase().split('|'); |
| 182 |
if ( (q_array[x].length > 0) && ($.inArray(q_array[x], myStopwords) == -1) ) { |
| 183 |
toHighlight.highlight(q_array[x]); |
| 184 |
} |
| 185 |
} |
| 186 |
$(".highlight_toggle").toggle(); |
| 187 |
}[% END %] |
| 188 |
|
| 189 |
function selectAll () { |
| 190 |
$(".selection").prop("checked", true); |
| 191 |
} |
| 192 |
function clearAll () { |
| 193 |
$(".selection").prop("checked", false); |
| 194 |
} |
| 195 |
function placeHold () { |
| 196 |
var checkedItems = $(".selection:checked"); |
| 197 |
if ($(checkedItems).size() == 0) { |
| 198 |
alert(MSG_NO_ITEM_SELECTED); |
| 199 |
return false; |
| 200 |
} |
| 201 |
var bibs = ""; |
| 202 |
var badBibs = false; |
| 203 |
$(checkedItems).each(function() { |
| 204 |
var bib = $(this).val(); |
| 205 |
if ($("#reserve_" + bib).size() == 0) { |
| 206 |
alert(MSG_NON_RESERVES_SELECTED); |
| 207 |
badBibs = true; |
| 208 |
return false; |
| 209 |
} |
| 210 |
bibs += bib + "/"; |
| 211 |
}); |
| 212 |
if (badBibs) { |
| 213 |
return false; |
| 214 |
} |
| 215 |
$("#hold_form_biblios").val(bibs); |
| 216 |
$("#hold_form").submit(); |
| 217 |
return false; |
| 218 |
} |
| 219 |
|
| 220 |
function forgetPatron(){ |
| 221 |
$.removeCookie("holdfor", { path: '/' }); |
| 222 |
$(".holdforlink").remove(); |
| 223 |
$("#placeholdc").html("<a class=\"btn btn-default btn-xs placehold\" href=\"#\"><i class=\"fa fa-sticky-note-o\"></i> "+_("Place hold")+"</a>"); |
| 224 |
} |
| 225 |
|
| 226 |
function addToList () { |
| 227 |
var checkedItems = $(".selection:checked"); |
| 228 |
if ($(checkedItems).size() == 0) { |
| 229 |
alert(MSG_NO_ITEM_SELECTED); |
| 230 |
return false; |
| 231 |
} |
| 232 |
var bibs = ""; |
| 233 |
$(checkedItems).each(function() { |
| 234 |
bibs += $(this).val() + "/"; |
| 235 |
}); |
| 236 |
|
| 237 |
var url = "/cgi-bin/koha/virtualshelves/addbybiblionumber.pl?biblionumbers=" + bibs; |
| 238 |
window.open(url, 'Add_to_virtualshelf', 'width=500, height=400, toolbar=false, scrollbars=yes'); |
| 239 |
return false; |
| 240 |
} |
| 241 |
|
| 242 |
/* this function open a popup to search on z3950 server. */ |
| 243 |
function PopupZ3950() { |
| 244 |
var strQuery = GetZ3950Terms(); |
| 245 |
if(strQuery){ |
| 246 |
window.open("/cgi-bin/koha/cataloguing/z3950_search.pl?biblionumber=[% biblionumber %]"+strQuery,"z3950search",'width=740,height=450,location=yes,toolbar=no,scrollbars=yes,resize=yes'); |
| 247 |
} |
| 248 |
} |
| 249 |
/* provide Z3950 search points */ |
| 250 |
function GetZ3950Terms(){ |
| 251 |
var strQuery="&frameworkcode="; |
| 252 |
[% FOREACH z3950_search_param IN z3950_search_params %] |
| 253 |
strQuery += "&" + "[% z3950_search_param.name |uri %]" + "=" + "[% z3950_search_param.value |uri %]"; |
| 254 |
[% END %] |
| 255 |
return strQuery; |
| 256 |
} |
| 257 |
|
| 258 |
function holdfor(){ |
| 259 |
$("#holdFor").val(""); |
| 260 |
placeHold(); |
| 261 |
} |
| 262 |
|
| 263 |
function holdForPatron() { |
| 264 |
$("#holdFor").val("[% holdfor_cardnumber %]"); |
| 265 |
placeHold(); |
| 266 |
} |
| 267 |
//]]> |
| 268 |
</script> |
| 269 |
</head> |
17 |
</head> |
|
|
18 |
|
| 270 |
<body id="catalog_results" class="catalog"> |
19 |
<body id="catalog_results" class="catalog"> |
| 271 |
[% INCLUDE 'header.inc' %] |
20 |
[% INCLUDE 'header.inc' %] |
| 272 |
[% INCLUDE 'cat-search.inc' %] |
21 |
[% INCLUDE 'cat-search.inc' %] |
|
Lines 867-870
function holdForPatron() {
Link Here
|
| 867 |
[% INCLUDE 'facets.inc' %] |
616 |
[% INCLUDE 'facets.inc' %] |
| 868 |
</div> |
617 |
</div> |
| 869 |
</div> |
618 |
</div> |
|
|
619 |
|
| 620 |
[% MACRO jsinclude BLOCK %] |
| 621 |
[% INCLUDE 'browser-strings.inc' %] |
| 622 |
<!--[if lt IE 9]> |
| 623 |
<script type="text/javascript" src="[% interface %]/lib/shims/json2.min.js"></script> |
| 624 |
<![endif]--> |
| 625 |
<script type="text/javascript" src="[% interface %]/js/browser.js"></script> |
| 626 |
<script type="text/javascript" src="[% interface %]/lib/jquery/plugins/jquery.fixFloat.js"></script> |
| 627 |
<script type="text/javascript"> |
| 628 |
var MSG_NO_ITEM_SELECTED = _("Nothing is selected."); |
| 629 |
var MSG_NON_RESERVES_SELECTED = _("One or more selected items cannot be placed on hold."); |
| 630 |
var q_array = new Array(); // will hold search terms, if present |
| 631 |
[% IF ( AmazonCoverImages ) %] |
| 632 |
// http://www.oreillynet.com/pub/a/javascript/2003/10/21/amazonhacks.html |
| 633 |
function verify_images() { |
| 634 |
$("img").each(function(i){ |
| 635 |
if ((this.src.indexOf('images-amazon.com') >= 0) || (this.src.indexOf('images.amazon.com') >=0)) { |
| 636 |
w = this.width; |
| 637 |
h = this.height; |
| 638 |
if ((w == 1) || (h == 1)) { |
| 639 |
this.src = 'https://images-na.ssl-images-amazon.com/images/G/01/x-site/icons/no-img-sm.gif'; |
| 640 |
} else if ((this.complete != null) && (!this.complete)) { |
| 641 |
this.src = 'https://images-na.ssl-images-amazon.com/images/G/01/x-site/icons/no-img-sm.gif'; |
| 642 |
} |
| 643 |
} |
| 644 |
}); |
| 645 |
} |
| 646 |
|
| 647 |
$(window).load(function() { |
| 648 |
verify_images(); |
| 649 |
}); |
| 650 |
[% END %] |
| 651 |
|
| 652 |
$(document).ready(function() { |
| 653 |
|
| 654 |
$("#searchheader").fixFloat(); |
| 655 |
|
| 656 |
$("#cartsubmit").click(function(e){ |
| 657 |
e.preventDefault(); |
| 658 |
var checkboxes = $("#searchresults").find(":checkbox"); |
| 659 |
addMultiple(checkboxes); |
| 660 |
}); |
| 661 |
|
| 662 |
$(".addtolist").on("click",function(e){ |
| 663 |
e.preventDefault(); |
| 664 |
var shelfnumber = $(this).data("shelfnumber"); |
| 665 |
var checkboxes = $("#searchresults").find(":checkbox"); |
| 666 |
var vshelf = vShelfAdd(checkboxes); |
| 667 |
if( vshelf ){ |
| 668 |
if( $(this).hasClass("morelists") ){ |
| 669 |
openWindow('/cgi-bin/koha/virtualshelves/addbybiblionumber.pl?' + vshelf); |
| 670 |
} else if( $(this).hasClass("newlist") ){ |
| 671 |
openWindow('/cgi-bin/koha/virtualshelves/addbybiblionumber.pl?newshelf=1&' + vshelf); |
| 672 |
} else { |
| 673 |
openWindow('/cgi-bin/koha/virtualshelves/addbybiblionumber.pl?shelfnumber='+shelfnumber+'&confirm=1&' + vshelf); |
| 674 |
} |
| 675 |
} |
| 676 |
}); |
| 677 |
|
| 678 |
$("#z3950submit").click(function(){ |
| 679 |
PopupZ3950(); |
| 680 |
return false; |
| 681 |
}); |
| 682 |
|
| 683 |
$("#searchheader").on("click",".placehold", function(){ |
| 684 |
$("#holdFor").val(""); |
| 685 |
placeHold(); |
| 686 |
$(".btn-group").removeClass("open"); |
| 687 |
return false; |
| 688 |
}); |
| 689 |
|
| 690 |
$(".placeholdfor").click(function(){ |
| 691 |
holdForPatron(); |
| 692 |
$(".btn-group").removeClass("open"); |
| 693 |
return false; |
| 694 |
}); |
| 695 |
|
| 696 |
$("#forgetholdfor").click(function(){ |
| 697 |
forgetPatron(); |
| 698 |
$(".btn-group").removeClass("open"); |
| 699 |
return false; |
| 700 |
}); |
| 701 |
|
| 702 |
$("#tagsel_span").html("<input id=\"tagsel_tag\" class=\"submit\" type=\"submit\" value=\"Tag\"/>"); |
| 703 |
|
| 704 |
$(".selection").show(); |
| 705 |
|
| 706 |
[% IF ( query_desc ) %] |
| 707 |
toHighlight = $("p,span.results_summary,a.title"); |
| 708 |
var query_desc = "[% query_desc |replace("'", "\'") |replace('"', '\"') |replace('\n', '\\n') |replace('\r', '\\r') | html %]"; |
| 709 |
q_array = query_desc.split(" "); |
| 710 |
// ensure that we don't have "" at the end of the array, which can |
| 711 |
// break the highlighter |
| 712 |
while (q_array.length > 0 && q_array[q_array.length-1] == "") { |
| 713 |
q_array = q_array.splice(0,-1); |
| 714 |
} |
| 715 |
highlightOn(); |
| 716 |
$("#highlight_toggle_on" ).hide().click(function(e) { |
| 717 |
e.preventDefault(); |
| 718 |
highlightOn(); |
| 719 |
}); |
| 720 |
$("#highlight_toggle_off").show().click(function(e) { |
| 721 |
e.preventDefault(); |
| 722 |
highlightOff(); |
| 723 |
}); |
| 724 |
[% END %] |
| 725 |
|
| 726 |
[% IF (SEARCH_RESULTS) %] |
| 727 |
var newresults = [ |
| 728 |
[%- FOREACH result IN SEARCH_RESULTS -%] |
| 729 |
[%- result.biblionumber %], |
| 730 |
[%- END -%] |
| 731 |
]; |
| 732 |
var browser = KOHA.browser('[% searchid %]', parseInt('[% biblionumber %]', 10)); |
| 733 |
browser.create([% SEARCH_RESULTS.first.result_number %], '[% query_cgi %]', '[% limit_cgi | uri %]','[% sort_cgi | uri %]', |
| 734 |
newresults, '[% total %]'); |
| 735 |
[% END %] |
| 736 |
|
| 737 |
[% IF (gotoPage && gotoNumber) %] |
| 738 |
[% IF (gotoNumber == 'first') %] |
| 739 |
window.location = '/cgi-bin/koha/catalogue/[% gotoPage %]?biblionumber=' + [% SEARCH_RESULTS.first.biblionumber %] + '&searchid=[% searchid %]'; |
| 740 |
[% ELSIF (gotoNumber == 'last') %] |
| 741 |
window.location = '/cgi-bin/koha/catalogue/[% gotoPage %]?biblionumber=' + [% SEARCH_RESULTS.last.biblionumber %] + '&searchid=[% searchid %]'; |
| 742 |
[% END %] |
| 743 |
[% END %] |
| 744 |
|
| 745 |
[% IF LocalCoverImages %] |
| 746 |
KOHA.LocalCover.LoadResultsCovers(); |
| 747 |
[% END %] |
| 748 |
|
| 749 |
$("#select_all").on("click",function(e){ |
| 750 |
e.preventDefault(); |
| 751 |
selectAll(); |
| 752 |
}); |
| 753 |
|
| 754 |
$("#clear_all").on("click",function(e){ |
| 755 |
e.preventDefault(); |
| 756 |
clearAll(); |
| 757 |
}); |
| 758 |
|
| 759 |
$("#searchresults").on("click",".addtocart",function(e){ |
| 760 |
e.preventDefault(); |
| 761 |
var selection_id = this.id; |
| 762 |
var biblionumber = selection_id.replace("cart",""); |
| 763 |
addRecord(biblionumber); |
| 764 |
}); |
| 765 |
|
| 766 |
$("#searchresults").on("click",".cartRemove",function(e){ |
| 767 |
e.preventDefault(); |
| 768 |
var selection_id = this.id; |
| 769 |
var biblionumber = selection_id.replace("cartR",""); |
| 770 |
delSingleRecord(biblionumber); |
| 771 |
}); |
| 772 |
|
| 773 |
}); |
| 774 |
|
| 775 |
|
| 776 |
[% IF ( query_desc ) %] |
| 777 |
function highlightOff() { |
| 778 |
toHighlight.removeHighlight(); |
| 779 |
$(".highlight_toggle").toggle(); |
| 780 |
} |
| 781 |
function highlightOn() { |
| 782 |
var x; |
| 783 |
for (x in q_array) { |
| 784 |
q_array[x] = q_array[x].toLowerCase(); |
| 785 |
var myStopwords = "[% Koha.Preference('NotHighlightedWords') %]".toLowerCase().split('|'); |
| 786 |
if ( (q_array[x].length > 0) && ($.inArray(q_array[x], myStopwords) == -1) ) { |
| 787 |
toHighlight.highlight(q_array[x]); |
| 788 |
} |
| 789 |
} |
| 790 |
$(".highlight_toggle").toggle(); |
| 791 |
} |
| 792 |
[% END %] |
| 793 |
|
| 794 |
function selectAll () { |
| 795 |
$(".selection").prop("checked", true); |
| 796 |
} |
| 797 |
function clearAll () { |
| 798 |
$(".selection").prop("checked", false); |
| 799 |
} |
| 800 |
function placeHold () { |
| 801 |
var checkedItems = $(".selection:checked"); |
| 802 |
if ($(checkedItems).size() == 0) { |
| 803 |
alert(MSG_NO_ITEM_SELECTED); |
| 804 |
return false; |
| 805 |
} |
| 806 |
var bibs = ""; |
| 807 |
var badBibs = false; |
| 808 |
$(checkedItems).each(function() { |
| 809 |
var bib = $(this).val(); |
| 810 |
if ($("#reserve_" + bib).size() == 0) { |
| 811 |
alert(MSG_NON_RESERVES_SELECTED); |
| 812 |
badBibs = true; |
| 813 |
return false; |
| 814 |
} |
| 815 |
bibs += bib + "/"; |
| 816 |
}); |
| 817 |
if (badBibs) { |
| 818 |
return false; |
| 819 |
} |
| 820 |
$("#hold_form_biblios").val(bibs); |
| 821 |
$("#hold_form").submit(); |
| 822 |
return false; |
| 823 |
} |
| 824 |
|
| 825 |
function forgetPatron(){ |
| 826 |
$.removeCookie("holdfor", { path: '/' }); |
| 827 |
$(".holdforlink").remove(); |
| 828 |
$("#placeholdc").html("<a class=\"btn btn-default btn-xs placehold\" href=\"#\"><i class=\"fa fa-sticky-note-o\"></i> "+_("Place hold")+"</a>"); |
| 829 |
} |
| 830 |
|
| 831 |
function addToList () { |
| 832 |
var checkedItems = $(".selection:checked"); |
| 833 |
if ($(checkedItems).size() == 0) { |
| 834 |
alert(MSG_NO_ITEM_SELECTED); |
| 835 |
return false; |
| 836 |
} |
| 837 |
var bibs = ""; |
| 838 |
$(checkedItems).each(function() { |
| 839 |
bibs += $(this).val() + "/"; |
| 840 |
}); |
| 841 |
|
| 842 |
var url = "/cgi-bin/koha/virtualshelves/addbybiblionumber.pl?biblionumbers=" + bibs; |
| 843 |
window.open(url, 'Add_to_virtualshelf', 'width=500, height=400, toolbar=false, scrollbars=yes'); |
| 844 |
return false; |
| 845 |
} |
| 846 |
|
| 847 |
/* this function open a popup to search on z3950 server. */ |
| 848 |
function PopupZ3950() { |
| 849 |
var strQuery = GetZ3950Terms(); |
| 850 |
if(strQuery){ |
| 851 |
window.open("/cgi-bin/koha/cataloguing/z3950_search.pl?biblionumber=[% biblionumber %]"+strQuery,"z3950search",'width=740,height=450,location=yes,toolbar=no,scrollbars=yes,resize=yes'); |
| 852 |
} |
| 853 |
} |
| 854 |
/* provide Z3950 search points */ |
| 855 |
function GetZ3950Terms(){ |
| 856 |
var strQuery="&frameworkcode="; |
| 857 |
[% FOREACH z3950_search_param IN z3950_search_params %] |
| 858 |
strQuery += "&" + "[% z3950_search_param.name |uri %]" + "=" + "[% z3950_search_param.value |uri %]"; |
| 859 |
[% END %] |
| 860 |
return strQuery; |
| 861 |
} |
| 862 |
|
| 863 |
function holdfor(){ |
| 864 |
$("#holdFor").val(""); |
| 865 |
placeHold(); |
| 866 |
} |
| 867 |
|
| 868 |
function holdForPatron() { |
| 869 |
$("#holdFor").val("[% holdfor_cardnumber %]"); |
| 870 |
placeHold(); |
| 871 |
} |
| 872 |
</script> |
| 873 |
[% END %] |
| 874 |
|
| 870 |
[% INCLUDE 'intranet-bottom.inc' %] |
875 |
[% INCLUDE 'intranet-bottom.inc' %] |
| 871 |
- |
|
|