summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarc Ferran (aka Markus)2009-09-21 07:40:34 (GMT)
committer Marc Ferran (aka Markus)2009-09-21 07:40:34 (GMT)
commit06d67f9fbc6e33d4663b9615f2c4cb4344235a9f (patch)
treeac73d53cae6d5ebd8c883f80819b853b4d14d652
parentfffbc7a8f063345f7c14595ab6e1579e65c2a6db (diff)
- #580156 Wrap multigroups with unique CSS classes in node view.
-rw-r--r--CHANGELOG.txt1
-rw-r--r--modules/content_multigroup/content_multigroup.node_view.inc8
2 files changed, 7 insertions, 2 deletions
diff --git a/CHANGELOG.txt b/CHANGELOG.txt
index f5717f3..a683e71 100644
--- a/CHANGELOG.txt
+++ b/CHANGELOG.txt
@@ -26,6 +26,7 @@ Features:
- #531662 by neochief - i18n support. Allow external modules to translate field labels, descriptions and allowed values list as typed in the field settings form.
- #531662 i18n support for fieldgroups.
- #558420 Accept trimmed titles in nodereference autocomplete validation to prevent title mismatch errors when title ends with space.
+- #580156 Wrap multigroups with unique CSS classes in node view.
Bugfixes:
- #482774 Update breaks when CCK is disabled.
diff --git a/modules/content_multigroup/content_multigroup.node_view.inc b/modules/content_multigroup/content_multigroup.node_view.inc
index b54c97a..c297c2c 100644
--- a/modules/content_multigroup/content_multigroup.node_view.inc
+++ b/modules/content_multigroup/content_multigroup.node_view.inc
@@ -14,6 +14,7 @@ function _content_multigroup_fieldgroup_view(&$node, &$element, $group, $context
$node_copy = drupal_clone($node);
$group_name = $group['group_name'];
+ $group_class = 'content-multigroup-'. str_replace('_', '-', $group_name);
$group_multiple = (int)$group['settings']['multigroup']['multiple'];
$subgroup_settings = isset($group['settings']['multigroup']['subgroup']) ? $group['settings']['multigroup']['subgroup'] : array();
$show_label = isset($subgroup_settings['label']) ? $subgroup_settings['label'] : 'above';
@@ -80,25 +81,28 @@ function _content_multigroup_fieldgroup_view(&$node, &$element, $group, $context
switch ($subgroup_format) {
case 'simple':
+ $element['#attributes']['class'] = $group_class;
$element[$delta]['#theme'] = 'content_multigroup_display_simple';
$element[$delta]['#fields'] = $group_fields;
break;
case 'fieldset':
+ $element['#attributes']['class'] = $group_class;
$element[$delta]['#type'] = 'content_multigroup_display_fieldset';
$element[$delta]['#fields'] = $group_fields;
break;
case 'hr':
+ $element['#attributes']['class'] = $group_class;
$element[$delta]['#theme'] = 'content_multigroup_display_hr';
$element[$delta]['#fields'] = $group_fields;
break;
case 'table-single':
$element['#theme'] = 'content_multigroup_display_table_single';
- $element['#attributes']['class'] = 'content-multigroup-display-table-single-column';
+ $element['#attributes']['class'] = $group_class .' content-multigroup-display-table-single-column';
$element['#fields'] = $group_fields;
break;
case 'table-multiple':
$element['#theme'] = 'content_multigroup_display_table_multiple';
- $element['#attributes']['class'] = 'content-multigroup-display-table-multiple-columns';
+ $element['#attributes']['class'] = $group_class .' content-multigroup-display-table-multiple-columns';
$element['#fields'] = $group_fields;
break;
}