You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by bf...@apache.org on 2013/04/10 22:34:32 UTC

git commit: updated refs/heads/ui-new-project-switcher to aa5ed0a

Updated Branches:
  refs/heads/ui-new-project-switcher [created] aa5ed0a0f


Layout new project selector (only dummy data for now)


Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/aa5ed0a0
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/aa5ed0a0
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/aa5ed0a0

Branch: refs/heads/ui-new-project-switcher
Commit: aa5ed0a0fb3878bb6cf04d0770cd456dafcd9f4b
Parents: f66b9b5
Author: Brian Federle <br...@citrix.com>
Authored: Wed Apr 10 13:34:25 2013 -0700
Committer: Brian Federle <br...@citrix.com>
Committed: Wed Apr 10 13:34:25 2013 -0700

----------------------------------------------------------------------
 ui/css/cloudstack3.css                |   27 ++++++++++++++++++++---
 ui/index.jsp                          |    3 +-
 ui/scripts/ui-custom/projectSelect.js |   31 ++++++++++++++++++++++++++++
 3 files changed, 56 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/aa5ed0a0/ui/css/cloudstack3.css
----------------------------------------------------------------------
diff --git a/ui/css/cloudstack3.css b/ui/css/cloudstack3.css
index 7ebda9b..bf3cfb5 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;
 }
 

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/aa5ed0a0/ui/index.jsp
----------------------------------------------------------------------
diff --git a/ui/index.jsp b/ui/index.jsp
index 3b8f378..fcc3d69 100644
--- a/ui/index.jsp
+++ b/ui/index.jsp
@@ -1678,7 +1678,8 @@ under the License.
     <script type="text/javascript" src="scripts/system.js?t=<%=now%>"></script>
     <script type="text/javascript" src="scripts/domains.js?t=<%=now%>"></script>
     <script type="text/javascript" src="scripts/docs.js?t=<%=now%>"></script>
-    <script type="text/javascript" src="scripts/vm_snapshots.js?t=<%=now%>"></script>  
+    <script type="text/javascript" src="scripts/vm_snapshots.js?t=<%=now%>"></script>
+    <script type="text/javascript" src="scripts/ui-custom/projectSelect.js?t=<%=now%>"></script>
 
     <!-- Plugins -->
     <script type="text/javascript" src="scripts/ui-custom/plugins.js?t=<%=now%>"></script>

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/aa5ed0a0/ui/scripts/ui-custom/projectSelect.js
----------------------------------------------------------------------
diff --git a/ui/scripts/ui-custom/projectSelect.js b/ui/scripts/ui-custom/projectSelect.js
new file mode 100644
index 0000000..ae3d8f9
--- /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 = $('<div>').addClass('project-switcher');
+    var $projectSelect = $('<select>').append(
+      $('<option>').attr('value', 'basic').html(_l('Project 1')),
+      $('<option>').attr('value', 'advanced').html(_l('Project 2'))
+    );
+
+    $projectSelect.appendTo($projectSwitcher);
+    $projectSwitcher.insertBefore($header.find('.region-switcher'));
+  });
+}(jQuery, cloudStack));      
+