From 3bcf3c91e18e5863cb6b6a34eb80ae218f028022 Mon Sep 17 00:00:00 2001
From: raghunayyar
Date: Fri, 25 Jan 2013 15:22:10 +0530
Subject: [PATCH] Password Toggle Support for Login
---
core/css/styles.css | 12 +++++--
core/img/actions/toggle.png | Bin 0 -> 515 bytes
core/img/actions/toggle.svg | 61 ++++++++++++++++++++++++++++++++++++
core/js/js.js | 1 +
core/templates/login.php | 6 ++--
5 files changed, 76 insertions(+), 4 deletions(-)
create mode 100644 core/img/actions/toggle.png
create mode 100644 core/img/actions/toggle.svg
diff --git a/core/css/styles.css b/core/css/styles.css
index e10a4c7fbe..8bca96349a 100644
--- a/core/css/styles.css
+++ b/core/css/styles.css
@@ -52,12 +52,19 @@ input[type="checkbox"] { margin:0; padding:0; height:auto; width:auto; }
input[type="checkbox"]:hover+label, input[type="checkbox"]:focus+label { color:#111 !important; }
#quota { cursor:default; }
+
/* SCROLLING */
::-webkit-scrollbar { width:8px; }
::-webkit-scrollbar-track-piece { background-color:transparent; }
::-webkit-scrollbar-thumb { background:#ddd; }
+#show { float: right; position: absolute; right: 1em; top: 0.8em; display:none; }
+#login form input[name="show"] + label { background: url("../img/actions/toggle.png") no-repeat; opacity:0.3;
+float: right; width: 24px; position: absolute !important; height: 14px; right: 1em; top: 1.25em;}
+#login form input[name="show"]:checked + label { background:url("../img/actions/toggle.png") no-repeat; opacity:0.8; }
+
+
/* BUTTONS */
input[type="submit"], input[type="button"], button, .button, #quota, div.jp-progress, select, .pager li a {
width:auto; padding:.4em;
@@ -141,12 +148,13 @@ input[type="submit"].enabled { background:#66f866; border:1px solid #5e5; -moz-b
/* Icons for username and password fields to better recognize them */
#adminlogin, #adminpass, #user, #password { width:11.7em!important; padding-left:1.8em; }
-#adminlogin+label, #adminpass+label, #user+label, #password+label { left:2.2em; }
#adminlogin+label+img, #adminpass+label+img, #user+label+img, #password+label+img {
position:absolute; left:1.25em; top:1.65em;
opacity:.3;
}
#adminpass+label+img, #password+label+img { top:1.1em; }
+input[name="password-clone"] { padding-left:1.8em; width:11.7em !important; }
+#pass_image { position: absolute; top: 1.2em; left: 1.4em; opacity: 0.3; }
/* Nicely grouping input field sets */
@@ -170,7 +178,7 @@ input[type="submit"].enabled { background:#66f866; border:1px solid #5e5; -moz-b
/* NEEDED FOR INFIELD LABELS */
p.infield { position:relative; }
label.infield { cursor:text !important; top:1.05em; left:.85em; }
-#login form label.infield { position:absolute; font-size:19px; color:#aaa; white-space:nowrap; }
+#login form label.infield { position:absolute; font-size:19px; color:#aaa; white-space:nowrap; padding-left:1.2em; }
#login form input[type="checkbox"]+label { position:relative; margin:0; font-size:1em; text-shadow:#fff 0 1px 0; }
#login form .errors { background:#fed7d7; border:1px solid #f00; list-style-indent:inside; margin:0 0 2em; padding:1em; }
diff --git a/core/img/actions/toggle.png b/core/img/actions/toggle.png
new file mode 100644
index 0000000000000000000000000000000000000000..6ef3f2227b7a3bc0dc5eccf87a4158564cfdd065
GIT binary patch
literal 515
zcmV+e0{s1nP)P^9DEu9;SA1
zhabTE<#Ks48jUXhX<)6bi%1K25KAwCQ{Zc~ehwT0nHcAnsy3W+?L>ooKA+3wa&Lj7
zKL{e%B61J}!RL6sQmMR9)iYInvexv6*=+WDI-Sl|28BXl%NX+s*!}B>BKyPP@M9$E
z0|Y^E1yC-RU#jZ)`X1oRd_LcsOeQ})5%G*Mog{If_gmce{bm@3gD?ySzV9~yqFOIu
z->xyHBO;z>t!)9d1QNhEfNHh+7^nkY6!j>#;v}GEt!;TJ#e0M2oNEBxl=?G(e!qVM
zw1F^+c9dIj63}(dH8y_9|L2*;v9XU9$3{m*9QQHoZUNSw>zz-2y?+1z002ovPDHLk
FV1kyQ+2jBK
literal 0
HcmV?d00001
diff --git a/core/img/actions/toggle.svg b/core/img/actions/toggle.svg
new file mode 100644
index 0000000000..82a5171477
--- /dev/null
+++ b/core/img/actions/toggle.svg
@@ -0,0 +1,61 @@
+
+
+
+
\ No newline at end of file
diff --git a/core/js/js.js b/core/js/js.js
index bfc972c786..6b0c289850 100644
--- a/core/js/js.js
+++ b/core/js/js.js
@@ -622,6 +622,7 @@ $(document).ready(function(){
});
// 'show password' checkbox
+ $('#password').showPassword();
$('#pass2').showPassword();
//use infield labels
diff --git a/core/templates/login.php b/core/templates/login.php
index c82d2cafa2..59b685eabf 100644
--- a/core/templates/login.php
+++ b/core/templates/login.php
@@ -30,10 +30,12 @@
- />
-
+
+
+