You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by al...@apache.org on 2012/07/27 23:01:32 UTC

[19/50] [abbrv] git commit: CS-15518: Fix password field garbling on login screen.

CS-15518: Fix password field garbling on login screen.


Project: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/commit/b10a6196
Tree: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/tree/b10a6196
Diff: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/diff/b10a6196

Branch: refs/heads/vpc
Commit: b10a6196355df655800859adea8760a662b288a5
Parents: 58a9b94
Author: olgasmola <ol...@gmail.com>
Authored: Fri Jul 27 15:36:58 2012 +0300
Committer: olgasmola <ol...@gmail.com>
Committed: Fri Jul 27 15:36:58 2012 +0300

----------------------------------------------------------------------
 ui/scripts/ui-custom/login.js |   11 +++++++++++
 1 files changed, 11 insertions(+), 0 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/b10a6196/ui/scripts/ui-custom/login.js
----------------------------------------------------------------------
diff --git a/ui/scripts/ui-custom/login.js b/ui/scripts/ui-custom/login.js
index 72b3c6c..20e6abf 100644
--- a/ui/scripts/ui-custom/login.js
+++ b/ui/scripts/ui-custom/login.js
@@ -38,6 +38,17 @@
     $login.appendTo('html body');
     $('html body').addClass('login');
 
+    // Remove label if field was auto filled
+    $.each($form.find('label'), function() {
+      var $label = $(this);
+      var $input = $form.find('input').filter(function() {
+        return $(this).attr('name') == $label.attr('for');
+      });
+      if ($input.val()) {
+        $label.hide();
+      }
+    });
+
     // Form validation
     $form.validate();