diff options
Diffstat (limited to 'modules/taxonomy/taxonomy.admin.inc')
-rw-r--r-- | modules/taxonomy/taxonomy.admin.inc | 23 |
1 files changed, 11 insertions, 12 deletions
diff --git a/modules/taxonomy/taxonomy.admin.inc b/modules/taxonomy/taxonomy.admin.inc index a3cf56644..dacdb4c06 100644 --- a/modules/taxonomy/taxonomy.admin.inc +++ b/modules/taxonomy/taxonomy.admin.inc @@ -73,13 +73,13 @@ function theme_taxonomy_overview_vocabularies($form) { $row[] = drupal_render($vocabulary['name']); $row[] = drupal_render($vocabulary['types']); if (isset($vocabulary['weight'])) { - $vocabulary['weight']['#attributes']['class'] = 'vocabulary-weight'; + $vocabulary['weight']['#attributes']['class'] = array('vocabulary-weight'); $row[] = drupal_render($vocabulary['weight']); } $row[] = drupal_render($vocabulary['edit']); $row[] = drupal_render($vocabulary['list']); $row[] = drupal_render($vocabulary['add']); - $rows[] = array('data' => $row, 'class' => 'draggable'); + $rows[] = array('data' => $row, 'class' => array('draggable')); } } @@ -601,9 +601,9 @@ function theme_taxonomy_overview_terms($form) { $row = array(); $row[] = (isset($term['#term']['depth']) && $term['#term']['depth'] > 0 ? theme('indentation', $term['#term']['depth']) : '') . drupal_render($term['view']); if ($form['#parent_fields']) { - $term['tid']['#attributes']['class'] = 'term-id'; - $term['parent']['#attributes']['class'] = 'term-parent'; - $term['depth']['#attributes']['class'] = 'term-depth'; + $term['tid']['#attributes']['class'] = array('term-id'); + $term['parent']['#attributes']['class'] = array('term-parent'); + $term['depth']['#attributes']['class'] = array('term-depth'); $row[0] .= drupal_render($term['parent']) . drupal_render($term['tid']) . drupal_render($term['depth']); } $row[] = drupal_render($term['edit']); @@ -616,32 +616,31 @@ function theme_taxonomy_overview_terms($form) { // Add necessary classes to rows. $row_position = 0; foreach ($rows as $key => $row) { - $classes = array(); + $rows[$key]['class'] = array(); if (isset($form['#parent_fields'])) { - $classes[] = 'draggable'; + $rows[$key]['class'][] = 'draggable'; } // Add classes that mark which terms belong to previous and next pages. if ($row_position < $back_peddle || $row_position >= $page_entries - $forward_peddle) { - $classes[] = 'taxonomy-term-preview'; + $rows[$key]['class'][] = 'taxonomy-term-preview'; } if ($row_position !== 0 && $row_position !== count($rows) - 1) { if ($row_position == $back_peddle - 1 || $row_position == $page_entries - $forward_peddle - 1) { - $classes[] = 'taxonomy-term-divider-top'; + $rows[$key]['class'][] = 'taxonomy-term-divider-top'; } elseif ($row_position == $back_peddle || $row_position == $page_entries - $forward_peddle) { - $classes[] = 'taxonomy-term-divider-bottom'; + $rows[$key]['class'][] = 'taxonomy-term-divider-bottom'; } } // Add an error class if this row contains a form error. foreach ($errors as $error_key => $error) { if (strpos($error_key, $key) === 0) { - $classes[] = 'error'; + $rows[$key]['class'][] = 'error'; } } - $rows[$key]['class'] = implode(' ', $classes); $row_position++; } |