Skip to content
Snippets Groups Projects
Commit 41e00315 authored by Kevin Hankens's avatar Kevin Hankens
Browse files

Adding more CSS formatting to make the widget easier to read

parent c4394307
No related branches found
No related tags found
No related merge requests found
......@@ -24,9 +24,15 @@
margin: 0 0 0 0;
padding: 0 0 0 0;
}
.form-tablefield .tablefield-row-0 {
.form-tablefield table tr.tablefield-row-0 {
border-bottom: 2px solid #555;
}
.form-tablefield input.tablefield-row-0 {
font-weight: bold;
}
.form-tablefield tr.tablefield-even input {
background-color: #e4f4f4;
}
.form-tablefield table,
.form-tablefield fieldset {
margin: 0.5em 0;
......
......@@ -299,8 +299,9 @@ function tablefield_field_widget_form(&$form, &$form_state, $field, $instance, $
'#markup' => '<table>',
);
for ($i = 0; $i < $count_rows; $i++) {
$zebra = $i % 2 == 0 ? 'even' : 'odd';
$element['tablefield']['b_break' . $i] = array(
'#markup' => '<tr>',
'#markup' => '<tr class="tablefield-row-' . $i . ' tablefield-' . $zebra . '">',
);
for ($ii = 0; $ii < $count_cols; $ii++) {
$cell_default = isset($default_value[$i][$ii]) ? $default_value[$i][$ii] : '';
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment