cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jessicaw...@apache.org
Subject git commit: updated refs/heads/master to c6190a1
Date Thu, 03 Apr 2014 21:36:28 GMT
Repository: cloudstack
Updated Branches:
  refs/heads/master 43ef7ef47 -> c6190a1c6


CLOUDSTACK-6335: UI - Acquire IP dialog - show/hide "cross zones" checkbox upon portableipserviceenabled
property of the current region instead of Local region.


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

Branch: refs/heads/master
Commit: c6190a1c62df3ca798d94a1b991e50305e4cfcd4
Parents: 43ef7ef
Author: Jessica Wang <jessicawang@apache.org>
Authored: Thu Apr 3 13:45:34 2014 -0700
Committer: Jessica Wang <jessicawang@apache.org>
Committed: Thu Apr 3 14:36:16 2014 -0700

----------------------------------------------------------------------
 ui/scripts/network.js | 11 +++++++----
 1 file changed, 7 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/c6190a1c/ui/scripts/network.js
----------------------------------------------------------------------
diff --git a/ui/scripts/network.js b/ui/scripts/network.js
index f82a295..76bf26d 100755
--- a/ui/scripts/network.js
+++ b/ui/scripts/network.js
@@ -2131,12 +2131,15 @@
                                 	$.ajax({
                                 		url: createURL('listRegions'),
                                 		success: function(json) {
+                                			var selectedRegionName = $(".region-switcher .title").text();
+                                			if ( selectedRegionName == undefined || selectedRegionName.length
== 0) {
+                                				selectedRegionName = "Local";
+                                			}                                			
                                 		    var items = json.listregionsresponse.region;	
                                 		    if(items != null) {
-                                		    	for(var i = 0; i < items.length; i++) {
-                                		    		var region = items[0];  
-                                		    		if(region.name == 'Local') {
-	                                    		    	if(region.portableipserviceenabled == true) {
+                                		    	for(var i = 0; i < items.length; i++) {   		
+                                		    		if(items[i].name == selectedRegionName) {
+	                                    		    	if(items[i].portableipserviceenabled == true)
{
 	                                    		    		args.$form.find('.form-item[rel=isportable]').css('display',
'inline-block');
 	                                    		    	} else {
 	                                    		    		args.$form.find('.form-item[rel=isportable]').hide();


Mime
View raw message