Skip to content
Snippets Groups Projects
Commit b9d530d3 authored by Ere Maijala's avatar Ere Maijala
Browse files

Added back parameters to the callback calls.

parent c05eae38
Branches
Tags
No related merge requests found
...@@ -191,7 +191,7 @@ VuFind.lightbox = (function() { ...@@ -191,7 +191,7 @@ VuFind.lightbox = (function() {
if ('undefined' !== typeof dataset) { if ('undefined' !== typeof dataset) {
// On submit behavior // On submit behavior
if ('string' === typeof dataset.lightboxOnsubmit) { 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 true or false to send that to the form
// return null or anything else to continue to the ajax // return null or anything else to continue to the ajax
if (ret === false || ret === true) { if (ret === false || ret === true) {
...@@ -221,9 +221,9 @@ VuFind.lightbox = (function() { ...@@ -221,9 +221,9 @@ VuFind.lightbox = (function() {
/** /**
* Evaluate a callback * Evaluate a callback
*/ */
var _evalCallback = function(callback, event) { var _evalCallback = function(callback, event, data) {
if ('function' === typeof window[callback]) { if ('function' === typeof window[callback]) {
return window[callback](event); return window[callback](event, data);
} else { } else {
return eval('(function(event, data) {' + callback + '}())'); // inline code return eval('(function(event, data) {' + callback + '}())'); // inline code
} }
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment