Skip to content

Commit

Permalink
Change version to v2.0.0
Browse files Browse the repository at this point in the history
Add comment for all element in nmObject
Add modal parameter in nmObject
Add showCloseButton parameter in nmObject
Add selIndicator parameter
Update embedly Regex
  • Loading branch information
nyroDev committed Dec 30, 2010
1 parent 74f24f4 commit ca9a448
Show file tree
Hide file tree
Showing 14 changed files with 165 additions and 79 deletions.
4 changes: 2 additions & 2 deletions js/jquery.nyroModal-ie6.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
* nyroModal v2.alpha
* for IE6
* nyroModal v2.0.0
* For IE6
*
*/
jQuery(function($, undefined) {
Expand Down
2 changes: 1 addition & 1 deletion js/jquery.nyroModal.anims.fade.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* nyroModal v2.alpha
* nyroModal v2.0.0
*
* Fade animations
*
Expand Down
2 changes: 1 addition & 1 deletion js/jquery.nyroModal.filters.dom.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* nyroModal v2.alpha
* nyroModal v2.0.0
*
* Dom filter
*
Expand Down
5 changes: 3 additions & 2 deletions js/jquery.nyroModal.filters.embedly.js

Large diffs are not rendered by default.

7 changes: 5 additions & 2 deletions js/jquery.nyroModal.filters.form.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* nyroModal v2.alpha
* nyroModal v2.0.0
*
* Form filter
*
Expand All @@ -24,9 +24,12 @@ jQuery(function($, undefined) {
});
},
load: function(nm) {
var data = nm.opener.serializeArray();
if (nm.store.form.sel)
data.push({name: nm.selIndicator, value: nm.store.form.sel});
$.ajax({
url: nm.store.form.url,
data: nm.opener.serializeArray(),
data: data,
type: nm.opener.attr('method') ? nm.opener.attr('method') : 'get',
success: function(data) {
nm._setCont(data, nm.store.form.sel);
Expand Down
22 changes: 17 additions & 5 deletions js/jquery.nyroModal.filters.formFile.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* nyroModal v2.alpha
* nyroModal v2.0.0
*
* Form file filter
*
Expand Down Expand Up @@ -32,7 +32,19 @@ jQuery(function($, undefined) {
});
},
initElts: function(nm) {
function rmIframe() {
var inputSel;
if (nm.store.form.sel)
inputSel = $('<input />', {
'type': 'hidden',
name: nm.selIndicator,
value: nm.store.form.sel
}).appendTo(nm.opener);
function rmFormFileElts() {
if (inputSel) {
inputSel.remove();
inputSel = undefined;
delete(inputSel);
}
nm.store.formFileIframe.attr('src', 'about:blank').remove();
nm.store.formFileIframe = undefined;
delete(nm.store.formFileIframe);
Expand All @@ -46,7 +58,7 @@ jQuery(function($, undefined) {
.unbind('load error')
.contents().find('body').not('script[src]');
if (content && content.html() && content.html().length) {
rmIframe();
rmFormFileElts();
nm._setCont(content.html(), nm.store.form.sel);
} else {
// Not totally ready, try it in a few secs
Expand All @@ -58,11 +70,11 @@ jQuery(function($, undefined) {
.contents().find('body').not('script[src]');
if (content && content.html() && content.html().length) {
nm._setCont(content.html(), nm.store.form.sel);
rmIframe();
rmFormFileElts();
} else if (nbTry < 5) {
setTimeout(fct, 25);
} else {
rmIframe();
rmFormFileElts();
nm._error();
}
};
Expand Down
2 changes: 1 addition & 1 deletion js/jquery.nyroModal.filters.gallery.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* nyroModal v2.alpha
* nyroModal v2.0.0
*
* Gallery filter
*
Expand Down
2 changes: 1 addition & 1 deletion js/jquery.nyroModal.filters.iframe.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* nyroModal v2.alpha
* nyroModal v2.0.0
*
* Iframe filter
*
Expand Down
2 changes: 1 addition & 1 deletion js/jquery.nyroModal.filters.iframeForm.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* nyroModal v2.alpha
* nyroModal v2.0.0
*
* Iframe form filter
*
Expand Down
2 changes: 1 addition & 1 deletion js/jquery.nyroModal.filters.image.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* nyroModal v2.alpha
* nyroModal v2.0.0
*
* Image filter
*
Expand Down
3 changes: 2 additions & 1 deletion js/jquery.nyroModal.filters.link.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* nyroModal v2.alpha
* nyroModal v2.0.0
*
* Link filter
*
Expand All @@ -26,6 +26,7 @@ jQuery(function($, undefined) {
load: function(nm) {
$.ajax({
url: nm.store.link.url,
data: nm.store.link.sel ? {nm.selIndicator: nm.store.link.sel} : undefined,
success: function(data) {
nm._setCont(data, nm.store.link.sel);
},
Expand Down
2 changes: 1 addition & 1 deletion js/jquery.nyroModal.filters.swf.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* nyroModal v2.alpha
* nyroModal v2.0.0
*
* SWF filter
*
Expand Down
2 changes: 1 addition & 1 deletion js/jquery.nyroModal.filters.title.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* nyroModal v2.alpha
* nyroModal v2.0.0
*
* Title filter
*
Expand Down
Loading

0 comments on commit ca9a448

Please sign in to comment.