Skip to content

Commit

Permalink
Implements action colors as per style guide. Fixes bug 921741.
Browse files Browse the repository at this point in the history
Change-Id: I84cfe9d4ed3c6ae60e6532ec420880bc5cc45fa9
  • Loading branch information
gabrielhurley committed Jan 25, 2012
1 parent 1e46e36 commit 166ec2f
Show file tree
Hide file tree
Showing 4 changed files with 41 additions and 20 deletions.
Expand Up @@ -32,7 +32,7 @@
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):
Expand Down
2 changes: 1 addition & 1 deletion horizon/horizon/dashboards/syspanel/users/tables.py
Expand Up @@ -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",
}


Expand Down
2 changes: 1 addition & 1 deletion horizon/horizon/tables/actions.py
Expand Up @@ -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.
Expand Down
55 changes: 38 additions & 17 deletions openstack-dashboard/dashboard/static/dashboard/css/style.css
Expand Up @@ -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;
Expand All @@ -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;
.btn-group .dropdown-menu .btn {
border-radius: 0;
}

td.actions_column ul.row_actions a,
td.actions_column ul.row_actions input,
td.actions_column ul.row_actions button {
.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;
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;
}
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) */

Expand Down

0 comments on commit 166ec2f

Please sign in to comment.