From 322f88874694a9e9a38fa75cb8fafbefd85344e9 Mon Sep 17 00:00:00 2001
From: Chris Hallberg <crhallberg@gmail.com>
Date: Wed, 11 Dec 2013 17:07:15 -0500
Subject: [PATCH] Place hold lightbox is not working properly and has been
 temporarily commented out, pending a proper index to test. Sorry, Anna.

---
 themes/bootstrap/js/lightbox.js | 11 ++++++++---
 1 file changed, 8 insertions(+), 3 deletions(-)

diff --git a/themes/bootstrap/js/lightbox.js b/themes/bootstrap/js/lightbox.js
index 9d30579be54..fc238868cd8 100644
--- a/themes/bootstrap/js/lightbox.js
+++ b/themes/bootstrap/js/lightbox.js
@@ -141,6 +141,7 @@ function displayLightboxError(message) {
  * after loading or to be stashed for later when it closes. Default true.
  */
 function getLightboxByUrl(url, post, callback, pop) {
+  // Pop determines if we execute the callback immediately or later
   if(typeof pop === "undefined") pop = true;
   // If we have a callback, push it to the stack
   if(typeof callback !== "undefined") {
@@ -181,7 +182,9 @@ function getLightboxByUrl(url, post, callback, pop) {
  * and pushes the data and callback to the getLightboxByUrl
  */
 function getLightbox(controller, action, get, post, callback, pop) {
+  // Pop determines if we execute the callback immediately or later
   if(typeof pop === "undefined") pop = true;
+  // Build URL
   var url = path+'/AJAX/JSON?method=getLightbox&submodule='+controller+'&subaction='+action;
   if(get && get !== {}) {
     url += '&'+$.param(get);
@@ -469,10 +472,12 @@ $(document).ready(function() {
   $('#loginOptions a').click(function() {
     return getLightbox('MyResearch','Login',{},{'loggingin':true});
   });
-  // Place a Hold
+  /*/ Place a Hold
   $('.placehold').click(function() {
-    return getLightboxByUrl($(this).attr('href'));
-  });
+    var params = deparam($(this).attr('href'));
+    console.log(params);
+    return getLightbox('Record', 'Hold', params, {});
+  });*/
   // Save record links
   $('.save-record').click(function() {
     var parts = this.href.split('/');
-- 
GitLab