From: Alexander Ebert Date: Mon, 29 Jul 2013 16:35:23 +0000 (+0200) Subject: Supporting "Enter" to submit forms during package installation X-Git-Tag: 2.0.0_Beta_6~19 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=9db0c330856b03f485a9d60f97400efabe848ed9;p=GitHub%2FWoltLab%2FWCF.git Supporting "Enter" to submit forms during package installation --- diff --git a/wcfsetup/install/files/acp/js/WCF.ACP.js b/wcfsetup/install/files/acp/js/WCF.ACP.js index c2c503ccb9..c646992f31 100644 --- a/wcfsetup/install/files/acp/js/WCF.ACP.js +++ b/wcfsetup/install/files/acp/js/WCF.ACP.js @@ -571,11 +571,17 @@ WCF.ACP.Package.Installation = Class.extend({ this._setIcon('question'); var $form = $('
').appendTo($('#packageInstallationInnerContent')); - $('').appendTo($form).click($.proxy(function(event) { + var $button = $('').appendTo($form).click($.proxy(function(event) { $(event.currentTarget).disable(); this._submit(data); - }, this)); + }, this)); + + $(document).keydown(function(event) { + if (event.which === $.ui.keyCode.ENTER) { + $button.trigger('click'); + } + }); } $('#packageInstallationInnerContentContainer').show();