From 9bc3f3cf304c300c758743f2e460beb1fee3ecac Mon Sep 17 00:00:00 2001 From: kondou Date: Sat, 1 Mar 2014 02:46:27 +0100 Subject: Scrutinizer cleanup --- core/js/jquery.ocdialog.js | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) (limited to 'core/js/jquery.ocdialog.js') 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'); -- cgit v1.2.3