Skip to content

Commit

Permalink
Resolve #210 #204
Browse files Browse the repository at this point in the history
  • Loading branch information
needim committed Sep 22, 2014
1 parent bb3c9b3 commit a890c54
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 3 deletions.
1 change: 1 addition & 0 deletions demo/usingWithModal.html
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@
text : type,
type : type,
dismissQueue: true,
closeWith : ['click', 'backdrop'],
modal : true,
layout : 'topCenter',
theme : 'defaultTheme',
Expand Down
9 changes: 8 additions & 1 deletion js/noty/jquery.noty.js
Original file line number Diff line number Diff line change
Expand Up @@ -171,10 +171,12 @@ if(typeof Object.create !== 'function') {
function() {
self.close.apply(self);
}
)
);
return;
}

this.$bar.dequeue();

if(!this.shown && !this.showing) { // If we are still waiting in the queue just delete from queue
var queue = [];
$.each($.noty.queue, function(i, n) {
Expand Down Expand Up @@ -370,6 +372,11 @@ if(typeof Object.create !== 'function') {
modal.css(notification.options.theme.modal.css);

modal.prependTo($('body')).fadeIn('fast');

if($.inArray('backdrop', notification.options.closeWith) > -1)
modal.on('click', function(e) {
$.noty.closeAll();
});
}
};

Expand Down
9 changes: 8 additions & 1 deletion js/noty/packaged/jquery.noty.packaged.js
Original file line number Diff line number Diff line change
Expand Up @@ -171,10 +171,12 @@ if(typeof Object.create !== 'function') {
function() {
self.close.apply(self);
}
)
);
return;
}

this.$bar.dequeue();

if(!this.shown && !this.showing) { // If we are still waiting in the queue just delete from queue
var queue = [];
$.each($.noty.queue, function(i, n) {
Expand Down Expand Up @@ -370,6 +372,11 @@ if(typeof Object.create !== 'function') {
modal.css(notification.options.theme.modal.css);

modal.prependTo($('body')).fadeIn('fast');

if($.inArray('backdrop', notification.options.closeWith) > -1)
modal.on('click', function(e) {
$.noty.closeAll();
});
}
};

Expand Down
Loading

0 comments on commit a890c54

Please sign in to comment.