Permalink
Browse files

Add imageRegex parameter in nmObject and use it in image filter. #Clo…

…ses #25

Fix CSS error. Closes #19
Add header and footer parameter in nmObject. Closes #13
  • Loading branch information...
1 parent ecbfb31 commit 8f2a6a44afda25bf8f98d6d577b293f4ea0e02f2 @nyroDev committed Jan 22, 2011
Showing with 11 additions and 2 deletions.
  1. +1 −1 js/jquery.nyroModal.filters.image.js
  2. +9 −0 js/jquery.nyroModal.js
  3. +1 −1 styles/nyroModal.css
@@ -12,7 +12,7 @@ jQuery(function($, undefined) {
$.nmFilters({
image: {
is: function(nm) {
- return (new RegExp('[^\.]\.(jpg|jpeg|png|tiff|gif|bmp)\s*$', 'i')).test(nm.opener.attr('href'));
+ return (new RegExp(nm.imageRegex, 'i')).test(nm.opener.attr('href'));
},
init: function(nm) {
nm.loadFilter = 'image';
@@ -25,10 +25,17 @@ jQuery(function($, undefined) {
stack: false, // Indicates if links automatically binded inside the modal should stack or not
+ header: undefined, // header include in every modal
+ footer: undefined, // footer include in every modal
+
+ // Specific confirguation for gallery filter
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
+ // Specific confirguation for image filter
+ imageRegex: '[^\.]\.(jpg|jpeg|png|tiff|gif|bmp)\s*$', // Regex used to detect image link
+
selIndicator: 'nyroModalSel', // Value added when a form or Ajax is sent with a filter content
swf: { // Default SWF attributes
@@ -255,6 +262,8 @@ jQuery(function($, undefined) {
}
this.elts.hidden
.append(this._filterScripts(html))
+ .prepend(this.header)
+ .append(this.footer)
.wrapInner('<div class="nyroModal'+ucfirst(this.loadFilter)+'" />');
// Store the size of the element
@@ -97,6 +97,6 @@
background-position: right 20%;
}
.nyroModalNext:hover {
- background-position: right: 20%;
+ background-position: right 20%;
background-image: url(../img/next.gif);
}

0 comments on commit 8f2a6a4

Please sign in to comment.