Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- $output = '';
- $output .= "This works:";
- $header = array('First name', 'Last name', 'Weight');
- $rows = array();
- $rows[] = array(
- 'data' =>array(
- array('data' => 'Mark'),
- array('data' => 'Smith'),
- array('data' => '<div class="test-weight form-item">2</div>'),
- ),
- 'class' => array('draggable'),
- );
- drupal_add_tabledrag('test-table', 'order', 'sibling', 'test-weight');
- $output .= theme('table', array('header' => $header, 'rows' => $rows, 'attributes' => array('id' => 'test-table')));
- $output .= "This is broken:";
- $header = array('First name', 'Last name', 'Weight');
- $rows = array();
- $rows[] = array(
- 'data' =>array(
- array('data' => 'Mark Smith', 'colspan' => 2),
- array('data' => '<div class="test-weight form-item">2</div>'),
- ),
- 'class' => array('draggable'),
- );
- drupal_add_tabledrag('test-table', 'order', 'sibling', 'test-weight');
- $output .= theme('table', array('header' => $header, 'rows' => $rows, 'attributes' => array('id' => 'test-table')));
- return $output;
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement