Final grid refactor for all templates and CSS/JS (newgrid -> grid)

This commit is contained in:
Lance Edgar 2017-07-14 21:15:22 -05:00
parent c57e2e17cc
commit 292546e44b
26 changed files with 329 additions and 687 deletions

View file

@ -1,179 +1,278 @@
/********************************************************************************
* grids.css
*
* Style tweaks for the new grids.
********************************************************************************/
/******************************
* Grid Header
* header table
******************************/
table.grid-header {
padding-bottom: 5px;
.grid-wrapper .grid-header td.filters {
vertical-align: bottom;
width: 100%;
}
.grid-wrapper .grid-header td.menu {
padding: 0.5em;
vertical-align: top;
white-space: nowrap;
}
/******************************
* Form (Filters etc.)
******************************/
table.grid-header td.form {
.grid-wrapper .grid-header td.tools {
margin: 0;
padding: 0;
vertical-align: bottom;
white-space: nowrap;
}
.grid-wrapper .grid-header td.tools p {
line-height: 2em;
margin: 0;
padding: 0 0.5em 0 0;
}
.grid-wrapper .grid-header td.tools form {
display: inline-block;
}
/******************************
* Context Menu
* filters
******************************/
table.grid-header td.context-menu {
.grid-wrapper .newfilters {
margin: 0;
}
.grid-wrapper .newfilters fieldset {
margin: 0;
padding: 1px 5px 5px 5px;
width: 80%;
}
.grid-wrapper .newfilters .filter {
margin-bottom: 2px;
}
.grid-wrapper .newfilters .filter:last-child {
margin-bottom: 0;
}
.grid-wrapper .newfilters .filter .toggle {
margin: 0;
text-align: left;
width: 15em;
}
.grid-wrapper .newfilters .ui-button-text {
line-height: 1.4em;
}
.grid-wrapper .ui-button-text-icon-primary .ui-button-text {
padding: 0.2em 1em 0.2em 2.1em;
}
.grid-wrapper .ui-selectmenu-button .ui-selectmenu-text {
padding: 0.2em 2.1em 0.2em 1em;
}
.grid-wrapper .newfilters .filter label {
font-weight: bold;
padding: 0.4em 0.2em;
position: relative;
top: -14px;
}
.grid-wrapper .newfilters .filter .value {
display: inline-block;
vertical-align: top;
}
table.grid-header td.context-menu ul {
list-style-type: none;
margin: 0px;
text-align: right;
.grid-wrapper .newfilters .filter .value input {
height: 19px;
}
table.grid-header td.context-menu ul li {
line-height: 2em;
.grid-wrapper .newfilters .filter .inputs {
display: inline-block;
/* TODO: Would be nice not to hard-code a height here... */
height: 26px;
vertical-align: top;
}
/******************************
* Tools
******************************/
table.grid-header td.tools {
padding-bottom: 10px;
text-align: right;
vertical-align: bottom;
.grid-wrapper .newfilters .buttons {
margin: 0.5em 0 0 0;
padding: 0;
}
table.grid-header td.tools div.buttons button {
margin-left: 5px;
.grid-wrapper .newfilters #add-filter-button {
margin-right: 5px;
vertical-align: middle;
}
/******************************
* Grid
* table
******************************/
div.grid {
.grid {
clear: both;
margin-top: 1em;
}
div.grid table {
background-color: White;
border-top: 1px solid black;
border-left: 1px solid black;
.grid.no-border {
margin-top: 0;
}
.grid table {
background-color: white;
border: 1px solid black;
border-collapse: collapse;
font-size: 9pt;
font-size: 10pt;
line-height: normal;
white-space: nowrap;
}
div.grid.full table {
.grid.full table {
width: 100%;
}
div.grid.no-border table {
.grid.half table {
width: 50%;
}
.grid.no-border table {
border-left: none;
border-top: none;
}
div.grid table th,
div.grid table td {
/******************************
* thead
******************************/
.grid tr.header td {
border-right: 1px solid black;
border-bottom: 1px solid black;
font-weight: bold;
padding: 2px 3px;
text-align: center;
}
div.grid table th.sortable a {
/* .grid table thead th:last-child { */
/* border-right: none; */
/* } */
.grid tr.header a {
display: block;
padding-right: 18px;
}
div.grid table th.sorted {
.grid tr.header .asc,
.grid tr.header .dsc {
background-position: right center;
background-repeat: no-repeat;
}
div.grid table th.sorted.asc {
.grid tr.header .asc {
background-image: url(../img/sort_arrow_up.png);
}
div.grid table th.sorted.desc {
.grid tr.header .dsc {
background-image: url(../img/sort_arrow_down.png);
}
div.grid table tbody td {
text-align: left;
/******************************
* tbody
******************************/
.grid tbody td {
padding: 5px 6px;
}
div.grid table tbody td.center {
text-align: center;
.grid.selectable tbody td {
cursor: default;
}
div.grid table tbody td.right {
float: none;
text-align: right;
}
div.grid table tr.odd {
.grid tr.odd {
background-color: #e0e0e0;
}
div.grid table tbody tr.hovering {
.grid tr:not(.header).hovering {
background-color: #bbbbbb;
}
div.grid table tbody tr td.checkbox {
.grid tr:not(.header).warning.odd {
background-color: #fcc;
}
.grid tr:not(.header).warning.even {
background-color: #ebb;
}
.grid tr:not(.header).warning.hovering {
background-color: #daa;
}
.grid tr:not(.header).notice.odd {
background-color: #fe8;
}
.grid tr:not(.header).notice.even {
background-color: #fd6;
}
.grid tr:not(.header).notice.hovering {
background-color: #ec7;
}
.grid tr:not(.header) td.checkbox {
text-align: center;
}
div.grid table tbody tr td.view,
div.grid table tbody tr td.edit,
div.grid table tbody tr td.save,
div.grid table tbody tr td.delete {
background-repeat: no-repeat;
background-position: center;
cursor: pointer;
min-width: 18px;
text-align: center;
width: 18px;
/******************************
* main actions
******************************/
.grid .actions {
width: 1px;
}
div.grid table tbody tr td.view {
background-image: url(../img/view.png);
.grid .actions a {
margin: 0 5px 0 0;
position: relative;
top: -2px;
}
div.grid table tbody tr td.edit {
background-image: url(../img/edit.png);
.grid .actions a:last-child {
margin: 0;
}
div.grid table tbody tr td.save {
background-image: url(../img/save.png);
.grid .actions .ui-icon {
display: inline-block;
position: relative;
top: 3px;
}
div.grid table tbody tr td.delete {
background-image: url(../img/delete.png);
/******************************
* more actions
******************************/
.grid .actions div.more {
background-color: white;
border: 1px solid black;
display: none;
padding: 3px 10px 3px 5px;
position: absolute;
z-index: 1;
}
div.pager {
margin-bottom: 20px;
margin-top: 5px;
}
div.pager p {
font-size: 10pt;
margin: 0px;
}
div.pager p.showing {
float: left;
}
div.pager #grid-page-count {
font-size: 8pt;
}
div.pager p.page-links {
float: right;
.grid .actions .more a {
display: block;
padding: 2px 0;
}