function theme_slider_pro_layers_table in Slider Pro 7
Custom theme function to render layers input table.
Parameters
type $vars:
Return value
type
1 theme call to theme_slider_pro_layers_table()
- slider_pro_style_plugin::options_form in views/
slider_pro_style_plugin.inc - Adds Slider Pro configuration form options.
File
- ./
slider_pro.module, line 72
Code
function theme_slider_pro_layers_table($vars) {
$element = $vars['element'];
$rows = array();
foreach (element_children($element) as $key) {
$rows[] = array(
'data' => array(
drupal_render($element[$key]['fields']),
drupal_render($element[$key]['background']),
drupal_render($element[$key]['data_position']),
drupal_render($element[$key]['data_show_transition']),
drupal_render($element[$key]['data_hide_transition']),
drupal_render($element[$key]['data_show_delay']),
drupal_render($element[$key]['data_stay_duration']),
drupal_render($element[$key]['remove']),
drupal_render($element[$key]['weight']),
),
// To support the tabledrag behaviour, we need to assign each row of the
// table a class attribute of 'draggable'. This will add the 'draggable'
// class to the <tr> element for that row when the final table is
// rendered.
'class' => array(
'draggable',
),
);
}
$header = array(
t('Fields'),
t('Background'),
t('Position'),
t('Show transition'),
t('Hide transition'),
t('Delay'),
t('Stay duration'),
'',
t('Weight'),
);
// Add table dragging.
drupal_add_tabledrag('slider-pro-layers-table', 'order', 'sibling', 'order-weight');
return theme('table', array(
'header' => $header,
'rows' => $rows,
'attributes' => array(
'id' => 'slider-pro-layers-table',
),
));
}