function theme_forena_element_draggable in Forena Reports 7.5
Same name and namespace in other branches
- 8 forena.report.inc \theme_forena_element_draggable()
- 7.4 forena.report.inc \theme_forena_element_draggable()
5 theme calls to theme_forena_element_draggable()
- FrxCrosstab::configForm in src/
Renderer/ FrxCrosstab.php - Crosstab configuration form.
- FrxFieldTable::configForm in src/
Renderer/ FrxFieldTable.php - Template configuration form @parmater $configuration form
- FrxSection::configForm in src/
Renderer/ FrxSection.php - Generate configuration.
- FrxSVGGraph::configForm in src/
Renderer/ FrxSVGGraph.php - Returns the section Enter description here ...
- FrxTable::configForm in src/
Renderer/ FrxTable.php - Returns the section Enter description here ...
File
- ./
forena.report.inc, line 1471
Code
function theme_forena_element_draggable($variables) {
$output = '';
$element = $variables['element'];
$id = $element['#draggable_id'];
$headers = array();
$rows = array();
foreach (element_children($element) as $e_key) {
$element[$e_key]['weight']['#attributes']['class'] = array(
$id . '-weight',
);
$row = array();
foreach (element_children($element[$e_key]) as $ctl) {
if (isset($element[$e_key][$ctl]['#title'])) {
$headers[$ctl] = $element[$e_key][$ctl]['#title'];
$element[$e_key][$ctl]['#title_display'] = 'invisible';
$e = drupal_render($element[$e_key][$ctl]);
$row[] = $e;
}
}
$rows[] = array(
'data' => $row,
'class' => array(
'draggable',
),
);
}
$output = theme('table', array(
'header' => $headers,
'rows' => $rows,
'attributes' => array(
'id' => $id,
),
));
drupal_add_tabledrag($id, 'order', 'group', $id . '-weight');
//$output .= drupal_render_children($element);
return $output;
}