From 2c1c8045bb51c82385af2f91ccf83a379dd5a8e6 Mon Sep 17 00:00:00 2001 From: Jessica Wang Date: Mon, 1 Jul 2013 15:23:02 -0700 Subject: [PATCH] CLOUDSTACK-3286: UI - Add Network Offering dialog - reset provider dropdown to first enabled option only if selected option is diabled. --- ui/scripts/configuration.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/ui/scripts/configuration.js b/ui/scripts/configuration.js index ab70c3dbf87..aa8fafd219e 100644 --- a/ui/scripts/configuration.js +++ b/ui/scripts/configuration.js @@ -1577,7 +1577,10 @@ } } - $lbProvider.val($lbProvider.find('option:first')); + //if selected option is disabled, select the first enabled option instead + if($lbProvider.find('option:selected:disabled').length > 0) { + $lbProvider.val($lbProvider.find('option:first')); + } } else { $lbType.hide();