You are here

function theme_jw_player_sharing_sites_order in JW Player 7.2

Returns HTML for the sharing sites order form.

Copied from the core theme_filter_admin_format_filter_order() function.

Parameters

$variables: An associative array containing:

  • element: A render element representing the form.
1 theme call to theme_jw_player_sharing_sites_order()
jw_player_ctools_export_ui_form in plugins/export_ui/jw_player_ctools_export_ui.inc
Implements hook_ctools_export_ui_form().

File

theme/jw_player.theme.inc, line 21
jw_player.theme.inc

Code

function theme_jw_player_sharing_sites_order($variables) {
  $element = $variables['element'];

  // JW Player sharing sites order (tabledrag).
  $rows = array();
  foreach (element_children($element, TRUE) as $name) {
    $element[$name]['weight']['#attributes']['class'][] = 'jw-player-sharing-sites-order-weight';
    $rows[] = array(
      'data' => array(
        drupal_render($element[$name]['content']),
        drupal_render($element[$name]['weight']),
      ),
      'class' => array(
        'draggable',
      ),
    );
  }
  $output = drupal_render_children($element);
  $output .= theme('table', array(
    'rows' => $rows,
    'attributes' => array(
      'id' => 'jw-player-sharing-sites-order',
    ),
  ));
  drupal_add_tabledrag('jw-player-sharing-sites-order', 'order', 'sibling', 'jw-player-sharing-sites-order-weight', NULL, NULL, TRUE);
  return $output;
}