mirror of
https://github.com/apache/cloudstack.git
synced 2025-10-26 08:42:29 +01:00
Regions UI: Show (Default) in header if no regions are available
This commit is contained in:
parent
990071b9d7
commit
260669ad9e
@ -27,7 +27,7 @@
|
||||
|
||||
args.response.success({
|
||||
data: regions ? regions : [
|
||||
{ id: -1, name: '(Default region)' }
|
||||
{ id: -1, name: '(Default)' }
|
||||
],
|
||||
activeRegionID: cloudStack.context.users.regionid ?
|
||||
cloudStack.context.users.regionid : 1
|
||||
|
||||
@ -31,18 +31,19 @@
|
||||
|
||||
$(data).each(function() {
|
||||
var region = this;
|
||||
var regionName = region.name;
|
||||
var $li = $('<li>').append($('<span>').html(_s(region.name)));
|
||||
|
||||
$li.data('region-data', region);
|
||||
|
||||
if (region.id == activeRegionID) {
|
||||
$li.addClass('active');
|
||||
|
||||
$regionSwitcherButton.find('.title')
|
||||
.html(_s(region.name))
|
||||
.attr('title', _s(region.name));
|
||||
}
|
||||
|
||||
$regionSwitcherButton.find('.title')
|
||||
.html(regionName)
|
||||
.attr('title', regionName);
|
||||
|
||||
$regionList.append($li);
|
||||
});
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user