summaryrefslogtreecommitdiffstats
path: root/core
diff options
context:
space:
mode:
authorraghunayyar <me@iraghu.com>2013-03-25 16:09:35 +0530
committerraghunayyar <me@iraghu.com>2013-03-25 16:09:35 +0530
commit25a869031867f502e5a1cb7b9123306a2b97d6da (patch)
tree52c72edaa04adf353385d3177af9219bd9ecb26a /core
parentd9cd9875e0be3fbadb57d562724f509de9611ab7 (diff)
downloadnextcloud-server-25a869031867f502e5a1cb7b9123306a2b97d6da.tar.gz
nextcloud-server-25a869031867f502e5a1cb7b9123306a2b97d6da.zip
Fixes autofill for display / hide toggle button, a better function name.
Diffstat (limited to 'core')
-rw-r--r--core/js/js.js29
1 files changed, 15 insertions, 14 deletions
diff --git a/core/js/js.js b/core/js/js.js
index 93d4c0a03e5..3f1934241fb 100644
--- a/core/js/js.js
+++ b/core/js/js.js
@@ -637,22 +637,23 @@ $(document).ready(function(){
}
});
- // 'show password' checkbox
-
- var hideToggleBtn = function(input, label) {
+ var setShowPassword = function(input, label) {
// 'show password' checkbox
- input.showPassword().keyup(function(){
- if (input.val().length == 0) {
- label.hide();
- } else {
- label.css("display", "inline").show();
- }
- });
- label.hide();
+ setTimeout(function() {
+ input.showPassword().keyup(function(){
+ if (input.val().length == 0) {
+ label.hide();
+ }
+ else {
+ label.css("display", "inline").show();
+ }
+ });
+ },200);
+ label.hide();
};
- hideToggleBtn($('#password'), $('label[for=show]'));
- hideToggleBtn($('#adminpass'), $('label[for=show]'));
- hideToggleBtn($('#pass2'), $('label[for=personal-show]'));
+ setShowPassword($('#password'), $('label[for=show]'));
+ setShowPassword($('#adminpass'), $('label[for=show]'));
+ setShowPassword($('#pass2'), $('label[for=personal-show]'));
//use infield labels
$("label.infield").inFieldLabels({