MINOR Removed button styling for GridField, as its preliminary and doesn't apply to any action other than "delete"

This commit is contained in:
Ingo Schommer 2012-01-09 17:16:07 +01:00
parent d9538d3085
commit b01b9b9249
3 changed files with 13 additions and 15 deletions

View File

@ -2,9 +2,8 @@
.cms table.ss-gridfield { width: 100%; padding: 0; margin: 20px 0 0 0; border-collapse: separate; display: table; border-bottom: 0 none; } .cms table.ss-gridfield { width: 100%; padding: 0; margin: 20px 0 0 0; border-collapse: separate; display: table; border-bottom: 0 none; }
.cms table.ss-gridfield thead { color: #1d2224; background: transparent; } .cms table.ss-gridfield thead { color: #1d2224; background: transparent; }
.cms table.ss-gridfield tbody { background: #FFF; } .cms table.ss-gridfield tbody { background: #FFF; }
.cms table.ss-gridfield tbody td { /* Rounded buttons */ } .cms table.ss-gridfield tbody td { /* Emulate a link by default */ }
.cms table.ss-gridfield tbody td button { border: #CC0033 solid 1px; background: #CC0033; color: #FFF; -moz-border-radius: 15px; -webkit-border-radius: 15px; -o-border-radius: 15px; -ms-border-radius: 15px; -khtml-border-radius: 15px; border-radius: 15px; margin: 0 0 0 2px; padding: 0; width: auto; min-width: 30px; height: 30px; text-shadow: none; } .cms table.ss-gridfield tbody td button { border: none; background: none; margin: 0 0 0 2px; padding: 0; width: auto; text-shadow: none; }
.cms table.ss-gridfield tbody td button:hover { color: #222; }
.cms table.ss-gridfield tfoot { color: #1d2224; } .cms table.ss-gridfield tfoot { color: #1d2224; }
.cms table.ss-gridfield tfoot tr td { background: #95a5ab; padding: .7em; } .cms table.ss-gridfield tfoot tr td { background: #95a5ab; padding: .7em; }
.cms table.ss-gridfield tr.sortable-header th { background: #7f9198; } .cms table.ss-gridfield tr.sortable-header th { background: #7f9198; }

View File

@ -36,7 +36,7 @@ class GridFieldAction_Delete implements GridField_ColumnProvider, GridField_Acti
*/ */
public function getColumnMetadata($gridField, $columnName) { public function getColumnMetadata($gridField, $columnName) {
if($columnName == 'DeleteAction') { if($columnName == 'DeleteAction') {
return array('title' => 'Delete'); return array('title' => '');
} }
} }
@ -68,7 +68,13 @@ class GridFieldAction_Delete implements GridField_ColumnProvider, GridField_Acti
* @return string - the HTML for the column * @return string - the HTML for the column
*/ */
public function getColumnContent($gridField, $record, $columnName) { public function getColumnContent($gridField, $record, $columnName) {
$field = new GridField_Action($gridField, 'DeleteRecord'.$record->ID, "x", "deleterecord", array('RecordID' => $record->ID)); $field = new GridField_Action(
$gridField,
'DeleteRecord'.$record->ID,
_t('GridAction.Delete', "delete"),
"deleterecord",
array('RecordID' => $record->ID)
);
$output = $field->Field(); $output = $field->Field();
return $output; return $output;
} }

View File

@ -61,21 +61,14 @@ $gf_border_radius: 7px;
tbody { tbody {
background: #FFF; background: #FFF;
td { td {
/* Rounded buttons */ /* Emulate a link by default */
button { button {
border: #CC0033 solid 1px; border: none;
background: #CC0033; background: none;
color: #FFF;
@include border-radius(15px);
margin: 0 0 0 2px; margin: 0 0 0 2px;
padding: 0; padding: 0;
width: auto; width: auto;
min-width: 30px;
height: 30px;
text-shadow: none; text-shadow: none;
&:hover {
color: #222;
}
} }
} }
} }