Skip to content

Commit 8ecdbd8

Browse files
author
Jessica Wang
committed
CLOUDSTACK-1065: cloudstack UI - AWS Style Regions - allow user to delete region whose end point matches the current URL, but set region button on top menu to blank after the region is deleted.
1 parent b932059 commit 8ecdbd8

2 files changed

Lines changed: 7 additions & 2 deletions

File tree

ui/scripts/regions.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -136,10 +136,12 @@
136136
region.endpoint == "http://localhost:8080/client/"
137137
document.location.href == "http://localhost:8080/client/#"
138138
*/
139+
/*
139140
if(document.location.href.indexOf(region.endpoint) != -1) {
140141
cloudStack.dialog.notice({ message: _l('You can not remove the region that you are currently in.') });
141142
return false;
142-
}
143+
}
144+
*/
143145
return true;
144146
},
145147
action: function(args) {

ui/scripts/ui-custom/regions.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,10 @@
5050

5151
if(currentRegion != null) {
5252
$regionSwitcherButton.find('.title').html(_s(currentRegion.name)).attr('title', _s(currentRegion.name));
53-
}
53+
}
54+
else {
55+
$regionSwitcherButton.find('.title').html('').attr('title', '');
56+
}
5457
}
5558
}
5659
});

0 commit comments

Comments
 (0)