Skip to content

Commit e3439bc

Browse files
committed
Add select region icon to top bar
1 parent cc49cb5 commit e3439bc

4 files changed

Lines changed: 70 additions & 0 deletions

File tree

‎ui/css/cloudstack3.css‎

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11071,6 +11071,48 @@ div.ui-dialog div.autoscaler div.field-group div.form-container form div.form-it
1107111071
height: 100%;
1107211072
}
1107311073

11074+
/*Regions*/
11075+
.region-switcher {
11076+
background: url(../images/bg-gradients.png) 0px -1px;
11077+
border: 1px solid #5E5E5E;
11078+
/*+border-radius:4px;*/
11079+
-moz-border-radius: 4px;
11080+
-webkit-border-radius: 4px;
11081+
-khtml-border-radius: 4px;
11082+
border-radius: 4px;
11083+
border-top: 1px solid #717171;
11084+
border-bottom: 1px solid #FFFFFF;
11085+
width: 32px;
11086+
height: 28px;
11087+
float: left;
11088+
margin: 4px 13px 0 0;
11089+
cursor: pointer;
11090+
/*+box-shadow:inset 0px 1px 1px #000000;*/
11091+
-moz-box-shadow: inset 0px 1px 1px #000000;
11092+
-webkit-box-shadow: inset 0px 1px 1px #000000;
11093+
-o-box-shadow: inset 0px 1px 1px #000000;
11094+
box-shadow: inset 0px 1px 1px #000000;
11095+
}
11096+
11097+
.region-switcher .icon {
11098+
display: block;
11099+
width: 100%;
11100+
height: 100%;
11101+
background: url(../images/sprites.png) -15px -1313px;
11102+
}
11103+
11104+
.region-switcher:hover {
11105+
/*+box-shadow:inset 0px 1px 5px #000000;*/
11106+
-moz-box-shadow: inset 0px 1px 5px #000000;
11107+
-webkit-box-shadow: inset 0px 1px 5px #000000;
11108+
-o-box-shadow: inset 0px 1px 5px #000000;
11109+
box-shadow: inset 0px 1px 5px #000000;
11110+
}
11111+
11112+
.region-switcher:hover .icon {
11113+
background-position: -70px -1311px;
11114+
}
11115+
1107411116
/*Action icons*/
1107511117
.action.edit .icon {
1107611118
background-position: 1px -1px;

‎ui/images/sprites.png‎

2.83 KB
Loading

‎ui/scripts/regions.js‎

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,26 @@
6868
},
6969
detailView: {
7070
name: 'Region details',
71+
actions: {
72+
remove: {
73+
label: 'label.remove.region',
74+
messages: {
75+
notification: function() { return 'label.remove.region'; },
76+
confirm: function() { return 'message.remove.region'; }
77+
},
78+
action: function(args) {
79+
var region = args.context.regions[0];
80+
81+
$.ajax({
82+
url: createURL('removeRegion'),
83+
data: { id: region.id },
84+
success: function(json) {
85+
args.response.success();
86+
}
87+
});
88+
}
89+
}
90+
},
7191
tabs: {
7292
details: {
7393
title: 'label.details',

‎ui/scripts/ui/core.js‎

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -127,6 +127,13 @@
127127
.append($('<span>').html(_l('label.notifications')))
128128
.notifications();
129129

130+
// Region switcher
131+
var $regionSwitcher = $('<div>').addClass('region-switcher')
132+
.attr('title', 'Select region')
133+
.append(
134+
$('<span>').addClass('icon').html('&nbsp;')
135+
);
136+
130137
// Project switcher
131138
var $viewSwitcher = $('<div>').addClass('button view-switcher')
132139
.append(
@@ -220,6 +227,7 @@
220227
$('<div>').addClass('controls')
221228
.append($notificationArea)
222229
.append($viewSwitcher)
230+
.append($regionSwitcher)
223231
.append($projectSelect)
224232
.append($userInfo)
225233
];

0 commit comments

Comments
 (0)