From 45f1e6f946489c23692c769d0ee80b2588489cf4 Mon Sep 17 00:00:00 2001 From: Alexander Ebert Date: Mon, 29 Jul 2013 23:19:37 +0200 Subject: [PATCH] Fixed support for ENTER-Key --- wcfsetup/install/files/acp/js/WCF.ACP.js | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/wcfsetup/install/files/acp/js/WCF.ACP.js b/wcfsetup/install/files/acp/js/WCF.ACP.js index c646992f31..4925119d24 100644 --- a/wcfsetup/install/files/acp/js/WCF.ACP.js +++ b/wcfsetup/install/files/acp/js/WCF.ACP.js @@ -543,13 +543,19 @@ WCF.ACP.Package.Installation = Class.extend({ this._purgeTemplateContent($.proxy(function() { var $form = $('
').appendTo($('#packageInstallationInnerContent')); - $('').appendTo($form).click(function() { + var $button = $('').appendTo($form).click(function() { $(this).disable(); window.location = data.redirectLocation; }); $('#packageInstallationInnerContentContainer').show(); + $(document).keydown(function(event) { + if (event.which === $.ui.keyCode.ENTER) { + $button.trigger('click'); + } + }); + this._dialog.wcfDialog('render'); }, this)); @@ -560,7 +566,7 @@ WCF.ACP.Package.Installation = Class.extend({ if (data.innerTemplate) { var self = this; $('#packageInstallationInnerContent').html(data.innerTemplate).find('input').keyup(function(event) { - if (event.keyCode === 13) { // Enter + if (event.keyCode === $.ui.keyCode.ENTER) { self._submit(data); } }); @@ -571,17 +577,11 @@ WCF.ACP.Package.Installation = Class.extend({ this._setIcon('question'); var $form = $('
').appendTo($('#packageInstallationInnerContent')); - var $button = $('').appendTo($form).click($.proxy(function(event) { + $('').appendTo($form).click($.proxy(function(event) { $(event.currentTarget).disable(); this._submit(data); }, this)); - - $(document).keydown(function(event) { - if (event.which === $.ui.keyCode.ENTER) { - $button.trigger('click'); - } - }); } $('#packageInstallationInnerContentContainer').show(); -- 2.20.1