From b9d530d3af0c23cd0c8842a1945c81a1588aafed Mon Sep 17 00:00:00 2001 From: Ere Maijala <ere.maijala@helsinki.fi> Date: Mon, 14 Mar 2016 11:31:23 +0200 Subject: [PATCH] Added back parameters to the callback calls. --- themes/bootstrap3/js/lightbox.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/themes/bootstrap3/js/lightbox.js b/themes/bootstrap3/js/lightbox.js index cbb6ed37d28..516984a823a 100644 --- a/themes/bootstrap3/js/lightbox.js +++ b/themes/bootstrap3/js/lightbox.js @@ -191,7 +191,7 @@ VuFind.lightbox = (function() { if ('undefined' !== typeof dataset) { // On submit behavior if ('string' === typeof dataset.lightboxOnsubmit) { - var ret = _evalCallback(dataset.lightboxOnsubmit) + var ret = _evalCallback(dataset.lightboxOnsubmit, event, data); // return true or false to send that to the form // return null or anything else to continue to the ajax if (ret === false || ret === true) { @@ -221,9 +221,9 @@ VuFind.lightbox = (function() { /** * Evaluate a callback */ - var _evalCallback = function(callback, event) { + var _evalCallback = function(callback, event, data) { if ('function' === typeof window[callback]) { - return window[callback](event); + return window[callback](event, data); } else { return eval('(function(event, data) {' + callback + '}())'); // inline code } -- GitLab