ux(): fixed issue with cach buster for temlpates, and updated on hover style for sidemenu to look better

This commit is contained in:
Torkel Ödegaard 2016-02-21 12:47:57 +01:00
parent 3781a099dd
commit cc4fdd6d0c
6 changed files with 27 additions and 12 deletions

View File

@ -48,11 +48,14 @@ export class GrafanaApp {
this.registerFunctions.service = $provide.service; this.registerFunctions.service = $provide.service;
this.registerFunctions.filter = $filterProvider.register; this.registerFunctions.filter = $filterProvider.register;
$provide.decorator("$http", ["$delegate", function($delegate) { $provide.decorator("$http", ["$delegate", "$templateCache", function($delegate, $templateCache) {
var get = $delegate.get; var get = $delegate.get;
$delegate.get = function(url, config) { $delegate.get = function(url, config) {
if (url.match(/\.html$/)) { if (url.match(/\.html$/)) {
url += "?v=" + new Date().getTime(); // some template's already exist in the cache
if (!$templateCache.get(url)) {
url += "?v=" + new Date().getTime();
}
} }
return get(url, config); return get(url, config);
}; };

View File

@ -166,8 +166,8 @@ $dropdownLinkColor: $text-color;
$dropdownLinkColorHover: $white; $dropdownLinkColorHover: $white;
$dropdownLinkColorActive: $white; $dropdownLinkColorActive: $white;
$dropdownLinkBackgroundActive: $blue-dark; $dropdownLinkBackgroundActive: $dark-4;
$dropdownLinkBackgroundHover: $blue-dark; $dropdownLinkBackgroundHover: $dark-4;
// COMPONENT VARIABLES // COMPONENT VARIABLES
@ -206,7 +206,7 @@ $navbarButtonBackgroundHighlight: lighten($navbarBackground, 5%);
// Sidemenu // Sidemenu
// ------------------------- // -------------------------
$side-menu-bg: $body-bg; $side-menu-bg: $body-bg;
$side-menu-item-hover-bg: $dark-4; $side-menu-item-hover-bg: $dark-3;
$side-menu-opacity: 0.97; $side-menu-opacity: 0.97;
// Pagination // Pagination

View File

@ -73,6 +73,7 @@
white-space: nowrap; white-space: nowrap;
background-color: $grafanaListBackground; background-color: $grafanaListBackground;
margin-bottom: 4px; margin-bottom: 4px;
.search-result-icon:before { .search-result-icon:before {
content: "\f009"; content: "\f009";
} }

View File

@ -58,8 +58,12 @@
li { li {
position: relative; position: relative;
@include left-brand-border();
&:hover { &:hover {
background-color: $side-menu-item-hover-bg;
@include left-brand-border-gradient();
.dropdown-menu { .dropdown-menu {
display: block; display: block;
opacity: 0; opacity: 0;
@ -125,10 +129,8 @@
line-height: 47px; line-height: 47px;
padding: 0px 10px 0px 10px; padding: 0px 10px 0px 10px;
display: block; display: block;
border-left: 1px solid transparent;
&:hover {
background-color: $side-menu-item-hover-bg;
}
.sidemenu-item-text { .sidemenu-item-text {
padding-left: 11px; padding-left: 11px;
@ -180,9 +182,6 @@
padding: 17px 10px 15px 14px; padding: 17px 10px 15px 14px;
box-sizing: border-box; box-sizing: border-box;
cursor: pointer; cursor: pointer;
&:hover {
background-color: $side-menu-item-hover-bg;
}
display: table; display: table;
position: relative; position: relative;
width: 100%; width: 100%;

View File

@ -331,4 +331,16 @@
background-image: linear-gradient($angle, rgba(255,255,255,.15) 25%, transparent 25%, transparent 50%, rgba(255,255,255,.15) 50%, rgba(255,255,255,.15) 75%, transparent 75%, transparent); background-image: linear-gradient($angle, rgba(255,255,255,.15) 25%, transparent 25%, transparent 50%, rgba(255,255,255,.15) 50%, rgba(255,255,255,.15) 75%, transparent 75%, transparent);
} }
@mixin left-brand-border() {
border-left: 1px solid transparent;
}
@mixin left-brand-border-gradient() {
border-left: 1px solid transparent;
border-image: linear-gradient(rgba(255,213,0,1) 0%, rgba(255,68,0,1) 99%, rgba(255,68,0,1) 100%);
border-image-slice: 1;
border-top: 0;
border-right: 0;
border-bottom: 0;
border-left: 1px solid transparent;
}