Moved GridField table padding to buttons

Avoid double padding when no bottom buttons exist
This commit is contained in:
Ingo Schommer 2013-06-14 13:50:50 +02:00
parent 6a4ec840d2
commit 7ce9677dcb
3 changed files with 7 additions and 3 deletions

View File

@ -30,7 +30,7 @@ Used in side panels and action tabs
.cms .ss-gridfield .add-existing-autocompleter span { display: -moz-inline-stack; display: inline-block; vertical-align: top; *vertical-align: auto; zoom: 1; *display: inline; }
.cms .ss-gridfield .add-existing-autocompleter input.relation-search { width: 270px; margin-bottom: 12px; }
.cms .ss-gridfield .grid-csv-button, .cms .ss-gridfield .grid-print-button { margin-bottom: 12px; display: -moz-inline-stack; display: inline-block; vertical-align: middle; *vertical-align: auto; zoom: 1; *display: inline; }
.cms table.ss-gridfield-table { display: table; -moz-box-shadow: none; -webkit-box-shadow: none; box-shadow: none; padding: 0; border-collapse: separate; border-bottom: 0 none; width: 100%; margin-bottom: 12px; }
.cms table.ss-gridfield-table { display: table; -moz-box-shadow: none; -webkit-box-shadow: none; box-shadow: none; padding: 0; border-collapse: separate; border-bottom: 0 none; width: 100%; }
.cms table.ss-gridfield-table thead { color: #323e46; background: transparent; }
.cms table.ss-gridfield-table thead tr.filter-header .fieldgroup { max-width: 512px; }
.cms table.ss-gridfield-table thead tr.filter-header .fieldgroup .fieldgroup-field { padding: 0; }
@ -127,3 +127,4 @@ Used in side panels and action tabs
.cms table.ss-gridfield-table tr.last td { border-bottom: 0 none; }
.cms table.ss-gridfield-table td:first-child { border-left: 1px solid rgba(0, 0, 0, 0.1); }
.cms table.ss-gridfield-table td:last-child { border-right: 1px solid rgba(0, 0, 0, 0.1); }
.cms .grid-bottom-button { margin-top: 12px; }

View File

@ -53,7 +53,7 @@ class GridFieldExportButton implements GridField_HTMLProvider, GridField_ActionP
$button->setAttribute('data-icon', 'download-csv');
$button->addExtraClass('no-ajax');
return array(
$this->targetFragment => '<p class="grid-csv-button">' . $button->Field() . '</p>',
$this->targetFragment => '<p class="grid-bottom-button grid-csv-button">' . $button->Field() . '</p>',
);
}

View File

@ -127,7 +127,6 @@ $gf_grid_x: 16px;
border-collapse: separate;
border-bottom: 0 none;
width: 100%;
margin-bottom:$gf_grid_y;
thead {
color: darken($color-base, 50%);
@ -641,4 +640,8 @@ $gf_grid_x: 16px;
border-right: 1px solid $gf_colour_border;
}
}
.grid-bottom-button {
margin-top:$gf_grid_y;
}
}