1
0
mirror of https://github.com/node-red/node-red.git synced 2023-10-10 13:36:53 +02:00

Tidy deploy button css

This commit is contained in:
Nick O'Leary 2015-04-13 21:50:40 +01:00
parent 5af6ac3e80
commit 8403f6291f
2 changed files with 84 additions and 92 deletions

View File

@ -43,8 +43,8 @@ RED.deploy = (function() {
if (type == "default") { if (type == "default") {
$('<li><span class="deploy-button-group button-group">'+ $('<li><span class="deploy-button-group button-group">'+
'<a id="btn-deploy" class="action-deploy disabled" href="#"><img id="btn-deploy-icon" src="red/images/deploy-full-o.png"> <span>Deploy</span></a>'+ '<a id="btn-deploy" class="deploy-button disabled" href="#"><img id="btn-deploy-icon" src="red/images/deploy-full-o.png"> <span>Deploy</span></a>'+
'<a id="btn-deploy-options" data-toggle="dropdown" class="" href="#"><i class="fa fa-caret-down"></i></a>'+ '<a id="btn-deploy-options" data-toggle="dropdown" class="deploy-button" href="#"><i class="fa fa-caret-down"></i></a>'+
'</span></li>').prependTo(".header-toolbar"); '</span></li>').prependTo(".header-toolbar");
RED.menu.init({id:"btn-deploy-options", RED.menu.init({id:"btn-deploy-options",
options: [ options: [
@ -61,7 +61,7 @@ RED.deploy = (function() {
} }
$('<li><span class="deploy-button-group button-group">'+ $('<li><span class="deploy-button-group button-group">'+
'<a id="btn-deploy" class="action-deploy disabled" href="#">'+ '<a id="btn-deploy" class="deploy-button disabled" href="#">'+
(icon?'<img id="btn-deploy-icon" src="'+icon+'"> ':'')+ (icon?'<img id="btn-deploy-icon" src="'+icon+'"> ':'')+
'<span>'+label+'</span></a>'+ '<span>'+label+'</span></a>'+
'</span></li>').prependTo(".header-toolbar"); '</span></li>').prependTo(".header-toolbar");

View File

@ -48,29 +48,29 @@ span.logo {
font-size: 30px; font-size: 30px;
line-height: 30px; line-height: 30px;
text-decoration: none; text-decoration: none;
}
span.logo span { span {
vertical-align: middle; vertical-align: middle;
font-size: 16px !important; font-size: 16px !important;
} }
span.logo img { img {
height: 18px; height: 18px;
}
} }
#header ul.header-toolbar {
.header-toolbar {
padding: 0; padding: 0;
margin: 0; margin: 0;
list-style: none; list-style: none;
float: right; float: right;
}
#header ul.header-toolbar > li { > li {
display: inline-block;
padding: 0; padding: 0;
margin: 0; margin: 0;
position: relative; position: relative;
}
#header ul.header-toolbar > li { }
display: inline-block;
} }
.button { .button {
@ -90,96 +90,88 @@ span.logo img {
vertical-align: middle; vertical-align: middle;
border-left: 2px solid #000; border-left: 2px solid #000;
border-right: 2px solid #000; border-right: 2px solid #000;
}
#header .button:not(.disabled):hover { &:hover {
border-color: $headerMenuItemHover; border-color: $headerMenuItemHover;
} }
#btn-deploy {
background: $deployButton;
color: #eee !important;
}
#btn-deploy + a {
background: $deployButton;
color: #eee;
}
#btn-deploy + a:hover {
background: $deployButtonHover;
color: #eee;
}
#btn-deploy + a:active {
background: $deployButtonActive;
color: #ccc;
}
span.deploy-button-group.open > #btn-deploy + a {
background: $activeButton !important;
}
#btn-deploy:not(.disabled):hover {
background: $deployButtonHover;
}
#btn-deploy:not(.disabled):active {
background: $deployButtonActive !important;
}
#btn-deploy:not(.disabled):active {
color: #ccc !important;
}
#btn-deploy.disabled {
cursor: default;
background: $deployDisabledButton;
color: #999 !important;
}
#btn-deploy.disabled + a {
background: $deployDisabledButton;
color: #ddd;
}
#btn-deploy.disabled + a:hover {
background: $deployDisabledButtonHover;
color: #ddd;
}
#btn-deploy.disabled + a:active {
background: $deployDisabledButton;
color: #ddd;
}
span.deploy-button-group.open > #btn-deploy.disabled + a {
background: $activeButton !important;
}
#btn-deploy img {
margin-right: 8px;
}
#btn-deploy.disabled img {
opacity: 0.3;
} }
.button-group { .button-group {
display: inline-block; display: inline-block;
margin: auto 15px; margin: auto 15px;
vertical-align: middle; vertical-align: middle;
background: $deployDisabledButtonHover;
clear: both; clear: both;
} }
.button-group > a { .button-group > a {
display: inline-block;
float: left; float: left;
line-height: 22px; line-height: 22px;
font-size: 14px; font-size: 14px;
text-decoration: none; text-decoration: none;
display: inline-block;
padding: 4px 8px; padding: 4px 8px;
color: #ccc;
margin: 0; margin: 0;
} }
#header .button:active, #header .button.active { .deploy-button {
background: $deployButton;
color: #eee !important;
&:hover {
background: $deployButtonHover;
}
&:active {
background: $deployButtonActive;
color: #ccc !important;
}
}
#btn-deploy {
padding: 4px 12px;
&.disabled {
cursor: default;
background: $deployDisabledButton;
color: #999 !important;
img {
opacity: 0.3;
}
&+ #btn-deploy-options {
background: $deployDisabledButton;
color: #ddd;
}
&+ #btn-deploy-options:hover {
background: $deployDisabledButtonHover;
}
&+ #btn-deploy-options:active {
background: $deployDisabledButton;
}
}
img {
margin-right: 8px;
}
}
.deploy-button-group.open {
#btn-deploy-options {
background: $activeButton !important;
}
}
#header .button {
&:active, &.active {
background: $activeButton; background: $activeButton;
} }
#header .button:focus { &:focus {
outline: none; outline: none;
}
} }
#header li.open .button { #header li.open .button {
background: $activeButton; background: $activeButton;
border-color: $activeButton; border-color: $activeButton;