Commit 69fb5dc7 authored by catch's avatar catch

Issue #2226933 by cs_shadow, tim.plunkett, mandar.harkare, mortendk: Remove...

Issue #2226933 by cs_shadow, tim.plunkett, mandar.harkare, mortendk: Remove odd, even, first & last classes from views-view-unformatted.html.twig.
parent 37421317
...@@ -29,7 +29,6 @@ display: ...@@ -29,7 +29,6 @@ display:
grouping: { } grouping: { }
row_class: '' row_class: ''
default_row_class: true default_row_class: true
row_class_special: true
override: true override: true
sticky: false sticky: false
summary: '' summary: ''
......
...@@ -36,7 +36,6 @@ display: ...@@ -36,7 +36,6 @@ display:
grouping: { } grouping: { }
row_class: '' row_class: ''
default_row_class: true default_row_class: true
row_class_special: true
type: ul type: ul
wrapper_class: item-list wrapper_class: item-list
class: '' class: ''
......
...@@ -64,7 +64,6 @@ display: ...@@ -64,7 +64,6 @@ display:
grouping: { } grouping: { }
row_class: '' row_class: ''
default_row_class: true default_row_class: true
row_class_special: true
override: true override: true
sticky: false sticky: false
caption: '' caption: ''
...@@ -989,7 +988,6 @@ display: ...@@ -989,7 +988,6 @@ display:
grouping: { } grouping: { }
row_class: '' row_class: ''
default_row_class: true default_row_class: true
row_class_special: true
override: true override: true
sticky: false sticky: false
caption: '' caption: ''
......
...@@ -110,7 +110,6 @@ display: ...@@ -110,7 +110,6 @@ display:
grouping: { } grouping: { }
row_class: '' row_class: ''
default_row_class: true default_row_class: true
row_class_special: true
uses_fields: false uses_fields: false
provider: views provider: views
row: row:
......
...@@ -39,7 +39,6 @@ display: ...@@ -39,7 +39,6 @@ display:
grouping: { } grouping: { }
row_class: '' row_class: ''
default_row_class: true default_row_class: true
row_class_special: true
override: true override: true
sticky: true sticky: true
caption: '' caption: ''
......
...@@ -51,7 +51,6 @@ display: ...@@ -51,7 +51,6 @@ display:
grouping: { } grouping: { }
row_class: '' row_class: ''
default_row_class: true default_row_class: true
row_class_special: true
override: true override: true
sticky: false sticky: false
caption: '' caption: ''
......
...@@ -183,7 +183,6 @@ display: ...@@ -183,7 +183,6 @@ display:
grouping: { } grouping: { }
row_class: '' row_class: ''
default_row_class: true default_row_class: true
row_class_special: true
uses_fields: false uses_fields: false
title: '' title: ''
header: { } header: { }
......
...@@ -284,7 +284,6 @@ display: ...@@ -284,7 +284,6 @@ display:
grouping: { } grouping: { }
row_class: '' row_class: ''
default_row_class: true default_row_class: true
row_class_special: true
uses_fields: false uses_fields: false
order: asc order: asc
summary: '' summary: ''
......
...@@ -55,7 +55,6 @@ display: ...@@ -55,7 +55,6 @@ display:
grouping: { } grouping: { }
row_class: '' row_class: ''
default_row_class: true default_row_class: true
row_class_special: true
uses_fields: false uses_fields: false
title: '' title: ''
header: { } header: { }
......
...@@ -165,7 +165,6 @@ display: ...@@ -165,7 +165,6 @@ display:
grouping: { } grouping: { }
row_class: '' row_class: ''
default_row_class: true default_row_class: true
row_class_special: true
uses_fields: false uses_fields: false
provider: views provider: views
row: row:
......
...@@ -62,7 +62,6 @@ display: ...@@ -62,7 +62,6 @@ display:
grouping: { } grouping: { }
row_class: '' row_class: ''
default_row_class: true default_row_class: true
row_class_special: true
uses_fields: false uses_fields: false
row: row:
type: fields type: fields
......
...@@ -68,7 +68,6 @@ display: ...@@ -68,7 +68,6 @@ display:
grouping: { } grouping: { }
row_class: '' row_class: ''
default_row_class: true default_row_class: true
row_class_special: true
uses_fields: false uses_fields: false
provider: views provider: views
row: row:
......
...@@ -26,7 +26,6 @@ display: ...@@ -26,7 +26,6 @@ display:
grouping: { } grouping: { }
row_class: '' row_class: ''
default_row_class: true default_row_class: true
row_class_special: true
override: true override: true
sticky: false sticky: false
summary: '' summary: ''
......
...@@ -66,7 +66,6 @@ display: ...@@ -66,7 +66,6 @@ display:
grouping: { } grouping: { }
row_class: '' row_class: ''
default_row_class: true default_row_class: true
row_class_special: true
override: true override: true
sticky: false sticky: false
summary: '' summary: ''
......
...@@ -51,7 +51,6 @@ display: ...@@ -51,7 +51,6 @@ display:
grouping: { } grouping: { }
row_class: '' row_class: ''
default_row_class: true default_row_class: true
row_class_special: true
type: ul type: ul
wrapper_class: item-list wrapper_class: item-list
class: '' class: ''
......
...@@ -665,9 +665,6 @@ views_style: ...@@ -665,9 +665,6 @@ views_style:
default_row_class: default_row_class:
type: boolean type: boolean
label: 'Add views row classes' label: 'Add views row classes'
row_class_special:
type: boolean
label: 'Add striping (odd/even), first/last row classes'
uses_fields: uses_fields:
type: boolean type: boolean
label: 'Force using fields' label: 'Force using fields'
......
...@@ -227,7 +227,6 @@ protected function defineOptions() { ...@@ -227,7 +227,6 @@ protected function defineOptions() {
if ($this->usesRowClass()) { if ($this->usesRowClass()) {
$options['row_class'] = array('default' => ''); $options['row_class'] = array('default' => '');
$options['default_row_class'] = array('default' => TRUE, 'bool' => TRUE); $options['default_row_class'] = array('default' => TRUE, 'bool' => TRUE);
$options['row_class_special'] = array('default' => TRUE, 'bool' => TRUE);
} }
$options['uses_fields'] = array('default' => FALSE, 'bool' => TRUE); $options['uses_fields'] = array('default' => FALSE, 'bool' => TRUE);
...@@ -313,12 +312,6 @@ public function buildOptionsForm(&$form, &$form_state) { ...@@ -313,12 +312,6 @@ public function buildOptionsForm(&$form, &$form_state) {
'#type' => 'checkbox', '#type' => 'checkbox',
'#default_value' => $this->options['default_row_class'], '#default_value' => $this->options['default_row_class'],
); );
$form['row_class_special'] = array(
'#title' => t('Add striping (odd/even), first/last row classes'),
'#description' => t('Add css classes to the first and last line, as well as odd/even classes for striping.'),
'#type' => 'checkbox',
'#default_value' => $this->options['row_class_special'],
);
} }
if (!$this->usesFields() || !empty($this->options['uses_fields'])) { if (!$this->usesFields() || !empty($this->options['uses_fields'])) {
......
...@@ -111,7 +111,6 @@ display: ...@@ -111,7 +111,6 @@ display:
grouping: { } grouping: { }
row_class: '' row_class: ''
default_row_class: true default_row_class: true
row_class_special: true
row: row:
type: fields type: fields
fields: fields:
......
...@@ -52,7 +52,6 @@ display: ...@@ -52,7 +52,6 @@ display:
grouping: { } grouping: { }
row_class: '' row_class: ''
default_row_class: '1' default_row_class: '1'
row_class_special: '1'
override: '1' override: '1'
sticky: '0' sticky: '0'
summary: summary-text summary: summary-text
......
...@@ -499,8 +499,6 @@ function template_preprocess_views_view_table(&$variables) { ...@@ -499,8 +499,6 @@ function template_preprocess_views_view_table(&$variables) {
$options = $view->style_plugin->options; $options = $view->style_plugin->options;
$handler = $view->style_plugin; $handler = $view->style_plugin;
$row_class_special = isset($options['row_class_special']) ? $options['row_class_special'] : TRUE;
$fields = &$view->field; $fields = &$view->field;
$columns = $handler->sanitizeColumns($options['columns'], $fields); $columns = $handler->sanitizeColumns($options['columns'], $fields);
...@@ -676,7 +674,6 @@ function template_preprocess_views_view_table(&$variables) { ...@@ -676,7 +674,6 @@ function template_preprocess_views_view_table(&$variables) {
$variables['header'] = array(); $variables['header'] = array();
} }
$count = 0;
foreach ($variables['rows'] as $num => $row) { foreach ($variables['rows'] as $num => $row) {
$variables['rows'][$num]['attributes'] = array(); $variables['rows'][$num]['attributes'] = array();
if ($row_class = $handler->getRowClass($num)) { if ($row_class = $handler->getRowClass($num)) {
...@@ -869,15 +866,10 @@ function template_preprocess_views_view_unformatted(&$variables) { ...@@ -869,15 +866,10 @@ function template_preprocess_views_view_unformatted(&$variables) {
$options = $style->options; $options = $style->options;
$default_row_class = isset($options['default_row_class']) ? $options['default_row_class'] : FALSE; $default_row_class = isset($options['default_row_class']) ? $options['default_row_class'] : FALSE;
$row_class_special = isset($options['row_class_special']) ? $options['row_class_special'] : FALSE;
// Set up striping values.
$count = 0;
$max = count($rows);
foreach ($rows as $id => $row) { foreach ($rows as $id => $row) {
$variables['rows'][$id] = array(); $variables['rows'][$id] = array();
$variables['rows'][$id]['content'] = $row; $variables['rows'][$id]['content'] = $row;
$variables['rows'][$id]['attributes'] = array(); $variables['rows'][$id]['attributes'] = array();
$count++;
if ($default_row_class) { if ($default_row_class) {
$variables['rows'][$id]['attributes']['class'][] = 'views-row'; $variables['rows'][$id]['attributes']['class'][] = 'views-row';
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment