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 22B4ED443 for ; Wed, 17 Oct 2012 08:50:23 +0000 (UTC) Received: (qmail 62192 invoked by uid 500); 17 Oct 2012 08:50:18 -0000 Delivered-To: apmail-incubator-cloudstack-commits-archive@incubator.apache.org Received: (qmail 61985 invoked by uid 500); 17 Oct 2012 08:50:17 -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 58272 invoked by uid 99); 17 Oct 2012 08:50:11 -0000 Received: from tyr.zones.apache.org (HELO tyr.zones.apache.org) (140.211.11.114) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 17 Oct 2012 08:50:11 +0000 Received: by tyr.zones.apache.org (Postfix, from userid 65534) id A53C247E94; Wed, 17 Oct 2012 08:50:11 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: kishan@apache.org To: cloudstack-commits@incubator.apache.org X-Mailer: ASF-Git Admin Mailer Subject: [33/50] [abbrv] git commit: CS-16197: cloudstack UI - Tags - input validation. Message-Id: <20121017085011.A53C247E94@tyr.zones.apache.org> Date: Wed, 17 Oct 2012 08:50:11 +0000 (UTC) CS-16197: cloudstack UI - Tags - input validation. Project: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/commit/2c6bc0e9 Tree: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/tree/2c6bc0e9 Diff: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/diff/2c6bc0e9 Branch: refs/heads/regions Commit: 2c6bc0e9185f6226ea757cbec01b4c9fae8adbbe Parents: f16b510 Author: Jessica Wang Authored: Mon Oct 1 16:05:19 2012 -0700 Committer: Jessica Wang Committed: Mon Oct 1 16:07:45 2012 -0700 ---------------------------------------------------------------------- ui/scripts/ui/widgets/tagger.js | 14 ++++++++------ 1 files changed, 8 insertions(+), 6 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/2c6bc0e9/ui/scripts/ui/widgets/tagger.js ---------------------------------------------------------------------- diff --git a/ui/scripts/ui/widgets/tagger.js b/ui/scripts/ui/widgets/tagger.js index f996f33..0f297eb 100644 --- a/ui/scripts/ui/widgets/tagger.js +++ b/ui/scripts/ui/widgets/tagger.js @@ -21,11 +21,13 @@ var value = $form.find('input[name=value]').val(); if (!key || !value) { - cloudStack.dialog.notice({ message: 'Please specify a tag key and value' }); - + cloudStack.dialog.notice({ message: 'Please specify a tag key and value' }); return false; } - + + if($form.find('div.field.key').find('label.error').css('display') == 'block' || $form.find('div.field.value').find('label.error').css('display') == 'block') + return false; + return true; }; @@ -34,10 +36,10 @@ var $form = $('
').addClass('tag-input'); var $keyField = $('
').addClass('field key'); var $keyLabel = $('