|
Lines 50-56
function readCookie(name, wd) {
Link Here
|
| 50 |
for(var i=0;i < cookie_parts.length;i++) { |
50 |
for(var i=0;i < cookie_parts.length;i++) { |
| 51 |
var c = cookie_parts[i]; |
51 |
var c = cookie_parts[i]; |
| 52 |
while (c.charAt(0)==' ') c = c.substring(1,c.length); |
52 |
while (c.charAt(0)==' ') c = c.substring(1,c.length); |
| 53 |
if(c.indexOf(str_name) == 0) return c.substring(str_name.length,c.length); |
53 |
if(c.indexOf(str_name) === 0) return c.substring(str_name.length,c.length); |
| 54 |
} |
54 |
} |
| 55 |
return null; |
55 |
return null; |
| 56 |
} |
56 |
} |
|
Lines 82-88
function openBasket() {
Link Here
|
| 82 |
var optWin = "status=yes,scrollbars=yes,resizable=yes,toolbar=no,location=yes,height="+iH+",width="+iW; |
82 |
var optWin = "status=yes,scrollbars=yes,resizable=yes,toolbar=no,location=yes,height="+iH+",width="+iW; |
| 83 |
var loc = CGIBIN + "basket/basket.pl?" + strCookie; |
83 |
var loc = CGIBIN + "basket/basket.pl?" + strCookie; |
| 84 |
var basket = open(loc, "basket", optWin); |
84 |
var basket = open(loc, "basket", optWin); |
| 85 |
if (window.focus) {basket.focus()} |
85 |
if (window.focus) { basket.focus(); } |
| 86 |
} |
86 |
} |
| 87 |
else { |
87 |
else { |
| 88 |
showCartUpdate(MSG_BASKET_EMPTY); |
88 |
showCartUpdate(MSG_BASKET_EMPTY); |
|
Lines 207-213
function showCartUpdate(msg){
Link Here
|
| 207 |
// set body of popup window |
207 |
// set body of popup window |
| 208 |
$("#cartDetails").html(msg); |
208 |
$("#cartDetails").html(msg); |
| 209 |
showCart(); |
209 |
showCart(); |
| 210 |
setTimeout("hideCart()",2000); |
210 |
setTimeout(hideCart,2000); |
| 211 |
} |
211 |
} |
| 212 |
|
212 |
|
| 213 |
function showListsUpdate(msg){ |
213 |
function showListsUpdate(msg){ |
|
Lines 216-222
function showListsUpdate(msg){
Link Here
|
| 216 |
} |
216 |
} |
| 217 |
|
217 |
|
| 218 |
function selRecord(num, status) { |
218 |
function selRecord(num, status) { |
| 219 |
var str = document.myform.records.value |
219 |
var str = document.myform.records.value; |
| 220 |
if (status){ |
220 |
if (status){ |
| 221 |
str += num+"/"; |
221 |
str += num+"/"; |
| 222 |
} |
222 |
} |
|
Lines 240-246
function delSelRecords() {
Link Here
|
| 240 |
while (!end){ |
240 |
while (!end){ |
| 241 |
s = str.indexOf("/"); |
241 |
s = str.indexOf("/"); |
| 242 |
if (s>0){ |
242 |
if (s>0){ |
| 243 |
num = str.substring(0, s) |
243 |
num = str.substring(0, s); |
| 244 |
str = delRecord(num,str); |
244 |
str = delRecord(num,str); |
| 245 |
str2 = delRecord(num,str2); |
245 |
str2 = delRecord(num,str2); |
| 246 |
} else { |
246 |
} else { |
|
Lines 248-254
function delSelRecords() {
Link Here
|
| 248 |
} |
248 |
} |
| 249 |
} |
249 |
} |
| 250 |
|
250 |
|
| 251 |
if (str2.length == 0) { // equivalent to emptying the basket |
251 |
if (str2.length === 0) { // equivalent to emptying the basket |
| 252 |
var rep = false; |
252 |
var rep = false; |
| 253 |
rep = confirm(MSG_CONFIRM_DEL_BASKET); |
253 |
rep = confirm(MSG_CONFIRM_DEL_BASKET); |
| 254 |
if (rep) { |
254 |
if (rep) { |
|
Lines 267-273
function delSelRecords() {
Link Here
|
| 267 |
|
267 |
|
| 268 |
if (recordsSel) { |
268 |
if (recordsSel) { |
| 269 |
var strCookie = ""; |
269 |
var strCookie = ""; |
| 270 |
var valCookie = readCookie(nameCookie, 1); |
270 |
valCookie = readCookie(nameCookie, 1); |
| 271 |
strCookie = nameParam + "=" + valCookie; |
271 |
strCookie = nameParam + "=" + valCookie; |
| 272 |
var arrayRecords = valCookie.split("/"); |
272 |
var arrayRecords = valCookie.split("/"); |
| 273 |
updateBasket(arrayRecords.length-1,top.opener); |
273 |
updateBasket(arrayRecords.length-1,top.opener); |
|
Lines 302-308
function delRecord (n, s) {
Link Here
|
| 302 |
|
302 |
|
| 303 |
|
303 |
|
| 304 |
function delBasket(context,rep) { |
304 |
function delBasket(context,rep) { |
| 305 |
if (rep == undefined){ |
305 |
if (rep === undefined){ |
| 306 |
rep = confirm(MSG_CONFIRM_DEL_BASKET); |
306 |
rep = confirm(MSG_CONFIRM_DEL_BASKET); |
| 307 |
} |
307 |
} |
| 308 |
if (rep) { |
308 |
if (rep) { |
|
Lines 406-419
function addSelToShelf() {
Link Here
|
| 406 |
/// vShelfAdd() builds url string for multiple-biblio adds. |
406 |
/// vShelfAdd() builds url string for multiple-biblio adds. |
| 407 |
|
407 |
|
| 408 |
function vShelfAdd(biblist) { |
408 |
function vShelfAdd(biblist) { |
| 409 |
bibs = new Array(); |
409 |
bibs = []; |
| 410 |
if(biblist.length > 0) { |
410 |
if(biblist.length > 0) { |
| 411 |
for (var i=0; i < biblist.length; i++) { |
411 |
for (var i=0; i < biblist.length; i++) { |
| 412 |
if (biblist[i].checked) { |
412 |
if (biblist[i].checked) { |
| 413 |
bibs.push("biblionumber=" + biblist[i].value); |
413 |
bibs.push("biblionumber=" + biblist[i].value); |
| 414 |
} |
414 |
} |
| 415 |
} |
415 |
} |
| 416 |
if (bibs.length == 0) { showListsUpdate(MSG_NO_RECORD_SELECTED); } |
416 |
if (bibs.length === 0) { showListsUpdate(MSG_NO_RECORD_SELECTED); } |
| 417 |
return bibs.join("&"); |
417 |
return bibs.join("&"); |
| 418 |
} else { |
418 |
} else { |
| 419 |
if (biblist.checked) { |
419 |
if (biblist.checked) { |
|
Lines 429-435
function showCart(){
Link Here
|
| 429 |
if( scrolld > top ){ |
429 |
if( scrolld > top ){ |
| 430 |
top = scrolld + 15; |
430 |
top = scrolld + 15; |
| 431 |
} |
431 |
} |
| 432 |
var left = position.left |
432 |
var left = position.left; |
| 433 |
$("#cartDetails").css("position","absolute").css("top",top); |
433 |
$("#cartDetails").css("position","absolute").css("top",top); |
| 434 |
$("#cartDetails").css("position","absolute").css("left",left); |
434 |
$("#cartDetails").css("position","absolute").css("left",left); |
| 435 |
$("#cartDetails").fadeIn("fast"); |
435 |
$("#cartDetails").fadeIn("fast"); |
| 436 |
- |
|
|