Skip to content

Commit

Permalink
dialog: refactor Dialog#overlay()
Browse files Browse the repository at this point in the history
  • Loading branch information
tj committed Jul 11, 2012
1 parent a955cb9 commit c9db5de
Showing 1 changed file with 13 additions and 8 deletions.
21 changes: 13 additions & 8 deletions lib/components/dialog/dialog.js
Expand Up @@ -144,14 +144,19 @@ Dialog.prototype.modal = function(){

Dialog.prototype.overlay = function(){
var self = this;
this._overlay = ui
.overlay({ closable: true })
.on('hide', function(){
self.closedOverlay = true;
self.hide();})
.on('close', function(){
self.emit('close');
});
var overlay = ui.overlay({ closable: true });

overlay.on('hide', function(){
self.closedOverlay = true;
self.hide();
});

overlay.on('close', function(){
self.emit('close');
});

this._overlay = overlay;

return this;
};

Expand Down

0 comments on commit c9db5de

Please sign in to comment.