Skip to content

Commit aa5ed0a

Browse files
committed
Layout new project selector (only dummy data for now)
1 parent f66b9b5 commit aa5ed0a

3 files changed

Lines changed: 56 additions & 5 deletions

File tree

‎ui/css/cloudstack3.css‎

Lines changed: 23 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8839,6 +8839,7 @@ div.ui-dialog div.multi-edit-add-list div.view div.data-table table.body tbody t
88398839
left: 0px;
88408840
top: -10px;
88418841
margin-right: 9px;
8842+
display: none;
88428843
}
88438844

88448845
#header div.view-switcher.alt {
@@ -8905,6 +8906,25 @@ div.ui-dialog div.multi-edit-add-list div.view div.data-table table.body tbody t
89058906
padding: 3px 0 4px;
89068907
}
89078908

8909+
/*** View switcher (drop-down)*/
8910+
.project-switcher {
8911+
float: left;
8912+
width: 141px;
8913+
padding: 9px 17px 0 0;
8914+
}
8915+
8916+
.project-switcher select {
8917+
width: 100%;
8918+
font-size: 12px;
8919+
border: 1px solid #000000;
8920+
border-bottom: #FFFFFF;
8921+
/*+border-radius:4px;*/
8922+
-moz-border-radius: 4px;
8923+
-webkit-border-radius: 4px;
8924+
-khtml-border-radius: 4px;
8925+
border-radius: 4px;
8926+
}
8927+
89088928
/*** Select project*/
89098929
.project-selector {
89108930
display: inline-block;
@@ -11761,12 +11781,11 @@ div.ui-dialog div.autoscaler div.field-group div.form-container form div.form-it
1176111781
.updateResourceLimits:hover .icon {
1176211782
background-position: -100px -614px;
1176311783
}
11764-
11784+
1176511785
.addVlanRange .icon {
1176611786
background-position: -168px -31px;
1176711787
}
1176811788

11769-
1177011789
.addVlanRange:hover .icon {
1177111790
background-position: -168px -613px;
1177211791
}
@@ -11796,8 +11815,8 @@ div.ui-dialog div.autoscaler div.field-group div.form-container form div.form-it
1179611815
background-position: -168px -31px;
1179711816
}
1179811817

11799-
.reset .icon ,
11800-
.scaleUp .icon{
11818+
.reset .icon,
11819+
.scaleUp .icon {
1180111820
background-position: -168px -31px;
1180211821
}
1180311822

‎ui/index.jsp‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1678,7 +1678,8 @@ under the License.
16781678
<script type="text/javascript" src="scripts/system.js?t=<%=now%>"></script>
16791679
<script type="text/javascript" src="scripts/domains.js?t=<%=now%>"></script>
16801680
<script type="text/javascript" src="scripts/docs.js?t=<%=now%>"></script>
1681-
<script type="text/javascript" src="scripts/vm_snapshots.js?t=<%=now%>"></script>
1681+
<script type="text/javascript" src="scripts/vm_snapshots.js?t=<%=now%>"></script>
1682+
<script type="text/javascript" src="scripts/ui-custom/projectSelect.js?t=<%=now%>"></script>
16821683

16831684
<!-- Plugins -->
16841685
<script type="text/javascript" src="scripts/ui-custom/plugins.js?t=<%=now%>"></script>
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
// Licensed to the Apache Software Foundation (ASF) under one
2+
// or more contributor license agreements. See the NOTICE file
3+
// distributed with this work for additional information
4+
// regarding copyright ownership. The ASF licenses this file
5+
// to you under the Apache License, Version 2.0 (the
6+
// "License"); you may not use this file except in compliance
7+
// with the License. You may obtain a copy of the License at
8+
//
9+
// http://www.apache.org/licenses/LICENSE-2.0
10+
//
11+
// Unless required by applicable law or agreed to in writing,
12+
// software distributed under the License is distributed on an
13+
// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14+
// KIND, either express or implied. See the License for the
15+
// specific language governing permissions and limitations
16+
// under the License.
17+
18+
(function($, cloudStack) {
19+
$(window).bind('cloudStack.ready', function() {
20+
var $header = $('#header .controls');
21+
var $projectSwitcher = $('<div>').addClass('project-switcher');
22+
var $projectSelect = $('<select>').append(
23+
$('<option>').attr('value', 'basic').html(_l('Project 1')),
24+
$('<option>').attr('value', 'advanced').html(_l('Project 2'))
25+
);
26+
27+
$projectSelect.appendTo($projectSwitcher);
28+
$projectSwitcher.insertBefore($header.find('.region-switcher'));
29+
});
30+
}(jQuery, cloudStack));
31+

0 commit comments

Comments
 (0)