Skip to content

Commit 260669a

Browse files
committed
Regions UI: Show (Default) in header if no regions are available
1 parent 990071b commit 260669a

2 files changed

Lines changed: 6 additions & 5 deletions

File tree

ui/scripts/regions.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727

2828
args.response.success({
2929
data: regions ? regions : [
30-
{ id: -1, name: '(Default region)' }
30+
{ id: -1, name: '(Default)' }
3131
],
3232
activeRegionID: cloudStack.context.users.regionid ?
3333
cloudStack.context.users.regionid : 1

ui/scripts/ui-custom/regions.js

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -31,18 +31,19 @@
3131

3232
$(data).each(function() {
3333
var region = this;
34+
var regionName = region.name;
3435
var $li = $('<li>').append($('<span>').html(_s(region.name)));
3536

3637
$li.data('region-data', region);
3738

3839
if (region.id == activeRegionID) {
3940
$li.addClass('active');
40-
41-
$regionSwitcherButton.find('.title')
42-
.html(_s(region.name))
43-
.attr('title', _s(region.name));
4441
}
4542

43+
$regionSwitcherButton.find('.title')
44+
.html(regionName)
45+
.attr('title', regionName);
46+
4647
$regionList.append($li);
4748
});
4849
}

0 commit comments

Comments
 (0)