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
Last revisionBoth sides next revision
development:architecture:lightbox [2017/01/04 18:44] – [Form Controls] demiankatzdevelopment:architecture:lightbox [2023/06/07 11:59] – Add script controls and 204 message. emaijala
Line 28: Line 28:
  
 :!: 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). :!: 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).
 +
 +===== Script Controls =====
 +
 +By default lightbox only runs inline scripts, or no scripts at all when it finds a success message and displays only the message (see below for more information).
 +
 +Starting with VuFind 9.1 it's possible to use the following attributes with script tags to indicate that they should be run in lightbox:
 +
 +**data-lightbox-run** - Run the script when the lightbox displays normal content.
 +
 +**data-lightbox-run="always"** - Run the script when the lightbox displays normal content or a success message.
 +
 ====== Built-in Stops ====== ====== Built-in Stops ======
  
Line 42: Line 53:
 ===== A success message is reached ===== ===== A success message is reached =====
 When an .alert-success message is found, it is isolated in the lightbox, representing the end of a path. The lightbox can only be closed or escaped after this (by default). When an .alert-success message is found, it is isolated in the lightbox, representing the end of a path. The lightbox can only be closed or escaped after this (by default).
 +
 +===== 204 Status Code =====
 +If a form results in a 204 status code (No Content), it will immediately close the lightbox.
  
 ===== 205 Status Code ===== ===== 205 Status Code =====
Line 54: Line 68:
 | Lightbox.addOpenAction   | $('#modal').on('shown.bs.modal', function() {}); | | Lightbox.addOpenAction   | $('#modal').on('shown.bs.modal', function() {}); |
 ---- struct data ---- ---- struct data ----
 +properties.Page Owner : 
 ---- ----
  
development/architecture/lightbox.txt · Last modified: 2023/06/07 12:19 by demiankatz