Better than first patch.  Keeps colors and positioning. Also adds in a
set of badge- context classes for future use.
This commit is contained in:
Bennett Blodinger 2016-09-23 08:27:34 -04:00
parent d1f25550cb
commit f7c8208072
2 changed files with 56 additions and 2 deletions

View File

@ -1763,6 +1763,57 @@ label {
font-weight: normal;
}
.badge-navbar-user {
border-radius: 40%;
font-size: 65%;
padding: 5px;
position: relative;
top: -10px;
left: -5px;
}
.badge-default {
background-color: #777;
}
.badge-default[href]:hover,
.badge-default[href]:focus {
background-color: #5e5e5e;
}
.badge-primary {
background-color: #337ab7;
}
.badge-primary[href]:hover,
.badge-primary[href]:focus {
background-color: #286090;
}
.badge-success {
background-color: #5cb85c;
}
.badge-success[href]:hover,
.badge-success[href]:focus {
background-color: #449d44;
}
.badge-info {
background-color: #5bc0de;
}
.badge-info[href]:hover,
.badge-info[href]:focus {
background-color: #31b0d5;
}
.badge-warning {
background-color: #f0ad4e;
}
.badge-warning[href]:hover,
.badge-warning[href]:focus {
background-color: #ec971f;
}
.badge-danger {
background-color: #d9534f;
}
.badge-danger[href]:hover,
.badge-danger[href]:focus {
background-color: #c9302c;
}
@media only screen and (max-width: 480px) {
.thumbnail_graph_table b { font-size : 6px;}
.thumbnail_graph_table img {

View File

@ -544,9 +544,12 @@ if (is_file("includes/print-menubar-custom.inc.php")) {
$notifications = new ObjectCache('notifications');
$style = '';
if (empty($notifications['count']) && empty($notifications['sticky_count'])) {
$style = 'style="background-color:grey; color:white;"';
$class = 'badge-default';
} else {
$class = 'badge-danger';
}
echo('<a href="#" class="dropdown-toggle" data-hover="dropdown" data-toggle="dropdown"><i class="fa fa-user fa-fw fa-lg fa-nav-icons" aria-hidden="true"></i> <span class="visible-xs-inline-block">User</span><span class="badge badge-navbar-user '.$class.'">'.($notifications['sticky_count']+$notifications['count']).'</span></a>');
}
echo('<a href="#" class="dropdown-toggle" data-hover="dropdown" data-toggle="dropdown"><i class="fa fa-user fa-fw fa-lg fa-nav-icons"></i> <span class="visible-xs-inline-block">User</span><span class="badge" '.$style.'>'.($notifications['sticky_count']+$notifications['count']).'</span></a>');
?>
<ul class="dropdown-menu">
<li role="presentation" class="dropdown-header"> Settings</li>