From: Alexander Ebert Date: Mon, 29 Jul 2013 21:19:37 +0000 (+0200) Subject: Fixed support for ENTER-Key X-Git-Tag: 2.0.0_Beta_6~17 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=45f1e6f946489c23692c769d0ee80b2588489cf4;p=GitHub%2FWoltLab%2FWCF.git Fixed support for ENTER-Key --- 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();