NyroModal v2 :: jQuery Plugin
Edito
Designers seem to like using modal windows more and more, as they provide a quick way to show
data without reloading the entire page. It's easy to use and easy to design.
The big problem I experienced with every plugin I tried either using Prototype/Scriptaculous
or jQuery is the customization. They say you can do whatever you want simply but that's not
fully true. The default CSS works fine, but most of time it's a mix between required elements
and optional. That mean you have to be very careful when editing it.
The other problem is the animation. That's the worst point. I never found one plugin
allowing to redefine easily the animations.
I tried to solve these problems with my plugin. I documented everything possible. Regarding the animations, you can simply redefine them from A to Z.
Thanks to the useful jQuery function like animate or fadeTo it's pretty simple.
nyroModal v2 now works with filters that let you define totally new possibilities for the plugin about the way it should work.
like in the version 1, you still have a bunch of callbacks that you can define in many different places.
Enough talk, let's try it and learn it!
Features
- Ajax Call
- Ajax Call with targeting content
- Single Image
- Images Gallery with arrow navigating
- Gallery with any kind of content
- Form
- Form in iframe
- Form with targeting content
- Form with file upload
- Form with file upload with targeting content
- Dom Element
- Manual Call
- Iframe
- Stacked Modals
- Many embed element through Embed.ly API / Demos
- Error handling
- Modal will never goes outside the view port
- Esc key to close the window
- Customizable animation
- Customizable look
- Modal title
- W3C valid HTML (Transitionnal)
Demos
Show All Codes
Ajax
Ajax Filtering Content #test
Ajax Filtering Content #blabla
<a href="demoSent.php" class="nyroModal">Ajax</a> <a href="demoSent.php#test" class="nyroModal">Ajax Filtering Content #test</a> <a href="demoSent.php#blabla" class="nyroModal">Ajax Filtering Content #blabla</a> <script type="text/javascript"> $(function() { $('.nyroModal').nyroModal(); }); </script>
<a href="demoSent.php" class="nyroModal" rev="modal">Ajax without closing</a> <script type="text/javascript"> $(function() { $('.nyroModal').nyroModal(); }); </script>
<a href="img/img2.jpg" class="nyroModal" title="3rd Street Promenade">Image</a> <script type="text/javascript"> $(function() { $('.nyroModal').nyroModal(); }); </script>
Gallery Img 1
Gallery Img 2
Youtube in gallery
Gallery Img 3
<a href="img/img1.jpg" id="imgFiche" class="nyroModal" title="UCLA" rel="gal">Gallery Img 1</a> <a href="img/img2.jpg" class="nyroModal" title="3rd Street Promenade by Night" rel="gal">Gallery Img 2</a> <a href="https://www.youtube.com/watch?v=lddUnv1R5y0" class="nyroModal" rel="gal" title="Hockey Goal fight">Youtube in gallery</a><br /> <a href="img/img3.jpg" class="nyroModal" title="Sunset at Santa Monica" rel="gal">Gallery Img 3</a> <script type="text/javascript"> $(function() { $('.nyroModal').nyroModal(); }); </script>
<a href="#test" class="nyroModal">DOM Element (hidden div)</a> <div id="test" style="display: none; width: 600px;"> <a href="demoSent.php" class="nyroModal">Open a new modal</a><br /> Test </div> <script type="text/javascript"> $(function() { $('.nyroModal').nyroModal(); }); </script>
<a href="https://www.youtube.com/watch?v=lddUnv1R5y0" class="nyroModal">Youtube (Via Embedly filter)</a> <script type="text/javascript"> $(function() { $('.nyroModal').nyroModal(); }); </script>
Manual Call to get an ajax content
Manual Call calling through an other link
<a id="manual1" href="#">Manual Call to get an ajax content</a> <a id="manual2" href="#">Manual Call calling through an other link</a> <form id="myValidForm" method="post" action="demoSent.php"> <input type="text" name="wouhou" /> <input type="submit" value="simple form with validation" /> </form> <script type="text/javascript"> $(function() { $('#manual1').click(function(e) { e.preventDefault(); $.nmManual('demoSent.php'); }); $('#manual2').click(function(e) { e.preventDefault(); $('#imgFiche').nmCall(); }); var validForm = $('#myValidForm').submit(function(e) { e.preventDefault(); if (validForm.find(':text').val() != '') { validForm.nyroModal().nmCall(); } else { alert("Enter a value before going to " + validForm.attr("action")); } }); }); </script>
Automatic Iframe via other hostname
Automatic Iframe via target=_blank
<a href="https://www.perdu.com/" class="nyroModal">Iframe Automatique via other hostname</a> <a href="demoIframe.php" target="_blank" class="nyroModal">Iframe Automatique via target=_blank</a> <script type="text/javascript"> $(function() { $('.nyroModal').nyroModal(); }); </script>
<form method="post" action="demoSent.php" class="nyroModal"> <input type="text" name="wouhou" /> <input type="submit" value="simple form"/> </form> <form method="post" action="demoSent.php" class="nyroModal" target="_blank"> <input type="text" name="wouhou" /> <input type="submit" value="simple form in iframe"/> </form> <form method="post" action="demoSent.php#test" class="nyroModal"> <input type="text" name="wouhou" /> <input type="submit" value="simple form Filtering Content"/> </form> <script type="text/javascript"> $(function() { $('.nyroModal').nyroModal(); }); </script>
<form method="post" enctype="multipart/form-data" action="demoSent.php" class="nyroModal"> <input type="file" name="file" /> <input type="submit" value="form with file"/> </form> <form method="post" enctype="multipart/form-data" action="demoSent.php#blabla" class="nyroModal"> <input type="file" name="file" /> <input type="submit" value="form with file Filtering Content"/> </form> <script type="text/javascript"> $(function() { $('.nyroModal').nyroModal(); }); </script>
Non existent URL
Non existent Image
Non existent Element ID
Non existent Element ID in Ajax Request
<a href="invalidUrl.php" class="nyroModal">Non existent URL</a><br /> <a href="invalidUrl.jpg" class="nyroModal">Non existent Image</a><br /> <a href="#inexistent" class="nyroModal">Non existent Element ID</a><br /> <a href="demoSent.php#inexistent" class="nyroModal">Non existent Element ID in Ajax Request</a> <script type="text/javascript"> $(function() { $('.nyroModal').nyroModal(); }); </script>
Preloading Images is not considered to be a part of the plugin, as you probably need to preload other images for your website.
If you need to do so, you can use this code.
<script type="text/javascript"> $(function() { function preloadImg(image) { var img = new Image(); img.src = image; } preloadImg('img/ajaxLoader.gif'); preloadImg('img/prev.gif'); preloadImg('img/next.gif'); }); </script>
Usage
The plugin provide some functions to work with it:
- nyroModal(); is the basic function to set the click or submit function. To add the nyroModal functionnality to all links containing in #container, you'll do:
$('#container a').nyroModal();
Think it's too long? nyroModal comes with a shortcut for this exact same function, nm();. So you could also do:$('#container a').nm();
As all jQuery plugin, the chain is not broken. That mean you can use it like all other jQuery functions. You can also set the settings as an object parameter to overwrite the default parameter. - nmDestroy(); to remove all elements added by nyroModal (only for closed modal).
- nmCall(); will execute the same action like a click in a real link or a submit form. You can simulate an user click or create your modal content. See demos to better understand. If you read the code of this nmCall function, you'll see that it simply trigger a nyroModal event like. So doing the calling trigger('nyroModal') will do exactly the same.
- $.nmManual(url, options); let you, as you imagine, open a nyroModal with a single line. Link filter required.
- $.nmData(data, options); let you, as you imagine, open a nyroModal by defining your content a single line. Link filter and data filter required.
- $.nmTop(); will give you the modal at the very top of the screen. To close it, you will do:
$.nmTop().close();
In order to work, you will have to:
- Include nyroModal.css stylesheet
- Include jQuery
- Include jquery.nyroModal.js javaScript
- Include jquery.nyromodal-ie6.js javascript for IE 6 compatibility. You have to include it with conditionnal comment.
- Bind your elements to be nyroModal ready
All the needed stuff in a few lines:
<link rel="stylesheet" href="styles/nyroModal.css" type="text/css" media="screen" /> <script src="//code.jquery.com/jquery-1.11.1.min.js"></script> <script type="text/javascript" src="js/jquery.nyroModal.custom.js"></script> <!--[if IE 6]> <script type="text/javascript" src="js/jquery.nyroModal-ie6.min.js"></script> <![endif]--> <script type="text/javascript"> $(function() { $('.nyroModal').nyroModal(); }); </script>
Overwritting nyroModal
You can overwrite absolutely all nyroModal functions using:
- $.nmObj(opts); to overwite the nnObject properties or function
- $.nmInternal(opts); to overwrite internal function such as calculate the size.
- $.nmAnims(opts); to overwrite animations set or overwite exting ones
- $.nmFilters(opts); to overwrite or add filters (see below)
Filters
Filters are used to provide many basics functionnality like Ajax download, but it alos let you the ability to fully customize the way nyroModal work, by adding as many callbacks as you need.
A filter is a set function that will be called by nyroModal core at many differents points. These functions call be used to do everything needed to make the modal work as you excpet or to add others behaviors needed for your projet: add some elements inside the modal, updating your page content, add some Ajax call, etc...
Here is how filters works:
- When $('element').nyroModal(); is called, the nyroModal object is created and attached to the DOM element instancied
-
Every available filters are tested again the nyroModal object using the is function
- If this function returns true, the filters will be used all the time for this element.
- If it returns false, the filters will not be used anymore for this element.
-
nyroModal core calls every init function of every filters selected for the element
- These init function should bind the event they need, create their own object if needed.
- If the filters need to be the one used to load the content, the loadFilter setting of the nyroModal ovject should be defined to its name.
Througout the living of nyroModal, every function or callback defined in all selected filters will be called (see the list below)
All function or callbacks receive the same nyroModal object as a unique parameter.
The list of all function or callback that can be called in a filter:
- is: should return true or false to select the filter for the current or element or not. This function is REQUIRED !
- initFilters: called just after every filters have been determined to use or not, and just before the init of them. Good place to force filters.
- init: called at the very beggining of the process. This function should bind element or create object needed later
- initElts: called at the beggining of the open process, juste before the load start. After that, all the needed div are created and attached to the DOM
- load: called only for ONE filter defined in nm.loadFilter attribute. This function should load the function and set it's content using the _setCont function
- filledContent: called once the content is placed on the hidden div
- error: called in case of error (URL not founr for example)
- size: called after the size has been defined
- close: called at the end of the closing process, regarding only the data (useful for gallery)
- beforeClose: called at the beggining of the closing process, regarding the animation
- afterClose: called at the end of the closing process, regarding the animation
- keyHandle: called when a key is hit if the keyHandle is enable and if the modal is on the top
- destroy: called when nmDestroy is called, it should unbind events that it added and remove all extra elements the filter added
Like the version 1, there is a bunch of others callback that you can define before and after every animation. The version 2 put it in a new way by letting you the ability to define a function before and after every animation function.
- beforeShowBg: called just before the showBg animation
- afterShowBg: called just after the showBg animation
- beforeHideBg: called just before the hideBg animation
- afterHideBg: called just after the hideBg animation
- beforeShowLoad: called just before the showLoad animation
- afterShowLoad: called just after the showLoad animation
- beforeHideLoad: called just before the hideLoad animation
- afterHideLoad: called just after the hideLoad animation
- beforeShowCont: called just before the showCont animation (also called in case of a transition, before beforeHideTrans)
- afterShowCont: called just after the showCont animation (also called in case of a transition, after afterHideTrans)
- afterReposition: called just after the .nmRepositon have been placed
- afterUnreposition: called just after the .nmRepositon have been replaced on their initial positions
- beforeHideCont: called just before the hideCont animation
- afterHideCont: called just after the hideCont animation
- beforeShowTrans: called just before the showTrans animation (transition)
- afterShowTrans: called just after the showTrans animation (transition)
- beforeHideTrans: called just before the hideTrans animation (transition)
- afterHideTrans: called just after the hideTrans animation (transition)
- beforeResize: called just before the resize animation
- afterresize: called just after the resize animation
nyroModal automatically add 2 filters for every elements:
- basic: used to provide basic functionnality. This filter shouldn't be modified unless you know exactly what you're doing
- custom: This filter has absolutely no programming. It's added here juste to provide a quick way to add your filters callback
There is some some basic filters that you can use on your project that enable the basic usage of this kind of plugin. Here is a list of the filters officially provided:
- Title: Show the title for the modal using the title attribute of the opener element
- Gallery: Enable arrows and navigation keys trough the element with the same rel attribute defined in the DOM (depends on title)
- Link: Bind an anchor element and load the target using Ajax to retrieve content
- Dom: Instead of using Ajax, it get the content within the page using an id. (exemple link : <a href="#myContent"></a>) (depends on link)
- Image: Show an image, and resize it if needed (depends on link)
- SWF: Show a SWf animation (depends on link)
- Form: Bind a form and load the target by sending it's data trhough Ajax
- Form file: Same as Form but used when form should send file
- Iframe: Used to show data from an other domain name or when target="_blank" is present (depends on link)
- Iframe form: Used to open a form in an iframe (depends iframe)
- Embedly: Used to show a bunch of different element using embedly API (Examples) (depends on link)
Using callbacks
To use callback, you can: define tour own filter, using the custom filter by adding the callback function you need
- define your own filter, enabling it when needed and write the callback you need
- use the custom filter which is enabled everytime and use the $.nmFilters(); function to add the callback you need
- define your callbacks in the callbacks settings for the nyroModal object. You can do this using the $.nmObj(); function for every nyroModal object or in the nyroModal parameter for activating them on specific links
Misc
When using the gallery modal, you can use these code:
$.nmTop()._callFilters('galleryNext')
to go to the next element.$.nmTop()._callFilters('galleryPrev')
to go to the previous element.
When you open a modal using an Ajax request, the scripts included in the loaded page are executed folowing these rules:
- If the modal is a targeting content, only the scripts inside this element are executed
- If the modal isn't targeting:
- All the inline script are executed
- The scripts with a src attribute loading a javascript file are loaded only if the attribute rel="forceLoad" is here. This avoid the reload of jQuery for example
Embed.ly
nyroModal uses the great Embed.ly API in order to show videos form many different websites.
To use this feature in nyroModal, you have to include the embed.ly filter first, and then set your API key.
If your API key is not set, nyroModal will simply ignore the Embed.ly filter.
To set your API key, is a simple single line of code that should be placed after including the nyroModal files, and before the initialization of links.
<script type="text/javascript"> $(function() { $.nmObj({embedly: {key: 'YOUR EMBED.LY KEY'}}); }); </script>
To create your free API key, go to the embed.ly sign up page
Caching embed.ly results
When you have a lots of embed.ly calls, you may rich the free API limit (that's actually the case of nyroModal).
To fix this problem, we can use a server-side script to retrieve the API result, store on it on the server, and send it to the user.
We created a simple PHP script to do so. You can get it on github.
To use it, simply place this script on your server and configure it regarding your needs. Finally, you have to indicates to nyroModal that the URL to use
is a local URL. You can do it with:
<script type="text/javascript"> $(function() { $.nmObj({ embedlyUrl: 'embedlyProxy.php', embedly: {key: 'php'} }); }); </script>
The key still have to be set to work. In this case, it will be defined in the PHP.
nmObject
nmObject or nyroModal Object is an object associated with every DOM element that are nyroModal enabled. This object is stored with the jQuery data function with the name of nmObj in the opner element.
This object provides many function useful for the life of the modal: resizing, closing, calling filters callbacks, etc...
You can overwrite or add more functionnality to this object using the $.nmObj(options); function, or when initializing the nyroModal with nyroModal(options); function
(or its synonymous: nm(options);).
Here is the list of all parameter in this object:
filters: [], // List of filters used callbacks: {}, // Sepcific callbacks anims: {}, // Sepcific animations functions loadFilter: undefined, // Name of the filter used for loading enabled: true, // Indicates if it's enabled or not modal: false, // Indicates if it's a modal window or not closeOnEscape: true, // Indicates if the modal should close on Escape key closeOnClick: true, // Indicates if a click on the background should close the modal useKeyHandler: false, // Indicates if the modal has to handle key down event showCloseButton: true, // Indicates if the closeButonn should be added closeButton: '<a href="#" class="nyroModalClose nyroModalCloseButton nmReposition" title="close">Close</a>', // Close button HTML stack: false, // Indicates if links automatically binded inside the modal should stack or not nonStackable: 'form', // Filter to not stack DOM element header: undefined, // header include in every modal footer: undefined, // footer include in every modal galleryLoop: true, // Indicates if the gallery should loop galleryCounts: true, // Indicates if the gallery counts should be shown ltr: true, // Left to Right by default. Put to false for Hebrew or Right to Left language. Used in gallery filter domCopy: false, // Indicates if DOM element should be copied or moved imageRegex: '[^\.]\.(jpg|jpeg|png|tiff|gif|bmp)\\s*$', // Regex used to detect image link swfObjectId: undefined, // Object id for swf object swf: { // Default SWF attributes allowFullScreen: 'true', allowscriptaccess: 'always', wmode: 'transparent' }, store: {}, // Storage object for filters. errorMsg: 'An error occured', // Error message elts: { // HTML elements for the modal all: undefined, bg: undefined, load: undefined, cont: undefined, hidden: undefined }, sizes: { // Size information initW: undefined, // Initial width initH: undefined, // Initial height w: undefined, // width h: undefined, // height minW: undefined, // minimum width minH: undefined, // minimum height maxW: undefined, // maximum width maxH: undefined, // maximum height wMargin: undefined, // Horizontal margin hMargin: undefined // Vertical margin }, anim: { // Animation names to use def: undefined, // Default animation set to use if sspecific are not defined or doesn't exist showBg: undefined, // Set to use for showBg animation hideBg: undefined, // Set to use for hideBg animation showLoad: undefined, // Set to use for showLoad animation hideLoad: undefined, // Set to use for hideLoad animation showCont: undefined, // Set to use for showCont animation hideCont: undefined, // Set to use for hideCont animation showTrans: undefined, // Set to use for showTrans animation hideTrans: undefined, // Set to use for hideTrans animation resize: undefined // Set to use for resize animation }, _open: false, // Indicates if the modal is open _bgReady: false, // Indicates if the background is ready _opened: false, // Indicates if the modal was opened (useful for stacking) _loading: false, // Indicates if the loading is shown _animated: false, // Indicates if the modal is currently animated _transition: false, //Indicates if the modal is in transition _needClose: false, // Indicates if the modal should close after current animation _nmOpener: undefined, // nmObj of the modal that opened the current one in non stacking mode _nbContentLoading: 0, // Counter for contentLoading call _scripts: '', // Scripts tags to be included _scriptsShown: '', //Scripts tags to be included once the modal is swhon
With this bunch of settings, there is also many function:
// save the object in data saveObj: function() {}, // Open the modal open: function() {}, // Resize the modal according to sizes.initW and sizes.initH // Will call size function // @param recalc boolean: Indicate if the size should be recalaculated (useful when content has changed) resize: function(recalc) {}, // Update sizes element to not go outsize the viewport. // Will call 'size' callback filter size: function() {}, // Get the nmObject for a new nyroModal getForNewLinks: function() {}, // Indicate if an element can be stackable or not, regarding the nonStackable setting isStackable: function(elt) {}, // key handle function. // Will call 'keyHandle' callback filter keyHandle: function(e) {}, // Get the internal object getInternal: function() {}, // Internal function for closing a nyroModal // Will call 'close' callback filter _close: function() {}, // Public function for closing a nyroModal close: function() {}, // Init HTML elements _initElts: function() {}, // Trigger the error // Will call 'error' callback filter _error: function() {}, // Set the HTML content to show. // - html: HTML content // - selector: selector to filter the content // Will init the size and call the 'size' function. // Will call 'filledContent' callback filter _setCont: function(html, selector) {}, // Filter an html content to remove the script[src] and store them appropriately if needed // - data: Data to filter _filterScripts: function(data) {}, // Check if the nmObject has a specific filter // - filter: Filter name _hasFilter: function(filter) {}, // Remove a specific filter // - filter: Filter name _delFilter: function(filter) {}, // Call a function against all active filters // - fct: Function name // return an array of all return of callbacks; keys are filters name _callFilters: function(fct) {}, // Call a filter function for a specific filter // - f: Filter name // - fct: Function name // return the return of the callback _callFilter: function(f, fct) {}, // Call animation callback. // Will also call beforeNNN and afterNNN filter callbacks // - fct: Animation function name // - clb: Callback once the animation is done _callAnim: function(fct, clb) {}, // Load the content // Will call the 'load' function of the filter specified in the loadFilter parameter _load: function() {}, // Show the content or the loading according to the current state of the modal _contentLoading: function() {}, // Write the content in the modal. // Content comes from the hidden div, scripts and eventually close button. _writeContent: function() {}, // Reposition elements with a class nmReposition _reposition: function() {}, // Unreposition elements with a class nmReposition // Exaclty the reverse of the _reposition function _unreposition: function() {}
Download
nyroModal is licensed under the MIT License.
nyroModal is hosted on Github.
Download the last release
Create your own build
Changelog
- Commit b7ae3accf7634cc79a24dc3c6024cbb1f614b462 (10/17/2014)
- Add trigger event for every callFilter. Fix #246
- Example usage on the issue 246
- Commit bf989cec1c9078d6da88183da20e655bb3bc7c6d (10/17/2014)
- Improve _debug function. Fix #234. Thanks to Blackskyliner
- Commit 0f97d928849c52ee73455813201bb60decfb97c5 (10/16/2014)
- Fix imageregex. #216. Thanks to jhollingerAndCulture
- Commit d42cd1f307e6fadab776a1ba319343baad845b7c (10/16/2014)
- Add ability to stop closing action by return false in a close filter function. #fix 180
- Example usage on the issue 180
- Commit cb6b4c073fa07fd700a059c023d9283d7168daeb (10/15/2014)
- Don't bind click on bg on initElts, do it on afterShowCont callback. Fix #176 #149
- Commit 3864084aea5387370518e9bc3e97f83c42f1db91 (10/15/2014)
- Add needClose to be able to close modal after current animation. Fix #169
- Commit 0d162edcdfd3d4e47fb7e778f2347ba62b505c97 (10/15/2014)
- Fix repostionning modal when the open doesn't exists anymore #168
- Commit d5d7a1657619dc8508b2943bc30e60420539cc6b (02/21/2014)
- Add maxH and maxW settings to limit the size of the modal. Thanks to Blackskyliner
- Commit 157d28c3369559c3fa588acbab508d291b6cc7d7 (01/05/2014)
- Change ucfirst to $.ucfirst. Thanks to Baris Aydinoglu
- Commit 5a243fcb35eb7e270c0f9c8a633f4eb1523b190c (04/10/2013)
- Add enabled settings.
- Commit 61895b6ee8cb543cfdaa17d703ec6bcd338fec5f (01/16/2013)
- Compatibilty for jQuery 1.9 : replace error call with on('error').
- Commit 1d6f4f5ed33e6d91cf102e3fb93cb9d2d6f37355 (01/16/2013)
- Remove $.browser call to work with jQuery 1.9. fix #209
- Commit 5f67fde3f88aa2b5c5fb74f9fdbb87bc6540106c (01/16/2013)
- remove _scrollWidth function as it's not used anywhere
- Commit 1ff104065fb155520ad2c6e52ec1753473ae7bf0 (10/21/2012)
- Refactor Ajax features and add ajax setting in nmObj
- Commit 2a1e1af374f67a00730bd76f32e9f211a898c658 (10/21/2012)
- Reinitiliaze to scrollTo 0 when showing new contents. Fix #164
- Commit 3a2e1f043a243e4cfea600c1994471742cc31ef8 (10/21/2012)
- Add nmDestroy function and all needed destroy function in filters fix #136
- Commit d5da14458ef0b44a3216abf43384b42f9a79c5be (10/21/2012)
- Apply bug fix #126
- Commit e5e8895b53821d3c02b98a21243f2e5f163f203b (10/21/2012)
- Add jqXHR parameter for error callback for form and link filter. Fix #125
- Commit 35ad2079c275a2bc2d05fd68d697b2893fc36a3e (10/21/2012)
- Add ability to set animations function for individual nmObj. #fix 122
- Add domCopy commentary
- Commit bb67c0e30deb46e6cce42dd91159fa38776317cb (10/21/2012)
- Add domCopy setting for DOM filter. Fix #118
- Commit f0430bbbced473cda3858f9c45d005fa1fc674a8 (10/21/2012)
- Complete review for creating DOM element.
- Fix error with embedly and iframe filters
- Commit 5b2cddc4856ccedbbff278fe30a6fb356934391e (10/19/2012)
- replacing instances of $.curCSS with $.css for compatibility with jQuery 1.8.x
- Commit 15acdbfd58dae7610a5456d80fa2806c9ed4e0d7 (01/19/2012)
- Merge branch 'master' of github.com:nyroDev/nyroModal
- Commit d3a26488ed90d5cc28d376ef1ff006763db9e629 (01/19/2012)
- Use on and off function instead of bind and unbind (jQuery 1.7)
- Commit ed2b2cbc72e1e96bcf83e34efe1bb8c6bfe3bd0d (01/19/2012)
- Add ajax option to the nmObject (pull request from Arun P Johny)
- Commit b12752ee7dcdb1836c2e (09/26/2011)
- Add embedlyUrl option for nmObject in embedLy filter
- Add embedlyProxy.php file to set an exemple how to cache embedly responses
- Commit 9c52b4050b940e9ef26c (09/17/2011)
- Add frameborder attribute in iframe filter. Closes #84
- Commit 7372b8b260fa56ca5922 (09/17/2011)
- Fix IE7 bug with a coma in embedly filter
- Commit 74fa17309af53ce3a201 (09/17/2011)
- Update Embedly filter
- Commit a771d6237dc7c3a278f6 (05/07/2011)
- Add nonStackable setting for nmObject
- Add isStackable function for nmObject
- Use this new setting to create the new nmObject for element binded in a modal
- Commit b4a65e2f89b517800a31 (06/13/2011)
- Add CSS Rule for image. Closes #53
- Commit 1b7000d8ef28dbf3626d (05/05/2011)
- Add missing coma in gallery filter
- Commit f9e23ba5646a0fa3fd7b (04/16/2011)
- Add debug value in the _internal object in order to disable the debug logging. Closes #79
- Disable the debug logging by default
- Update README.md to add information about debug
- Commit 489ebf646cb65457cbac (04/14/2011)
- Fix gallery when closing modal before complete loading. Closes #55
- Fix stack trouble by storing both DOM element and nmObj and in the stack. Closes #66. Closes #71
- Fix nmManual function in IE9. Closes #68
- Do not go in gallery mode when there is only one link with the same rel. Closes #77
- Fix small typo in README.md
- Update embedly Regex
- Commit 3fafa309866755b13976 (02/25/2011)
- Update documentation in Readme file
- Add swfObjectId settings and use it in filters.swf or create an uniq ID. Closes #1
- Add recalc settings for nm.resize function to force the recalculation of the modal. Closes #9 Closes #46
- Fix issue with jQuery 1.5 on IE8 (bogus selector in filters.swf). Closes #34
- Fix stack error when reopening a modal. Closes #14
- Add initFilters callbacks in order to force filters. Closes #28 Closes#37
- Add afterReposition and afterUnreposition callbacks.
- Commit 1048e26d5f9cc4bd6896 (02/14/2011)
- Add data Filter
- Add $.nmData function
- Commit fc10b7972724d7378385 (02/09/2011)
- Add unique ID for iframes
- Commit 8f2a6a44afda25bf8f98 (01/22/2011)
- Add imageRegex parameter in nmObject and use it in image filter
- Fix CSS error
- Add header and footer parameter in nmObject
- Commit ecbfb31512d770b30509 (01/13/2011)
- Stop bubbling events on custom events
- Commit 3af6de1a599d518fce43 (01/10/2011)
- Fix selIndicator not correctly send
- Fix syntax error
- Commit ba819674fd1f3eb35983 (01/09/2011)
- Add sizes.minW and sizes.minH settings
- Commit d6d14e59ffe0320204a0 (01/09/2011)
- Fix stack feature when not enabled
- Version 2.0.0 (01/08/2011)
- Totally rewrite of the code
- Now includes filters, animations and many new possibilities for overwritting or adding functionnalities
- IE6 now supported via script loaded in conditionnal comment
- Now support a lot of embed elements trough Embedly API
- New jQuery selectors: :nyroModal, :nm and :nmOpen
- Stacked ability
- NB: No backward compatibilities for settings or callbacks.
- Version 1.6.2 (02/23/2010)
- Fix IE6 bug (Issue 435)
- Version 1.6.1 (02/15/2010)
- Fix width in IE6 (Issue 403)
- Version 1.6.0 (02/15/2010)
- Version 1.5.5 (11/08/2009)
- Fix visual issue in IE6 (Issue 330)
- Version 1.5.4 (11/08/2009)
- Fix when using ASP ScriptManageur in IE6 (Issue 303)
- Set css.content.overflow to visible instead of hidden when showing an image or a swf (Issue 312)
- Update default PHP files to be HTML, load jQuery from Google, load image from webserver (Issue 316)
- Remove default setting css.content.overflow and place it in default CSS (Issue 345)
- Remove instantiate of settings in setDefaultCurrentSettings (Issue 341)
- Add windowResize setting to disable the autoresize feature (Issue 353)
- Fix visual issue when closing modal with iframe (Issue 359)
- Infinite loop for gallery when galleryLoop setting set to true (Issue 358)
- Fix issue when updating modal setting for background click closing (Issue 366)
- Version 1.5.3 (11/08/2009) (This version didn't live due to mistakes in source file with remaining debug codes)
- Version 1.5.2 (08/14/2009)
- Remove the word 'false' when using iframe (Issue 292)
- Fix titleFromIframe behaviour (Issue 296)
- Improve selection for galleries (Issue 300)
- Don't open modal if the event was prevented (Issue 304)
- Fix background height to cover the whole page in IE6 (Issue 305)
- Fix iframe detection in https environment (Issue 308)
- Version 1.5.1 (07/17/2009)
- Fix double loading with iframe (Issue 246)
- Improve rel attribute for galleries (Issue 241)
- Don't show counter in galleires when there is only one element (Issue 241)
- Fix missing keyword 'var' (Issue 278)
- Load same page for a form without action attribute (Issue 218)
- Fix when using base tag (Issue 248) Thanks to Pragmatec
- forceType works now in every situations (Issue 264)
- Disabling the Enter key reload feature (Issue 271)
- Fix IE8 bug when using iframe in some cases (Issue 281)
- Fix autoresizing iframe (Issue 282)
- addImageDivTitle now set to false by default (as there is the title to show it)
- Version 1.5.0 (05/14/2009)
- Fix title issue in gallery mode (Issue 212)
- Browser detection more precise (Issue 181 and Issue 192)
- Fix IE security alert in SSL with iframe (Issue 242)
- Don't make gallery if rel="nofollow" (Issue 241)
- Don't open external swf in iframe (Issue 235)
- Remove font-family in CSS (Issue 232)
- Improvement: autoresize modal when the window is resized (Issue 221)
- New setting zIndexStart to set the z-index for nyroModal elements (Issue 187)
- New callback setting galleryCounts(nb, total, elts, settings) to add the count in the title in gallery mode. Overwrite it if you don't want the count stuff
- New setting addImageDivTitle to indicate if the div title should be inserted for an image (as the modal title is now here, it will be defined to false by default in the next release) (Issue 204)
- The close button is now inside the wrapper div, which means you could customize it by CSS regarding the content type (Issue 189)
- Version 1.4.1 (02/12/2009)
- Fix bug when clicking on an image (Issue 160)
- Version 1.4.2 (02/19/2009)
- Version 1.4.1 (02/12/2009)
- Fix bug when clicking on an image (Issue 160)
- Version 1.4.0 (02/11/2009)
- Compatibility with jQuery 1.3
- Add gallery mode for any kind of contents; remove the wrapper.gallery settings and add gallery and galleryLinks settings
- Add ability to block only one element (Issue 99)
- Add ability to determine where should be executed a script; by default it's just after the endFillContent callback. You could now execute it just before the endShowContent callback by using the rev="shown" attribute on your scripts tag (Issue 102 and Issue 146)
- Automaticaly resize iframe when it's on the same domain (Issue 110)
- Fix form in iframe with target="_blank"; new type and wrapper created: iframeForm
- Fix deep copy in nyroModalSettings (Issue 40)
- Remove the noAnim script (use jQuery.fx.off instead)
- Version 1.3.1 (11/29/2008)
- Add Modal title (Issue 43)
- Fix bug with form and an action element (Issue 101)
- Fix ajax options bug (Issue 104 and Issue 121)
- Debug function fully overwrittable nyroModalDebug (Issue 104)
- Remote image (Issue 111)
- rtl settings changed to ltr (Issue 118)
- Check doctype and change HTML when needed (Issue 57)
- Version 1.3.0 (10/22/2008)
- Flash settings (Issue 37)
- Fix bug with title attribute with HTML (Issue 45)
- New modal.closing boolean and the contentWrapper isn't hidden after showTransition (Issue 69)
- New rtl setting to change the direction of the key in the gallery mode (Issue 53)
- New callback beforHideContent(elts, settings, callback); (Issue 59)
- extImg setting is replaced by regexImg to use a regexp to set the image mode (Issue 61)
- New modal.started boolean
- $.nyroModalSettings now allows you to edit default settings when the modal isn't started
- forceType setting to be used with nyroModalManual (automaticly removed for next calls)
- All type of modal now works with the url settings in nyroModalManual
- Fix visual bug with image transition
- Fix bug with local content loaded by Ajax (Issue 87)
- Fix loading, error and hiding animation position errors (Issue 91)
- Fix bug with width and height settings (Issue 94)
- Version 1.2.8 (06/24/2008)
- Fix bug with the mousewheel plugin (Issue 29)
- Add the autoSizable setting
- Fix bug with the iframe autosizing by setting autoSizable to false (Issue 31)
- Add a preventive CSS rule for images (Issue 28)
- Add a new alias for nyroModalManual with symply $.nyroModalManual()
- Add a new setting url for the nyroModalManual function to enable the Ajax content (Issue 33)
- Fix many visual issues with IE6
- Fix issue when there is a port in the URL (Issue 34) Thanks to edmond22 for his patch.
- Change the minimum size to 400 by 300 px
- Version 1.2.7 (06/12/2008)
- Version 1.2.6 (06/03/2008)
- Fix bug with hidden content
- Fix bug for settings type content in processHandler
- Version 1.2.5 (06/01/2008)
- Fix bug with ajax request when the current page is an index of the directory (url ends by /)
- Auto resize the modal if one or both dimensions wasn't set (Issue 21)
- Change default settings for width and height to use the new auto resize fetaure
- Add endRemove callback (Issue 14)
- Add $.nyroModalNext and $.nyroModalPrev for the gallery
- Version 1.2.4 (04/30/2008)
- Fix bug with javascript content (Issue 13)
- Do nothing when the modal is already loading or animating
- Don't fix form element in FireFox for image or gallery
- Version 1.2.3 (04/29/2008)
- Fix bug with inline content (Issue 11)
- Version 1.2.2 (04/27/2008)
- Fix Bug when using nyroModalManual (Issue 9)
- Add Form validation to demo
- Stop Event in demo for the manual calls
- Version 1.2.1 (04/26/2008)
- Fix Firefox Bug with the select (Issue 10)
- Fix visual Issue with showTransition
- Remove $.nyroModalResize() function. Use $.nyroModalSettings with width and/or height parameters instead.
- Add ability to update the background color by using $.nyroModalSettings with the bgColor parameter.
- Add updateBgColor animation function to update the background color. To animate the color, be sure to include the color plugin.
- Version 1.2.0 (04/19/2008)
- Add $.nyroModalResize() function, resize animation callback function and endResize callback
- Add wrapper object in the elts object given to the callbacks
- Stop mousewheel if the plugin mousewheel is available
- Fix bug in IE6 when body has position: relative;
- Version 1.1.1 (04/15/2008)
- Fix visual issue occuring only in Firefox on Mac (Thanks to Patrick)
- Fix rel attribute with [ or ] for the gallery
- Version 1.1 (04/12/2008)
- Add showTransition and hideTransition animation callbacks
- Update default CSS for the loading background image
- Version 1.0 (04/11/2008), first release
Support
You could ask in the
Github Page Issues.
If you find a bug or have a suggestion/request which could be useful for everybody, you can report them
in the Github Page Issues.
If you created some improvements or great animations functions, I will be glad to share them. Pleeas use the git feature to make a pull request.