Merge branch 'bug_9073' into 3.12-master
authorJared Camins-Esakov <jcamins@cpbibliography.com>
Sun, 25 Nov 2012 23:09:14 +0000 (18:09 -0500)
committerJared Camins-Esakov <jcamins@cpbibliography.com>
Sun, 25 Nov 2012 23:09:14 +0000 (18:09 -0500)
koha-tmpl/opac-tmpl/prog/en/js/basket.js
koha-tmpl/opac-tmpl/prog/en/modules/opac-basket.tt

index 8a0af37..95a59bf 100644 (file)
@@ -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>");
index 35aff0f..90a259e 100644 (file)
@@ -119,16 +119,7 @@ function tagAdded() {
         });
 
     });
-[% IF ( opacuserlogin ) %][% IF ( RequestOnOpac ) %]
-    function holdSel() {
-        var items = document.getElementById('records').value;
-        if (items) {
-            document.location = "/cgi-bin/koha/opac-reserve.pl?biblionumbers=" + items;
-        } else {
-            alert(MSG_NO_RECORD_SELECTED);
-        }
-    }
-[% END %][% END %]
+
 function enableCheckboxActions(){
     // Enable/disable controls if checkboxes are checked
     var checkedBoxes = $(".checkboxed input:checkbox:checked");