|
Lines 1-4
Link Here
|
| 1 |
/* global __ biblionumber count holdcount countorders countdeletedorders searchid addRecord */ |
1 |
/* global __ biblionumber count holdcount countorders countdeletedorders searchid addRecord delSingleRecord */ |
| 2 |
/* exported GetZ3950Terms PopupZ3950Confirmed */ |
2 |
/* exported GetZ3950Terms PopupZ3950Confirmed */ |
| 3 |
/* IF ( CAN_user_editcatalogue_edit_catalogue ) */ |
3 |
/* IF ( CAN_user_editcatalogue_edit_catalogue ) */ |
| 4 |
/* this function open a popup to search on z3950 server. */ |
4 |
/* this function open a popup to search on z3950 server. */ |
|
Lines 15-21
Link Here
|
| 15 |
} |
15 |
} |
| 16 |
/* END IF( CAN_user_editcatalogue_edit_catalogue ) */ |
16 |
/* END IF( CAN_user_editcatalogue_edit_catalogue ) */ |
| 17 |
|
17 |
|
| 18 |
function addToCart() { addRecord( biblionumber ); } |
18 |
function addToCart(){ |
|
|
19 |
addRecord( biblionumber ); |
| 20 |
} |
| 21 |
|
| 19 |
function addToShelf() { window.open('/cgi-bin/koha/virtualshelves/addbybiblionumber.pl?biblionumber=' + biblionumber,'Add_to_virtualshelf','width=500,height=400,toolbar=false,scrollbars=yes'); |
22 |
function addToShelf() { window.open('/cgi-bin/koha/virtualshelves/addbybiblionumber.pl?biblionumber=' + biblionumber,'Add_to_virtualshelf','width=500,height=400,toolbar=false,scrollbars=yes'); |
| 20 |
} |
23 |
} |
| 21 |
function printBiblio() {window.print(); } |
24 |
function printBiblio() {window.print(); } |
|
Lines 94-104
$(document).ready(function() {
Link Here
|
| 94 |
printBiblio(); |
97 |
printBiblio(); |
| 95 |
return false; |
98 |
return false; |
| 96 |
}); |
99 |
}); |
| 97 |
$("#addtocart").click(function(){ |
100 |
|
| 98 |
addToCart(); |
101 |
$(".addtocart").on("click", function (e) { |
| 99 |
$(".btn-group").removeClass("open"); |
102 |
e.preventDefault(); |
| 100 |
return false; |
103 |
var selection_id = this.id; |
|
|
104 |
var biblionumber = selection_id.replace("cart", ""); |
| 105 |
addRecord(biblionumber); |
| 106 |
}); |
| 107 |
|
| 108 |
$(".cartRemove").on("click", function (e) { |
| 109 |
e.preventDefault(); |
| 110 |
var selection_id = this.id; |
| 111 |
var biblionumber = selection_id.replace("cartR", ""); |
| 112 |
delSingleRecord(biblionumber); |
| 113 |
$(".addtocart").html("<i class=\"fa fa-shopping-cart\"></i> " + __("Add to cart")); |
| 101 |
}); |
114 |
}); |
|
|
115 |
|
| 102 |
$("#addtoshelf").click(function(){ |
116 |
$("#addtoshelf").click(function(){ |
| 103 |
addToShelf(); |
117 |
addToShelf(); |
| 104 |
$(".btn-group").removeClass("open"); |
118 |
$(".btn-group").removeClass("open"); |
|
Lines 112-115
$(document).ready(function() {
Link Here
|
| 112 |
alertNoItems(); |
126 |
alertNoItems(); |
| 113 |
}) |
127 |
}) |
| 114 |
.tooltip(); |
128 |
.tooltip(); |
|
|
129 |
|
| 130 |
$(".addtolist").on("click", function (e) { |
| 131 |
e.preventDefault(); |
| 132 |
var shelfnumber = $(this).data("shelfnumber"); |
| 133 |
if ($(this).hasClass("morelists")) { |
| 134 |
openWindow('/cgi-bin/koha/virtualshelves/addbybiblionumber.pl?biblionumber=' + biblionumber); |
| 135 |
} else if ($(this).hasClass("newlist")) { |
| 136 |
openWindow('/cgi-bin/koha/virtualshelves/addbybiblionumber.pl?newshelf=1&biblionumber=' + biblionumber); |
| 137 |
} else { |
| 138 |
openWindow('/cgi-bin/koha/virtualshelves/addbybiblionumber.pl?shelfnumber=' + shelfnumber + '&confirm=1&biblionumber=' + biblionumber); |
| 139 |
} |
| 140 |
}); |
| 141 |
|
| 115 |
}); |
142 |
}); |
| 116 |
- |
|
|