Skip to content
Permalink
Browse files

Lightbox: Added the ability to use the ajax option from Magnific Popup

Fixes #6925
  • Loading branch information...
Paul Jackson Paul Jackson
Paul Jackson authored and Paul Jackson committed Jul 9, 2015
1 parent aa1c0f1 commit ab8d9ef62258095a58532c0f04523b5cf8ad6445
@@ -6,7 +6,7 @@
"categoryfile": "plugins",
"description": "Display images and other content in a dialog box, either individually or as part of a gallery.",
"altLangPrefix": "lightbox",
"dateModified": "2015-05-28"
"dateModified": "2015-07-09"
}
---
<span class="wb-prettify all-pre hide"></span>
@@ -146,6 +146,8 @@
<tr>
<td><code>wb-open.wb-lbx</code> (v4.0.4+)</td>
<td>Triggered manually:
<pre><code>$( document ).trigger( "open.wb-lbx", items, modal, image, ajax (v4.0.16+) );</code></pre>
<p>The <code>items</code> parameter is required while the <code>modal</code>, <code>image</code> and <code>ajax</code> parameters are optional. Note that the <code>ajax</code> parameter was added in v4.0.16. The following is an example usage:
<pre><code>$( document ).trigger( "open.wb-lbx", [
[
{
@@ -156,7 +158,15 @@
false,
[
"Image 1"
]
],
{
settings: {
type: 'POST',
data: {
foo: 'bar'
}
}
}
]);</code></pre>
</td>
<td>Used to manually open a Lightbox popup. Can be used to load single popups, galleries and modal popups. See <a href="../../../demos/lightbox/lightbox-en.html#examples5">Opening popups through JavaScript</a> for working examples.</td>
@@ -6,7 +6,7 @@
"categoryfile": "plugins",
"description": "Afficher des images et d'autres contenus dans une boîte de dialogue, individuellement ou dans le cadre d'une galerie.",
"altLangPrefix": "lightbox",
"dateModified": "2015-05-28"
"dateModified": "2015-07-09"
}
---
<span class="wb-prettify all-pre hide"></span>
@@ -147,6 +147,8 @@
<tr>
<td><code>wb-open.wb-lbx</code> (v4.0.4+)</td>
<td>Déclenché manuellement :
<pre><code>$( document ).trigger( "open.wb-lbx", items, modal, image, ajax (v4.0.16+) );</code></pre>
<p>Le paramètre <code lang="en">items</code> est obligatoire mais les paramètres <code>modal</code>, <code>image</code> et <code>ajax</code> sont facultatifs. Nota&#160;: Le paramètre <code>ajax</code> a été ajouté en v4.0.16. Voici un exemple d'usage&#160;:
<pre><code>$( document ).trigger( "open.wb-lbx", [
[
{
@@ -157,7 +159,15 @@
false,
[
"Image 1"
]
],
{
settings: {
type: 'POST',
data: {
foo: 'bar'
}
}
}
]);</code></pre>
</td>
<td>Utilisé pour ouvrir un Lightbox manuellement. Peut être utilisé pour afficher des boîtes individuelles, des galeries et des boîtes modales. Voir <a href="../../../demos/lightbox/lightbox-fr.html#examples5">Ouvrir des popups par JavaScript</a> pour des exemples d'application.</td>
@@ -348,7 +348,7 @@ $( document ).on( "click", ".popup-modal-dismiss", function( event ) {
} );

// Event handler for opening a popup without a link
$( document ).on( "open" + selector, function( event, items, modal, title ) {
$( document ).on( "open" + selector, function( event, items, modal, title, ajax ) {
if ( event.namespace === componentName ) {
var isGallery = items.length > 1,
isModal = modal && !isGallery ? modal : false,
@@ -369,7 +369,8 @@ $( document ).on( "open" + selector, function( event, items, modal, title ) {
image: {
titleSrc: titleSrc
},
callbacks: callbacks
callbacks: callbacks,
ajax: ajax
} );
} );

0 comments on commit ab8d9ef

Please sign in to comment.
You can’t perform that action at this time.