diff options
Diffstat (limited to 'core/js/jquery.ocdialog.js')
-rw-r--r-- | core/js/jquery.ocdialog.js | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/core/js/jquery.ocdialog.js b/core/js/jquery.ocdialog.js index e2433f5f980..af32591ce52 100644 --- a/core/js/jquery.ocdialog.js +++ b/core/js/jquery.ocdialog.js @@ -35,11 +35,18 @@ }); $(document).on('keydown keyup', function(event) { - if(event.target !== self.$dialog.get(0) && self.$dialog.find($(event.target)).length === 0) { + if ( + event.target !== self.$dialog.get(0) && + self.$dialog.find($(event.target)).length === 0 + ) { return; } // Escape - if(event.keyCode === 27 && event.type === 'keydown' && self.options.closeOnEscape) { + if ( + event.keyCode === 27 && + event.type === 'keydown' && + self.options.closeOnEscape + ) { event.stopImmediatePropagation(); self.close(); return false; @@ -52,7 +59,10 @@ return false; } // If no button is selected we trigger the primary - if(self.$buttonrow && self.$buttonrow.find($(event.target)).length === 0) { + if ( + self.$buttonrow && + self.$buttonrow.find($(event.target)).length === 0 + ) { var $button = self.$buttonrow.find('button.primary'); if($button) { $button.trigger('click'); |