Return-Path: X-Original-To: apmail-cloudstack-commits-archive@www.apache.org Delivered-To: apmail-cloudstack-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 8BC9B104E8 for ; Sat, 15 Jun 2013 02:52:12 +0000 (UTC) Received: (qmail 26118 invoked by uid 500); 15 Jun 2013 02:52:06 -0000 Delivered-To: apmail-cloudstack-commits-archive@cloudstack.apache.org Received: (qmail 25927 invoked by uid 500); 15 Jun 2013 02:52:06 -0000 Mailing-List: contact commits-help@cloudstack.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@cloudstack.apache.org Delivered-To: mailing list commits@cloudstack.apache.org Received: (qmail 25563 invoked by uid 99); 15 Jun 2013 02:52:02 -0000 Received: from tyr.zones.apache.org (HELO tyr.zones.apache.org) (140.211.11.114) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 15 Jun 2013 02:52:02 +0000 Received: by tyr.zones.apache.org (Postfix, from userid 65534) id 624B6881D8B; Sat, 15 Jun 2013 02:52:02 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: edison@apache.org To: commits@cloudstack.apache.org Date: Sat, 15 Jun 2013 02:52:41 -0000 Message-Id: In-Reply-To: <945ac104d1e84e229519e8382bd02b4d@git.apache.org> References: <945ac104d1e84e229519e8382bd02b4d@git.apache.org> X-Mailer: ASF-Git Admin Mailer Subject: [41/50] [abbrv] git commit: updated refs/heads/object_store to f41c800 CLOUDSTACK-2981: UI - create network offering - fix a bug that provider dropdown always bounced back to the first enabled option. It should only bounce back to the first enabled option when the selected option is disabled. Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/4b2eb18c Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/4b2eb18c Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/4b2eb18c Branch: refs/heads/object_store Commit: 4b2eb18cfc82093640b2cb6c47c0378e69b9f8a2 Parents: 3eeca55 Author: Jessica Wang Authored: Fri Jun 14 14:17:50 2013 -0700 Committer: Jessica Wang Committed: Fri Jun 14 14:20:58 2013 -0700 ---------------------------------------------------------------------- ui/scripts/configuration.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/cloudstack/blob/4b2eb18c/ui/scripts/configuration.js ---------------------------------------------------------------------- diff --git a/ui/scripts/configuration.js b/ui/scripts/configuration.js index cb15598..cadde8c 100644 --- a/ui/scripts/configuration.js +++ b/ui/scripts/configuration.js @@ -1228,8 +1228,11 @@ } }); } - $providers.each(function() { - $(this).val($(this).find('option:first')); + $providers.each(function() { + //if selected option is disabled, select the first enabled option instead + if($(this).find('option:selected:disabled').length > 0) { + $(this).val($(this).find('option:first')); + } });