About Features Downloads Getting Started Documentation Events Support GitHub

Love VuFind®? Consider becoming a financial supporter. Your support helps build a better VuFind®!

Site Tools


Warning: This page has not been updated in over over a year and may be outdated or deprecated.
development:architecture:lightbox

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revisionBoth sides next revision
development:architecture:lightbox [2016/04/01 16:39] – [205 Status Code] crhallbergdevelopment:architecture:lightbox [2017/01/04 18:44] – [Form Controls] demiankatz
Line 23: Line 23:
 ===== Form Controls ===== ===== Form Controls =====
  
-**data-lightbox-onsubmit** - Specify a callback by function name, or include JS to be evaluated and run. Callbacks will be passed the event and all of the parsed form data (includes [[http://api.jquery.com/serialize/|json of form data]] and the button clicked). Returning true or false will pass that value to the form. True will submit the form without the lightbox. Returning false will prevent stop the default lightbox actions, in the case where you want to construct your own handler (see cart.js for examples). Returning anything else (though null is preferred) will allow the lightbox to submit the form and handle the output within itself+**data-lightbox-onsubmit** - Specify a callback to be evaluated and run. Callbacks will be passed the event and all of the parsed form data (includes [[http://api.jquery.com/serialize/|json of form data]] and the button clicked). Returning true or false will pass that value to the form. True will submit the form without the lightbox. Returning false will prevent stop the default lightbox actions, in the case where you want to construct your own handler (see cart.js for examples). Returning anything else (though null is preferred) will allow the lightbox to submit the form and handle the output within itself.
- +
-**data-lightbox-onclose** - Specify a callback by function name, or include JS to be evaluated and run when the lightbox closes next.+
  
 +**data-lightbox-onclose** - Specify a callback to be evaluated and run when the lightbox closes next.
  
 +:!: Prior to VuFind 4.0, a callback could be either a function name in the global scope, or a block of Javascript code. VuFind 4.0 and later, the callback MUST be either a function name in the global scope (e.g. myFunction) or a function name within the global VuFind object (e.g. VuFind.myFunction).
 ====== Built-in Stops ====== ====== Built-in Stops ======
  
development/architecture/lightbox.txt · Last modified: 2023/06/07 12:19 by demiankatz