From aa5ed0a0fb3878bb6cf04d0770cd456dafcd9f4b Mon Sep 17 00:00:00 2001 From: Brian Federle Date: Wed, 10 Apr 2013 13:34:25 -0700 Subject: [PATCH] Layout new project selector (only dummy data for now) --- ui/css/cloudstack3.css | 27 +++++++++++++++++++---- ui/index.jsp | 3 ++- ui/scripts/ui-custom/projectSelect.js | 31 +++++++++++++++++++++++++++ 3 files changed, 56 insertions(+), 5 deletions(-) create mode 100644 ui/scripts/ui-custom/projectSelect.js diff --git a/ui/css/cloudstack3.css b/ui/css/cloudstack3.css index 7ebda9b8f36..bf3cfb52ad3 100644 --- a/ui/css/cloudstack3.css +++ b/ui/css/cloudstack3.css @@ -8839,6 +8839,7 @@ div.ui-dialog div.multi-edit-add-list div.view div.data-table table.body tbody t left: 0px; top: -10px; margin-right: 9px; + display: none; } #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 padding: 3px 0 4px; } +/*** View switcher (drop-down)*/ +.project-switcher { + float: left; + width: 141px; + padding: 9px 17px 0 0; +} + +.project-switcher select { + width: 100%; + font-size: 12px; + border: 1px solid #000000; + border-bottom: #FFFFFF; + /*+border-radius:4px;*/ + -moz-border-radius: 4px; + -webkit-border-radius: 4px; + -khtml-border-radius: 4px; + border-radius: 4px; +} + /*** Select project*/ .project-selector { display: inline-block; @@ -11761,12 +11781,11 @@ div.ui-dialog div.autoscaler div.field-group div.form-container form div.form-it .updateResourceLimits:hover .icon { background-position: -100px -614px; } - + .addVlanRange .icon { background-position: -168px -31px; } - .addVlanRange:hover .icon { background-position: -168px -613px; } @@ -11796,8 +11815,8 @@ div.ui-dialog div.autoscaler div.field-group div.form-container form div.form-it background-position: -168px -31px; } -.reset .icon , -.scaleUp .icon{ +.reset .icon, +.scaleUp .icon { background-position: -168px -31px; } diff --git a/ui/index.jsp b/ui/index.jsp index 3b8f37886ef..fcc3d699923 100644 --- a/ui/index.jsp +++ b/ui/index.jsp @@ -1678,7 +1678,8 @@ under the License. - + + diff --git a/ui/scripts/ui-custom/projectSelect.js b/ui/scripts/ui-custom/projectSelect.js new file mode 100644 index 00000000000..ae3d8f9f8da --- /dev/null +++ b/ui/scripts/ui-custom/projectSelect.js @@ -0,0 +1,31 @@ +// Licensed to the Apache Software Foundation (ASF) under one +// or more contributor license agreements. See the NOTICE file +// distributed with this work for additional information +// regarding copyright ownership. The ASF licenses this file +// to you under the Apache License, Version 2.0 (the +// "License"); you may not use this file except in compliance +// with the License. You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. + +(function($, cloudStack) { + $(window).bind('cloudStack.ready', function() { + var $header = $('#header .controls'); + var $projectSwitcher = $('
').addClass('project-switcher'); + var $projectSelect = $('