diff --git a/themes/bootstrap/js/cart.js b/themes/bootstrap/js/cart.js index fd456bc761bc1c63ff43dd31daf6cc19dc2f22c9..f5149c11b1d28ca06419378fa4f2cf991b06c0fb 100644 --- a/themes/bootstrap/js/cart.js +++ b/themes/bootstrap/js/cart.js @@ -249,7 +249,7 @@ $(document).ready(function() { }); return false; }); - Lightbox.addCloseAction(function() { + $('#modal').on('hidden', function(e) { // Update cart items (add to cart, remove from cart, cart lightbox interface) var cartCount = $('#cartItems strong'); if(cartCount.length > 0) { diff --git a/themes/bootstrap/js/lightbox.js b/themes/bootstrap/js/lightbox.js index 1df725df4fedd61fd41040a4755c6d37290a415f..5e4ba92fe632438130fa18524a5c5cce4a4dad3d 100644 --- a/themes/bootstrap/js/lightbox.js +++ b/themes/bootstrap/js/lightbox.js @@ -13,7 +13,6 @@ var Lightbox = { XHR: false, // Used for current in-progress XHR lightbox request openStack: [], // Array of functions to be called after changeContent or the lightbox event 'shown' closeStack: [], // Array of functions to be called and cleared after the lightbox event 'hidden' - closeStackPerm: [],// Array of functions to be called after the lightbox event 'hidden' formHandlers: [], // Full custom handlers for forms; by name formCallbacks: [], // Custom functions for forms, called after .submit(); by name @@ -45,12 +44,6 @@ var Lightbox = { addCloseAction: function(func) { this.closeStack.push(func); }, - /** - * Register permanent close event handlers - */ - addPermanentCloseAction: function(func) { - this.closeStackPerm.push(func); - }, /** * For when you want to handle that form all by yourself * diff --git a/themes/bootstrap3/js/cart.js b/themes/bootstrap3/js/cart.js index c0942d8674470a591f51f6bcb9bf99ed0688c67c..0b53236b774de3faecfc0c44dc7a5155aefe25bf 100644 --- a/themes/bootstrap3/js/cart.js +++ b/themes/bootstrap3/js/cart.js @@ -249,7 +249,7 @@ $(document).ready(function() { }); return false; }); - Lightbox.addPermanentCloseAction(function() { + $('#modal').on('hidden.bs.modal', function() { // Update cart items (add to cart, remove from cart, cart lightbox interface) var cartCount = $('#cartItems strong'); if(cartCount.length > 0) { diff --git a/themes/bootstrap3/js/lightbox.js b/themes/bootstrap3/js/lightbox.js index f50be405d2dd9fe614a502ef19dc6bd780a25406..4037500959fa6ca39dc020e0e9cfe77db9e489b0 100644 --- a/themes/bootstrap3/js/lightbox.js +++ b/themes/bootstrap3/js/lightbox.js @@ -13,7 +13,6 @@ var Lightbox = { XHR: false, // Used for current in-progress XHR lightbox request openStack: [], // Array of functions to be called after changeContent or the lightbox event 'shown' closeStack: [], // Array of functions to be called and cleared after the lightbox event 'hidden' - closeStackPerm: [],// Array of functions to be called after the lightbox event 'hidden' formHandlers: [], // Full custom handlers for forms; by name formCallbacks: [], // Custom functions for forms, called after .submit(); by name @@ -45,12 +44,6 @@ var Lightbox = { addCloseAction: function(func) { this.closeStack.push(func); }, - /** - * Register permanent close event handlers - */ - addPermanentCloseAction: function(func) { - this.closeStackPerm.push(func); - }, /** * For when you want to handle that form all by yourself * @@ -134,10 +127,6 @@ var Lightbox = { closeActions: function() { Lightbox.shown = false; Lightbox.openingURL = false; - // permanent close actions - for(var i=Lightbox.closeStackPerm.length;i--;) { - Lightbox.closeStackPerm[i](); - } // Clean out stack while(Lightbox.closeStack.length > 0) { var f = Lightbox.closeStack.pop();