/[drupal]/contributions/modules/send/theme/send.theme.inc
ViewVC logotype

Diff of /contributions/modules/send/theme/send.theme.inc

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph | View Patch Patch

revision 1.5, Fri Aug 7 01:00:05 2009 UTC revision 1.6, Mon Aug 17 21:38:15 2009 UTC
# Line 1  Line 1 
1  <?php // $Id: send.theme.inc,v 1.4 2009/05/22 17:18:35 vauxia Exp $  <?php // $Id: send.theme.inc,v 1.5 2009/08/07 01:00:05 vauxia Exp $
2    
3  function send_theme_theme() {  function send_theme_theme() {
4    $path = drupal_get_path('module', 'send') .'/theme';    $path = drupal_get_path('module', 'send') .'/theme';
# Line 123  function theme_send_body($body, $profile Line 123  function theme_send_body($body, $profile
123    
124  function theme_send_draggable($element) {  function theme_send_draggable($element) {
125    $id = $element['#id'] .'-table';    $id = $element['#id'] .'-table';
126      $weight_class = $element['#id'] .'-weight';
127    
128    $rows = array();    $rows = array();
129    foreach (element_children($element) as $key) {    foreach (element_children($element) as $key) {
130        $weight = "";
131        if (isset($element[$key]['weight'])) {
132          $element[$key]['weight']['#attributes']['class'] = $weight_class;
133          $weight = drupal_render($element[$key]['weight']);
134        }
135        $content = drupal_render($element[$key]);
136    
137      $rows[] = array(      $rows[] = array(
138        'data' => array(drupal_render($element[$key])),        'data' => array($content, $weight),
139        'class' => 'draggable',        'class' => 'draggable',
140      );      );
141    }    }
142    
143    drupal_add_tabledrag($id, 'order', 'sibling', $id .'-weight');    drupal_add_tabledrag($id, 'order', 'sibling', $weight);
144    
145    $output = theme('table', array(), $rows, array('id' => $id));    $output = theme('table', array(), $rows, array('id' => $id));
146    return $output;    return $output;

Legend:
Removed from v.1.5  
changed lines
  Added in v.1.6

  ViewVC Help
Powered by ViewVC 1.1.2