From: cajus Date: Tue, 27 Apr 2010 16:27:45 +0000 (+0000) Subject: Added caps proof of concept X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=c4e1715bfb2df1698ea89706ce48aed5a3eb91fb;p=gosa.git Added caps proof of concept git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@17891 594d385d-05f5-0310-b6e9-bd551577e9d8 --- diff --git a/gosa-core/html/images/caps.png b/gosa-core/html/images/caps.png new file mode 100644 index 000000000..c44694d8c Binary files /dev/null and b/gosa-core/html/images/caps.png differ diff --git a/gosa-core/html/include/gosa.js b/gosa-core/html/include/gosa.js index c3963b8eb..e7bef6e73 100644 --- a/gosa-core/html/include/gosa.js +++ b/gosa-core/html/include/gosa.js @@ -531,6 +531,37 @@ function isVisible(obj) } +/* Check if capslock is enabled */ +function capslock(e) { + e = (e) ? e : window.event; + + var charCode = false; + if (e.which) { + charCode = e.which; + } else if (e.keyCode) { + charCode = e.keyCode; + } + + var shifton = false; + if (e.shiftKey) { + shifton = e.shiftKey; + } else if (e.modifiers) { + shifton = !!(e.modifiers & 4); + } + + if (charCode >= 97 && charCode <= 122 && shifton) { + return true; + } + + if (charCode >= 65 && charCode <= 90 && !shifton) { + return true; + } + + return false; +} + + + /* Scroll down the body frame */ function scrollDown2() { diff --git a/gosa-core/html/themes/default/style.css b/gosa-core/html/themes/default/style.css index cf4b4897a..944babcd2 100644 --- a/gosa-core/html/themes/default/style.css +++ b/gosa-core/html/themes/default/style.css @@ -58,6 +58,11 @@ input[type=text]:hover, input[type=password]:hover, textarea:hover, select:hover border-color:#777; } +input[type=password]{ + background-repeat:no-repeat; + background-position:right center; +} + textarea, select { border:1px solid #DDD; margin-bottom:2px; diff --git a/gosa-core/ihtml/themes/default/login.tpl b/gosa-core/ihtml/themes/default/login.tpl index 569ca4250..1dc7ceacf 100644 --- a/gosa-core/ihtml/themes/default/login.tpl +++ b/gosa-core/ihtml/themes/default/login.tpl @@ -46,8 +46,13 @@