You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by je...@apache.org on 2013/06/14 23:21:19 UTC

git commit: updated refs/heads/master to 4b2eb18

Updated Branches:
  refs/heads/master 3eeca55c7 -> 4b2eb18cf


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/master
Commit: 4b2eb18cfc82093640b2cb6c47c0378e69b9f8a2
Parents: 3eeca55
Author: Jessica Wang <je...@apache.org>
Authored: Fri Jun 14 14:17:50 2013 -0700
Committer: Jessica Wang <je...@apache.org>
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'));
+                      }
                     });