Skip to content
Permalink
Browse files
Add ability to stop closing action by return false in a close filter …
…function. #fix 180
  • Loading branch information
nyroDev committed Oct 16, 2014
1 parent adce13c commit d42cd1f
Showing 1 changed file with 7 additions and 3 deletions.
@@ -237,16 +237,20 @@ jQuery(function($, undefined) {
// Internal function for closing a nyroModal
// Will call 'close' callback filter
_close: function() {
var ret = true;
if (!this._animated) {
this.getInternal()._removeStack(this.opener);
this._opened = false;
this._open = false;
this._callFilters('close');
return true;
$.each(this._callFilters('close'), function(k, v) {
if (v === false)
ret = false;
});
} else {
this._needClose = true;
ret = false;
}
return false;
return ret;
},
// Public function for closing a nyroModal
close: function() {

0 comments on commit d42cd1f

Please sign in to comment.