aboutsummaryrefslogtreecommitdiffstats
path: root/js
diff options
context:
space:
mode:
authorJan-Christoph Borchardt <JanCBorchardt@fsfe.org>2011-04-19 00:54:36 +0200
committerJan-Christoph Borchardt <JanCBorchardt@fsfe.org>2011-04-19 00:54:36 +0200
commitecd68e0c6e9a1ef4f77f117c9a564f4c99630bab (patch)
tree8c3c913bb095cfe7222d0c7738b0b2ceadf1a196 /js
parent8080a1a5a7690d5901973c0bdc6f7f65768ddf1b (diff)
downloadnextcloud-server-ecd68e0c6e9a1ef4f77f117c9a564f4c99630bab.tar.gz
nextcloud-server-ecd68e0c6e9a1ef4f77f117c9a564f4c99630bab.zip
actually know what to put in which login field
Diffstat (limited to 'js')
-rw-r--r--js/js.js16
1 files changed, 16 insertions, 0 deletions
diff --git a/js/js.js b/js/js.js
index 2fb67f0ec06..b7d94b5eb6a 100644
--- a/js/js.js
+++ b/js/js.js
@@ -22,4 +22,20 @@ $(document).ready(function() {
$('label.sqlite').css('background-color', '#ddd');
$('label.mysql').css('background-color', '#fff');
});
+
+ // Hide and show input field values for login form
+ var textuser = "username";
+ var textpassword = "password";
+ $("#user").focus(function() {
+ if($(this).attr("value") == textuser) $(this).attr("value", "");
+ });
+ $("#user").blur(function() {
+ if($(this).attr("value") == "") $(this).attr("value", textuser);
+ });
+ $("#password").focus(function() {
+ if($(this).attr("value") == textpassword) $(this).attr("value", "");
+ });
+ $("#password").blur(function() {
+ if($(this).attr("value") == "") $(this).attr("value", textpassword);
+ });
});