Updated Branches:
  refs/heads/master 3ab8d8d8f -> 723ef6e49

CLOUDSTACK-4702: UI > Network menu > Add Guest Network dialog > UI shouldn't 
pass null zoneid to listnetworkofferings API when zone dropdown is empty (i.e. 
when no advanced zone exists).


Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/723ef6e4
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/723ef6e4
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/723ef6e4

Branch: refs/heads/master
Commit: 723ef6e49552f7407194b701927a0b2a167a4ced
Parents: 3ab8d8d
Author: Jessica Wang <jessicaw...@apache.org>
Authored: Wed Sep 18 16:43:18 2013 -0700
Committer: Jessica Wang <jessicaw...@apache.org>
Committed: Wed Sep 18 16:45:01 2013 -0700

----------------------------------------------------------------------
 ui/scripts/sharedFunctions.js | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/723ef6e4/ui/scripts/sharedFunctions.js
----------------------------------------------------------------------
diff --git a/ui/scripts/sharedFunctions.js b/ui/scripts/sharedFunctions.js
index b6a1c1f..1596973 100644
--- a/ui/scripts/sharedFunctions.js
+++ b/ui/scripts/sharedFunctions.js
@@ -450,7 +450,14 @@ var addGuestNetworkDialog = {
                     label: 'label.network.offering',
                     docID: 'helpGuestNetworkZoneNetworkOffering',
                     dependsOn: ['zoneId', 'scope'],
-                    select: function(args) {
+                    select: function(args) {                           
+                       
if(args.$form.find('.form-item[rel=zoneId]').find('select').val() == null || 
args.$form.find('.form-item[rel=zoneId]').find('select').val().length == 0) {
+                               args.response.success({
+                                data: null
+                            });
+                               return;
+                       }
+                       
                         var data = {
                             state: 'Enabled',
                             zoneid: 
args.$form.find('.form-item[rel=zoneId]').find('select').val()

Reply via email to