summaryrefslogtreecommitdiffstats
path: root/core/js/jquery.ocdialog.js
diff options
context:
space:
mode:
authorkondou <kondou@ts.unde.re>2014-03-01 02:46:27 +0100
committerkondou <kondou@ts.unde.re>2014-06-02 21:09:41 +0200
commit9bc3f3cf304c300c758743f2e460beb1fee3ecac (patch)
treeea564110fcd3a28caee27af3bf36486d1783cc3e /core/js/jquery.ocdialog.js
parentc88c0b9a13231478c626296d78aac7c1f66d87d9 (diff)
downloadnextcloud-server-9bc3f3cf304c300c758743f2e460beb1fee3ecac.tar.gz
nextcloud-server-9bc3f3cf304c300c758743f2e460beb1fee3ecac.zip
Scrutinizer cleanup
Diffstat (limited to 'core/js/jquery.ocdialog.js')
-rw-r--r--core/js/jquery.ocdialog.js16
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');