incubator-cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From olgasm...@apache.org
Subject [2/2] git commit: CS-15518: Fix password field garbling on login screen.
Date Fri, 27 Jul 2012 12:37:59 GMT
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/master
Commit: b10a6196355df655800859adea8760a662b288a5
Parents: 58a9b94
Author: olgasmola <olya.smola@gmail.com>
Authored: Fri Jul 27 15:36:58 2012 +0300
Committer: olgasmola <olya.smola@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();
 


Mime
View raw message