Return-Path: X-Original-To: apmail-incubator-cloudstack-commits-archive@minotaur.apache.org Delivered-To: apmail-incubator-cloudstack-commits-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 5A20CD66F for ; Fri, 27 Jul 2012 12:38:00 +0000 (UTC) Received: (qmail 34841 invoked by uid 500); 27 Jul 2012 12:38:00 -0000 Delivered-To: apmail-incubator-cloudstack-commits-archive@incubator.apache.org Received: (qmail 34752 invoked by uid 500); 27 Jul 2012 12:38:00 -0000 Mailing-List: contact cloudstack-commits-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: cloudstack-dev@incubator.apache.org Delivered-To: mailing list cloudstack-commits@incubator.apache.org Received: (qmail 34709 invoked by uid 99); 27 Jul 2012 12:38:00 -0000 Received: from tyr.zones.apache.org (HELO tyr.zones.apache.org) (140.211.11.114) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 27 Jul 2012 12:38:00 +0000 Received: by tyr.zones.apache.org (Postfix, from userid 65534) id C15881957F; Fri, 27 Jul 2012 12:37:59 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: olgasmola@apache.org To: cloudstack-commits@incubator.apache.org X-Mailer: ASF-Git Admin Mailer Subject: [2/2] git commit: CS-15518: Fix password field garbling on login screen. Message-Id: <20120727123759.C15881957F@tyr.zones.apache.org> Date: Fri, 27 Jul 2012 12:37:59 +0000 (UTC) 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 Authored: Fri Jul 27 15:36:58 2012 +0300 Committer: olgasmola 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();