diff options
author | Roeland Jago Douma <roeland@famdouma.nl> | 2016-11-16 09:52:11 +0100 |
---|---|---|
committer | Lukas Reschke <lukas@statuscode.ch> | 2016-11-18 12:10:51 +0100 |
commit | e80d3c2a10ddc16e3608faa410ea93afc22750c5 (patch) | |
tree | 1d1dbdde7fa4c1431cf6cd6ff19ebf5fb47ebd07 /core/js/js.js | |
parent | 80abb69b60699f04a3c4bc68a8cb28ec7c9c562b (diff) | |
download | nextcloud-server-e80d3c2a10ddc16e3608faa410ea93afc22750c5.tar.gz nextcloud-server-e80d3c2a10ddc16e3608faa410ea93afc22750c5.zip |
Submit on enter
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
Diffstat (limited to 'core/js/js.js')
-rw-r--r-- | core/js/js.js | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/core/js/js.js b/core/js/js.js index e8f6df4cfa9..4579fe394af 100644 --- a/core/js/js.js +++ b/core/js/js.js @@ -1524,6 +1524,7 @@ OC.PasswordConfirmation = { callback: null, init: function() { + var self = this; this.$form = $('#sudo-login-form'); this.$background = $('#sudo-login-background'); this.$input = this.$form.find('.question'); @@ -1532,6 +1533,11 @@ OC.PasswordConfirmation = { this.$background.on('click', _.bind(this._fadeOut, this)); $('.password-confirm-required').on('click', _.bind(this.requirePasswordConfirmation, this)); this.$submit.on('click', _.bind(this._submitPasswordConfirmation, this)); + this.$input.keyup(function(e) { + if (e.keyCode === 13) { + self._submitPasswordConfirmation(); + } + }); }, requiresPasswordConfirmation: function() { |