incubator-cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From m...@apache.org
Subject [1/3] git commit: CLOUDSTACK-82 enable static nat button is not working in UI
Date Thu, 13 Sep 2012 07:12:28 GMT
Updated Branches:
  refs/heads/master 5e3921519 -> 55bcfaf80


CLOUDSTACK-82 enable static nat button is not working in UI


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

Branch: refs/heads/master
Commit: 8a008ecd1633d706e5d4a4c2a7f3ae8e5374bd38
Parents: 5e39215
Author: Mice Xia <mice_xia@tcloudcomputing.com>
Authored: Thu Sep 13 10:51:39 2012 +0800
Committer: Mice Xia <mice_xia@tcloudcomputing.com>
Committed: Thu Sep 13 11:21:11 2012 +0800

----------------------------------------------------------------------
 ui/scripts/network.js |   41 ++++++++++++++++++++---------------------
 1 files changed, 20 insertions(+), 21 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/8a008ecd/ui/scripts/network.js
----------------------------------------------------------------------
diff --git a/ui/scripts/network.js b/ui/scripts/network.js
index d0f65c4..3bb3922 100644
--- a/ui/scripts/network.js
+++ b/ui/scripts/network.js
@@ -1430,34 +1430,33 @@
                       listView: {
                         filters: false,
                         dataProvider: function(args) {
-                          var $listView = args.$listView;
                           var data = {
                             page: args.page,
                             pageSize: pageSize,                            
                             listAll: true
                           };
-
-                          // See if tier is selected
-                          var $tierSelect = $listView.find('.tier-select select');
                           
-                          if ($tierSelect.size() && $tierSelect.val() != '-1') {
-                            data.networkid = $tierSelect.val();
+                          var $tierSelect = $(".ui-dialog-content").find('.tier-select select');
+                          
+                          // if $tierSelect is not initialized, return; tierSelect() will
refresh listView and come back here later 
+                          if($tierSelect.size() == 0){
+                            args.response.success({ data: null });
+                            return;             
+                          }
+                          
+                          if('vpc' in args.context) {
+                            if($tierSelect.size() && $tierSelect.val() != '-1' ){

+                              data.networkid = $tierSelect.val();
+                            }                          
+                            $.extend(data, {
+                              vpcid: args.context.vpc[0].id
+                            });
+                          }
+                          else if('networks' in args.context) {
+                            $.extend(data, {
+                              networkid: args.context.networks[0].id
+                            });
                           }
-													else {
-													  args.response.success({ data: null });
-														return;
-													}
-
-													if('vpc' in args.context) {
-													  $.extend(data, {
-														  vpcid: args.context.vpc[0].id
-														});
-													}
-													else if('networks' in args.context) {
-													  $.extend(data, {
-														  networkid: args.context.networks[0].id
-														});
-													}
 													
                           if (!args.context.projects) {
                             $.extend(data, {


Mime
View raw message