CLOUDSTACK-3286: UI - Add Network Offering dialog - reset provider dropdown to first enabled option only if selected option is diabled.

This commit is contained in:
Jessica Wang 2013-07-01 15:23:02 -07:00
parent 2fc6054a9d
commit 2c1c8045bb
1 changed files with 4 additions and 1 deletions

View File

@ -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();