Implements action colors as per style guide. Fixes bug 921741.

Change-Id: I84cfe9d4ed3c6ae60e6532ec420880bc5cc45fa9
This commit is contained in:
Gabriel Hurley 2012-01-25 14:58:22 -08:00
parent 1e46e3653d
commit 166ec2f295
4 changed files with 42 additions and 21 deletions

View File

@ -32,7 +32,7 @@ LOG = logging.getLogger(__name__)
class AllocateIP(tables.LinkAction):
name = "allocate"
verbose_name = _("Allocate IP To Tenant")
attrs = {"class": "ajax-modal btn primary small"}
attrs = {"class": "ajax-modal btn small"}
url = "horizon:nova:access_and_security:floating_ips:allocate"
def single(self, data_table, request, *args):

View File

@ -17,7 +17,7 @@ class CreateUserLink(tables.LinkAction):
verbose_name = _("Create User")
url = "horizon:syspanel:users:create"
attrs = {
"class": "ajax-modal btn primary small",
"class": "ajax-modal btn small",
}

View File

@ -42,7 +42,7 @@ class BaseAction(object):
def __init__(self):
self.attrs = getattr(self, "attrs", {})
self.classes = []
self.classes = getattr(self, "classes", [])
def allowed(self, request, datum):
""" Determine whether this action is allowed for the current request.

View File

@ -754,6 +754,22 @@ td.actions_column {
min-height: 20px;
}
td.actions_column .row_actions a,
td.actions_column .row_actions input,
td.actions_column .row_actions button {
background: none;
float: none;
display: block;
padding: 5px 10px;
color: black;
text-align: left;
border-radius: 0;
border: 0 none;
-webkit-box-shadow: none;
-moz-box-shadow: none;
box-shadow: none;
}
/* Makes size consistent across browsers when mixing "btn-group" and "small" */
.btn-group > .btn.small {
height: 12px;
@ -768,27 +784,32 @@ td.actions_column {
}
.dropdown-menu button {
line-height: 18px; /* Matches rule for ".dropdown-menu a" in bootstrap */
width: 100%;
}
td.actions_column ul.row_actions li:hover {
background-color: #cdcdcd;
}
td.actions_column ul.row_actions a,
td.actions_column ul.row_actions input,
td.actions_column ul.row_actions button {
background: none;
float: none;
display: block;
padding: 5px 10px;
color: black;
text-align: left;
.btn-group .dropdown-menu .btn {
border-radius: 0;
border: 0 none;
-webkit-box-shadow: none;
-moz-box-shadow: none;
box-shadow: none;
}
.dropdown-menu .btn.danger,
.dropdown-menu .btn.danger:hover,
.dropdown-menu .btn.success,
.dropdown-menu .btn.success:hover,
.dropdown-menu .btn.info, .btn.info:hover {
text-shadow: none; /* remove default bootstrap shadowing from button text. */
}
.dropdown-menu li:hover {
background: none;
}
td.actions_column .dropdown-menu a:hover,
td.actions_column .dropdown-menu button:hover {
background-color: #CDCDCD;
}
.dropdown-menu .btn.danger {
color: #C43C35;
}
.dropdown-menu .btn.danger:hover {
background-color: #f6e0df;
}
/* Overrides for single-action rows (no dropdown) */