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/4.4 to 6901b8a
Date Thu, 03 Apr 2014 20:56:24 GMT
Repository: cloudstack
Updated Branches:
  refs/heads/4.4 bf76012fb -> 6901b8a1e


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/6901b8a1
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/6901b8a1
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/6901b8a1

Branch: refs/heads/4.4
Commit: 6901b8a1eef329562ac63b925a3adf23c1679aaf
Parents: bf76012
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 13:45:34 2014 -0700

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


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/6901b8a1/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