When the CCSR theme is enabled, selecting items in the cart and clicking
"place hold" triggers a JavaScript error and fails. This patch adds a
function missing from the CCSR version of basket.js.

To test, apply the patch and clear your browser cache.

- Enable the CCSR theme and put items into the OPAC cart.
- Open the cart, select one or more items, and click "place hold."

The cart should automatically close and the main window should redirect
to the holds screen showing your selections.
---
 koha-tmpl/opac-tmpl/ccsr/en/js/basket.js |   10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/koha-tmpl/opac-tmpl/ccsr/en/js/basket.js 
b/koha-tmpl/opac-tmpl/ccsr/en/js/basket.js
index 115880f..adc0c8f 100644
--- a/koha-tmpl/opac-tmpl/ccsr/en/js/basket.js
+++ b/koha-tmpl/opac-tmpl/ccsr/en/js/basket.js
@@ -397,6 +397,16 @@ function showLess() {
     document.location = loc;
 }
 
+function holdSel() {
+    var items = document.getElementById('records').value;
+    if (items) {
+        parent.opener.document.location = 
"/cgi-bin/koha/opac-reserve.pl?biblionumbers=" + items;
+        window.close();
+    } else {
+        alert(MSG_NO_RECORD_SELECTED);
+    }
+}
+
 function updateBasket(updated_value,target) {
     if(target){
     target.$('#basketcount').html("<span>"+updated_value+"</span>");
-- 
1.7.9.5
_______________________________________________
Koha-patches mailing list
[email protected]
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-patches
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/

Reply via email to