|
Lines 1-5
Link Here
|
| 1 |
/* global shortcut delBasket AUDIO_ALERT_PATH Cookies */ |
1 |
/* global shortcut delBasket AUDIO_ALERT_PATH Cookies */ |
| 2 |
/* exported addBibToContext delBibToContext escape_str escape_price openWindow _ removeFocus toUC confirmDelete confirmClone playSound */ |
2 |
/* exported addBibToContext delBibToContext escape_str escape_price openWindow _ removeFocus toUC confirmDelete confirmClone playSound validatePatronSearch */ |
| 3 |
if (KOHA === undefined) var KOHA = {}; |
3 |
if (KOHA === undefined) var KOHA = {}; |
| 4 |
|
4 |
|
| 5 |
function _(s) { |
5 |
function _(s) { |
|
Lines 477-482
$(document).ready(function () {
Link Here
|
| 477 |
e.preventDefault(); |
477 |
e.preventDefault(); |
| 478 |
togglePanel($(this)); |
478 |
togglePanel($(this)); |
| 479 |
}); |
479 |
}); |
|
|
480 |
|
| 481 |
$("#patron_header_search").on("submit", function (e) { |
| 482 |
e.preventDefault(); |
| 483 |
validatePatronSearch($(this)[0]); |
| 484 |
}); |
| 480 |
}); |
485 |
}); |
| 481 |
|
486 |
|
| 482 |
function removeLastBorrower() { |
487 |
function removeLastBorrower() { |
|
Lines 1066-1068
function getScrollto(target, elemid) {
Link Here
|
| 1066 |
} |
1071 |
} |
| 1067 |
return yoffset.top - elem_height - 20; |
1072 |
return yoffset.top - elem_height - 20; |
| 1068 |
} |
1073 |
} |
| 1069 |
- |
1074 |
|
|
|
1075 |
function validatePatronSearch(form) { |
| 1076 |
const searchTerm = form.searchmember.value.trim(); |
| 1077 |
const branchSelected = |
| 1078 |
form.branchcode_filter && form.branchcode_filter.value !== ""; |
| 1079 |
const categorySelected = |
| 1080 |
form.categorycode_filter && form.categorycode_filter.value !== ""; |
| 1081 |
|
| 1082 |
if (!searchTerm && !branchSelected && !categorySelected) { |
| 1083 |
$(form.searchmember) |
| 1084 |
.tooltip({ |
| 1085 |
trigger: "manual", |
| 1086 |
placement: "bottom", |
| 1087 |
title: __("Please enter a card number or name"), |
| 1088 |
}) |
| 1089 |
.tooltip("show"); |
| 1090 |
$(document).on("click", function () { |
| 1091 |
$(form.searchmember).tooltip("hide"); |
| 1092 |
}); |
| 1093 |
return false; |
| 1094 |
} |
| 1095 |
return true; |
| 1096 |
} |