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") );
12 if ($(checkedItems).size() > 1) {
14 $(checkedItems).each(function() {
15 var bib = $(this).val();
19 newloc = "/cgi-bin/koha/reserve/request.pl?biblionumbers=" + bibs + "&multi_hold=1";
21 var bib = checkedItems[0].value;
22 newloc = "/cgi-bin/koha/reserve/request.pl?biblionumber=" + bib;
25 window.opener.location = newloc;
29 function batchDelete(){
30 var checkedItems = $("input:checkbox:checked");
31 if ($(checkedItems).size() === 0) {
32 alert( __("No item was selected") );
38 checkedItems.each(function() {
39 var bib = $(this).val();
43 newloc = "/cgi-bin/koha/tools/batch_delete_records.pl?op=list&type=biblio&bib_list=" + bibs;
45 window.opener.location = newloc;
49 function batchModify(){
50 var checkedItems = $("input:checkbox:checked");
51 if ($(checkedItems).size() === 0) {
52 alert( __("No item was selected") );
58 $(checkedItems).each(function() {
59 var bib = $(this).val();
62 newloc = "/cgi-bin/koha/tools/batch_record_modification.pl?op=list&bib_list=" + bibs + "&type=biblio";
64 window.opener.location = newloc;
68 $(document).ready(function(){
69 $("#items-popover").popover();
71 $("#CheckAll").click(function (e) {
73 $(".select_record").each(function () {
74 $(this).prop("checked", true).change();
78 $("#CheckNone").click(function (e) {
80 $(".select_record").each(function () {
81 $(this).prop("checked", false).change();
85 $(".holdsep").text("| ");
86 $(".hold").text( __("Place hold") );
87 $("#downloadcartc").empty();
89 $("#itemst").dataTable($.extend(true, {}, dataTablesDefaults, {
92 { "bSortable": false, "bSearchable": false, 'aTargets': [ 'NoSort' ] },
93 { "sType": "anti-the", "aTargets" : [ "anti-the" ] },
94 { "sType": "callnumbers", "aTargets" : [ "callnumbers"] }
96 "aaSorting": [[ 1, "asc" ]],
100 $(".showdetails").on("click",function(e){
102 if( $(this).hasClass("showmore") ){
109 $("#batch_modify").on("click",function(e){
113 $("#batch_delete").on("click",function(e){
118 $("#remove_from_cart").on("click",function(e){
123 $("#add_to_list").on("click",function(e){
128 $("#place_hold").on("click",function(e){
133 $("#send_cart").on("click",function(e){
138 $("#print_cart").on("click",function(e){
143 $("#empty_cart").on("click",function(e){
147 $(".title").on("click",function(e){
149 openBiblio( this.href );
151 $(".select_record").on("change",function(){
152 selRecord( this.value, this.checked );