1 /* global __ dataTablesDefaults showMore showLess delSelRecords addSelToShelf sendBasket printBasket delBasket openBiblio selRecord */
3 function placeHold () {
4 var checkedItems = $("input:checkbox:checked");
5 if ($(checkedItems).size() === 0) {
6 alert( __("No item was selected") );
11 $(checkedItems).each(function() {
12 var bib = $(this).val();
13 bib_params.push("biblionumber=" + bib);
16 if (bib_params.length > 1) {
17 bib_params.push('multi_hold=1');
20 window.opener.location = "/cgi-bin/koha/reserve/request.pl?" + bib_params.join('&');
24 function batchDelete(){
25 var checkedItems = $("input:checkbox:checked");
26 if ($(checkedItems).size() === 0) {
27 alert( __("No item was selected") );
33 checkedItems.each(function() {
34 var bib = $(this).val();
38 newloc = "/cgi-bin/koha/tools/batch_delete_records.pl?op=list&type=biblio&bib_list=" + bibs;
40 window.opener.location = newloc;
44 function batchModify(){
45 var checkedItems = $("input:checkbox:checked");
46 if ($(checkedItems).size() === 0) {
47 alert( __("No item was selected") );
53 $(checkedItems).each(function() {
54 var bib = $(this).val();
57 newloc = "/cgi-bin/koha/tools/batch_record_modification.pl?op=list&bib_list=" + bibs + "&type=biblio";
59 window.opener.location = newloc;
63 $(document).ready(function(){
64 $("#items-popover").popover();
66 $("#CheckAll").click(function (e) {
68 $(".select_record").each(function () {
69 $(this).prop("checked", true).change();
73 $("#CheckNone").click(function (e) {
75 $(".select_record").each(function () {
76 $(this).prop("checked", false).change();
80 $(".holdsep").text("| ");
81 $(".hold").text( __("Place hold") );
82 $("#downloadcartc").empty();
84 $("#itemst").dataTable($.extend(true, {}, dataTablesDefaults, {
87 { "bSortable": false, "bSearchable": false, 'aTargets': [ 'NoSort' ] },
88 { "sType": "anti-the", "aTargets" : [ "anti-the" ] },
89 { "sType": "callnumbers", "aTargets" : [ "callnumbers"] }
91 "aaSorting": [[ 1, "asc" ]],
95 $(".showdetails").on("click",function(e){
97 if( $(this).hasClass("showmore") ){
104 $("#batch_modify").on("click",function(e){
108 $("#batch_delete").on("click",function(e){
113 $("#remove_from_cart").on("click",function(e){
118 $("#add_to_list").on("click",function(e){
123 $("#place_hold").on("click",function(e){
128 $("#send_cart").on("click",function(e){
133 $("#print_cart").on("click",function(e){
138 $("#empty_cart").on("click",function(e){
142 $(".title").on("click",function(e){
144 openBiblio( this.href );
146 $(".select_record").on("change",function(){
147 selRecord( this.value, this.checked );