mirror of
https://github.com/OpenNebula/one.git
synced 2026-11-21 12:22:38 +09:00
Feature #4363: Fix top row style
This commit is contained in:
1 parent
034a0721a5
commit
3058405688
6 files changed
+107
-50
No files matched your search
@@ -29,6 +29,8 @@ define(function(require) {
|
||||
var Locale = require('utils/locale');
|
||||
var UserInputs = require('utils/user-inputs');
|
||||
|
||||
var UserAndZoneTemplate = require('hbs!sunstone/user_and_zone');
|
||||
|
||||
var _commonDialogs = [
|
||||
require('utils/dialogs/confirm'),
|
||||
require('utils/dialogs/confirm-with-select'),
|
||||
@@ -87,47 +89,14 @@ define(function(require) {
|
||||
}
|
||||
|
||||
function _insertUserAndZoneSelector() {
|
||||
var user_login_content =
|
||||
'<button type="button" data-toggle="userSelectDropdown" class="button secondary dropdown" id="logout">\
|
||||
<i class="fa fa-user fa-lg fa-fw header-icon"></i> ' + config['display_name'] + '</button>\
|
||||
<ul id="userSelectDropdown" data-dropdown data-close-on-click="true" class="dropdown-pane menu vertical">';
|
||||
|
||||
if (config['available_views'].length > 1){
|
||||
user_login_content +=
|
||||
'<li><a href="#" class="quickconf_view_header"><i class="fa fa-fw fa-eye"></i> '+Locale.tr("Views")+'</a></li>';
|
||||
|
||||
$.each(config['available_views'], function(i, view) {
|
||||
var faclass = "";
|
||||
|
||||
if (view == config['user_config']["default_view"]){
|
||||
faclass = "fa fa-fw fa-check";
|
||||
} else {
|
||||
faclass = "fa fa-fw";
|
||||
}
|
||||
|
||||
user_login_content +=
|
||||
'<li><a href="#" class="quickconf_view" view="'+view+'"><i class="'+faclass+'"></i> '+view+'</a></li>';
|
||||
});
|
||||
|
||||
user_login_content +=
|
||||
'<li><hr/></li>';
|
||||
}
|
||||
|
||||
if (Config.isTabEnabled(SETTINGS_TAB_ID)){
|
||||
user_login_content +=
|
||||
'<li><a href="#" class="configuration"><i class="fa fa-fw fa-cog"></i> '+Locale.tr("Settings")+'</a></li>';
|
||||
}
|
||||
|
||||
user_login_content +=
|
||||
'<li><a href="#" class="logout"><i class="fa fa-fw fa-power-off"></i> '+Locale.tr("Sign Out")+'</a></li>\
|
||||
</ul>\
|
||||
<button type="button" data-toggle="drop2" class="button secondary dropdown" id="zonelector">\
|
||||
<i class="fa fa-home fa-lg fa-fw header-icon"></i> ' + config['zone_name'] + '</button>\
|
||||
<ul id="drop2" data-dropdown data-close-on-click="true" class="zone-ul dropdown-pane menu vertical"></ul>';
|
||||
|
||||
$(".user-zone-info").html(user_login_content);
|
||||
$(".user-zone-info").foundation();
|
||||
$(".user-zone-info").html(UserAndZoneTemplate({
|
||||
displayName: config['display_name'],
|
||||
settingsTabEnabled: Config.isTabEnabled(SETTINGS_TAB_ID),
|
||||
availableViews: config['available_views'],
|
||||
zoneName: config['zone_name']
|
||||
})).foundation();
|
||||
|
||||
$('.quickconf_view[view="' + config['user_config']["default_view"] + '"] i').addClass('fa-check');
|
||||
$(".user-zone-info a.quickconf_view_header").click(function() {
|
||||
var context = $(this).closest('ul');
|
||||
$(".quickconf_view", context).toggle();
|
||||
@@ -147,7 +116,8 @@ define(function(require) {
|
||||
success: function (request, obj_list) {
|
||||
$('.zone-ul').empty();
|
||||
$.each(obj_list, function() {
|
||||
$('.zone-ul').append('<li><a id="' + this.ZONE.NAME + '" class="zone-choice">' + this.ZONE.NAME + '</a></li>');
|
||||
$('.zone-ul').append('<li>' +
|
||||
'<a href="#" id="' + this.ZONE.NAME + '" class="zone-choice">' + this.ZONE.NAME + '</a></li>');
|
||||
});
|
||||
},
|
||||
error: Notifier.onError
|
||||
|
||||
@@ -0,0 +1,66 @@
|
||||
{{! -------------------------------------------------------------------------- }}
|
||||
{{! Copyright 2002-2015, OpenNebula Project, OpenNebula Systems }}
|
||||
{{! }}
|
||||
{{! Licensed 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. }}
|
||||
{{! -------------------------------------------------------------------------- }}
|
||||
|
||||
<ul class="dropdown menu" data-disable-hover="true" data-click-open="true" data-alignment="right" data-dropdown-menu>
|
||||
<li>
|
||||
<a href="#">
|
||||
<i class="fa fa-user fa-lg fa-fw header-icon"></i>
|
||||
{{displayName}}
|
||||
</a>
|
||||
<ul class="menu">
|
||||
{{#if settingsTabEnabled}}
|
||||
<li>
|
||||
<a href="#" class="configuration">
|
||||
<i class="fa fa-fw fa-cog"></i>
|
||||
{{tr "Settings"}}
|
||||
</a>
|
||||
</li>
|
||||
{{/if}}
|
||||
<li>
|
||||
<a href="#" class="logout">
|
||||
<i class="fa fa-fw fa-power-off"></i>
|
||||
{{tr "Sign Out"}}
|
||||
</a>
|
||||
</li>
|
||||
{{#if availableViews}}
|
||||
<li>
|
||||
<a href="#">
|
||||
<i class="fa fa-fw fa-eye"></i>
|
||||
{{tr "Views"}}
|
||||
</a>
|
||||
<ul class="menu">
|
||||
{{#each availableViews}}
|
||||
<li>
|
||||
<a href="#" class="quickconf_view" view="{{this}}">
|
||||
<i class="fa fa-fw"></i>
|
||||
{{this}}
|
||||
</a>
|
||||
</li>
|
||||
{{/each}}
|
||||
</ul>
|
||||
</li>
|
||||
{{/if}}
|
||||
</ul>
|
||||
</li>
|
||||
<li>
|
||||
<a id="zonelector" href="#">
|
||||
<i class="fa fa-globe fa-lg fa-fw header-icon"></i>
|
||||
{{zoneName}}
|
||||
</a>
|
||||
<ul class="menu zone-ul">
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
@@ -14,13 +14,17 @@
|
||||
{{! limitations under the License. }}
|
||||
{{! -------------------------------------------------------------------------- }}
|
||||
|
||||
<div class="small-12 columns" style="padding-top: 15px">
|
||||
<div id="" class="row left-body left-header">
|
||||
<div class="small-12 columns">
|
||||
<div id="" class="row left-body left-header media-object">
|
||||
<div class="logo-header small-12 medium-4 columns">
|
||||
<button id="menu-toggle" class="button medium radius secondary white_button">
|
||||
<i class="fa fa-lg fa-fw fa-bars"></i>
|
||||
</button>
|
||||
<img src="{{logo}}" style="height: 20px;vertical-align: middle;"/>
|
||||
<div class="media-object-section">
|
||||
<button id="menu-toggle" class="button secondary tiny">
|
||||
<i class="fa fa-bars"></i>
|
||||
</button>
|
||||
</div>
|
||||
<div class="media-object-section">
|
||||
<img class="opennebula-img" src="{{logo}}"/>
|
||||
</div class="media-object-section">
|
||||
</div>
|
||||
<div class="small-12 medium-8 columns">
|
||||
<div class="user-zone-info right">
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
</div>
|
||||
</div>
|
||||
{{/if}}
|
||||
<table id="{{dataTableId}}" class="datatable twelve">
|
||||
<table id="{{dataTableId}}" class="hover">
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="check">
|
||||
|
||||
@@ -0,0 +1,7 @@
|
||||
#top-row {
|
||||
padding: 2rem 0 0 0;
|
||||
|
||||
.opennebula-img {
|
||||
height: 1.5rem;
|
||||
}
|
||||
}
|
||||
@@ -6,17 +6,27 @@
|
||||
@import "settings";
|
||||
@import "foundation";
|
||||
|
||||
@import './top-row';
|
||||
@import './menu';
|
||||
|
||||
@include foundation-everything;
|
||||
|
||||
|
||||
@font-face {
|
||||
font-family: 'Open Sans';
|
||||
font-style: normal;
|
||||
font-weight: 400;
|
||||
font-weight: 200;
|
||||
font-stretch: condensed;
|
||||
src: local('Open Sans'), local('OpenSans'), url('opensans/opensans.woff') format('woff');
|
||||
}
|
||||
|
||||
|
||||
.right {
|
||||
float: right !important; }
|
||||
float: right !important;
|
||||
}
|
||||
|
||||
table {
|
||||
input {
|
||||
margin-bottom: 0px !important;
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user