aboutsummaryrefslogtreecommitdiffstats
path: root/core/js/js.js
diff options
context:
space:
mode:
authorRoeland Jago Douma <roeland@famdouma.nl>2016-11-16 09:52:11 +0100
committerLukas Reschke <lukas@statuscode.ch>2016-11-18 12:10:51 +0100
commite80d3c2a10ddc16e3608faa410ea93afc22750c5 (patch)
tree1d1dbdde7fa4c1431cf6cd6ff19ebf5fb47ebd07 /core/js/js.js
parent80abb69b60699f04a3c4bc68a8cb28ec7c9c562b (diff)
downloadnextcloud-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.js6
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() {