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:
grouping: { }
row_class: ''
default_row_class: true
row_class_special: true
override: true
sticky: false
summary: ''
......
......@@ -36,7 +36,6 @@ display:
grouping: { }
row_class: ''
default_row_class: true
row_class_special: true
type: ul
wrapper_class: item-list
class: ''
......
......@@ -64,7 +64,6 @@ display:
grouping: { }
row_class: ''
default_row_class: true
row_class_special: true
override: true
sticky: false
caption: ''
......@@ -989,7 +988,6 @@ display:
grouping: { }
row_class: ''
default_row_class: true
row_class_special: true
override: true
sticky: false
caption: ''
......
......@@ -110,7 +110,6 @@ display:
grouping: { }
row_class: ''
default_row_class: true
row_class_special: true
uses_fields: false
provider: views
row:
......
......@@ -39,7 +39,6 @@ display:
grouping: { }
row_class: ''
default_row_class: true
row_class_special: true
override: true
sticky: true
caption: ''
......
......@@ -51,7 +51,6 @@ display:
grouping: { }
row_class: ''
default_row_class: true
row_class_special: true
override: true
sticky: false
caption: ''
......
......@@ -183,7 +183,6 @@ display:
grouping: { }
row_class: ''
default_row_class: true
row_class_special: true
uses_fields: false
title: ''
header: { }
......
......@@ -284,7 +284,6 @@ display:
grouping: { }
row_class: ''
default_row_class: true
row_class_special: true
uses_fields: false
order: asc
summary: ''
......
......@@ -55,7 +55,6 @@ display:
grouping: { }
row_class: ''
default_row_class: true
row_class_special: true
uses_fields: false
title: ''
header: { }
......
......@@ -165,7 +165,6 @@ display:
grouping: { }
row_class: ''
default_row_class: true
row_class_special: true
uses_fields: false
provider: views
row:
......
......@@ -62,7 +62,6 @@ display:
grouping: { }
row_class: ''
default_row_class: true
row_class_special: true
uses_fields: false
row:
type: fields
......
......@@ -68,7 +68,6 @@ display:
grouping: { }
row_class: ''
default_row_class: true
row_class_special: true
uses_fields: false
provider: views
row:
......
......@@ -26,7 +26,6 @@ display:
grouping: { }
row_class: ''
default_row_class: true
row_class_special: true
override: true
sticky: false
summary: ''
......
......@@ -66,7 +66,6 @@ display:
grouping: { }
row_class: ''
default_row_class: true
row_class_special: true
override: true
sticky: false
summary: ''
......
......@@ -51,7 +51,6 @@ display:
grouping: { }
row_class: ''
default_row_class: true
row_class_special: true
type: ul
wrapper_class: item-list
class: ''
......
......@@ -665,9 +665,6 @@ views_style:
default_row_class:
type: boolean
label: 'Add views row classes'
row_class_special:
type: boolean
label: 'Add striping (odd/even), first/last row classes'
uses_fields:
type: boolean
label: 'Force using fields'
......
......@@ -227,7 +227,6 @@ protected function defineOptions() {
if ($this->usesRowClass()) {
$options['row_class'] = array('default' => '');
$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);
......@@ -313,12 +312,6 @@ public function buildOptionsForm(&$form, &$form_state) {
'#type' => 'checkbox',
'#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'])) {
......
......@@ -111,7 +111,6 @@ display:
grouping: { }
row_class: ''
default_row_class: true
row_class_special: true
row:
type: fields
fields:
......
......@@ -52,7 +52,6 @@ display:
grouping: { }
row_class: ''
default_row_class: '1'
row_class_special: '1'
override: '1'
sticky: '0'
summary: summary-text
......
......@@ -499,8 +499,6 @@ function template_preprocess_views_view_table(&$variables) {
$options = $view->style_plugin->options;
$handler = $view->style_plugin;
$row_class_special = isset($options['row_class_special']) ? $options['row_class_special'] : TRUE;
$fields = &$view->field;
$columns = $handler->sanitizeColumns($options['columns'], $fields);
......@@ -676,7 +674,6 @@ function template_preprocess_views_view_table(&$variables) {
$variables['header'] = array();
}
$count = 0;
foreach ($variables['rows'] as $num => $row) {
$variables['rows'][$num]['attributes'] = array();
if ($row_class = $handler->getRowClass($num)) {
......@@ -869,15 +866,10 @@ function template_preprocess_views_view_unformatted(&$variables) {
$options = $style->options;
$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) {
$variables['rows'][$id] = array();
$variables['rows'][$id]['content'] = $row;
$variables['rows'][$id]['attributes'] = array();
$count++;
if ($default_row_class) {
$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