From 915fd14748d7f5ccd354e16e3b1fbd74763825db Mon Sep 17 00:00:00 2001
From: Chris Hallberg <crhallberg@gmail.com>
Date: Thu, 20 Feb 2014 11:47:41 -0500
Subject: [PATCH] SMS handling. Bootstrap lightbox is facing a big update, get
 ready 2.2.2.

---
 themes/bootstrap/js/lightbox.js                | 4 ++++
 themes/bootstrap/js/record.js                  | 4 ++++
 themes/bootstrap/templates/layout/layout.phtml | 3 ++-
 3 files changed, 10 insertions(+), 1 deletion(-)

diff --git a/themes/bootstrap/js/lightbox.js b/themes/bootstrap/js/lightbox.js
index be8cde3449b..d10c1caeffc 100644
--- a/themes/bootstrap/js/lightbox.js
+++ b/themes/bootstrap/js/lightbox.js
@@ -439,6 +439,10 @@ $(document).ready(function() {
     ajaxLogin(this);
     return false;
   });
+  addLightboxFormHandler('newList', function(evt) {
+    ajaxSubmit($(evt.target), changeModalContent);
+    return false;
+  });
   addLightboxFormHandler('saveRecord', function(evt) {
     ajaxSubmit($(evt.target), function(){lightboxConfirm(vufindString['bulk_save_success']);});
     return false;
diff --git a/themes/bootstrap/js/record.js b/themes/bootstrap/js/record.js
index 575abac71da..8319d739595 100644
--- a/themes/bootstrap/js/record.js
+++ b/themes/bootstrap/js/record.js
@@ -163,6 +163,10 @@ $(document).ready(function(){
     ajaxSubmit($(evt.target), function(){lightboxConfirm(vufindString['bulk_email_success']);});
     return false;
   });
+  addLightboxFormHandler('smsRecord', function(evt) {
+    ajaxSubmit($(evt.target), function(){lightboxConfirm(vufindString['sms_success']);});
+    return false;
+  });
   
   // register the record comment form to be submitted via AJAX
   registerAjaxCommentRecord();
diff --git a/themes/bootstrap/templates/layout/layout.phtml b/themes/bootstrap/templates/layout/layout.phtml
index e6ba55cd615..6b8b3b94eeb 100644
--- a/themes/bootstrap/templates/layout/layout.phtml
+++ b/themes/bootstrap/templates/layout/layout.phtml
@@ -30,7 +30,8 @@
                     'bulk_email_success' => 'bulk_email_success',
                     'bulk_save_success' => 'bulk_save_success',
                     'close' => 'close',
-                    'loading' => 'Loading'
+                    'loading' => 'Loading',
+                    'sms_success' => 'sms_success'
                 )
             );
             if ($cart->isActive()) {
-- 
GitLab