diff -urp 5.x/upload_preview/upload_preview.info 6.x/upload_preview/upload_preview.info
--- 5.x/upload_preview/upload_preview.info	2007-01-30 18:35:02.000000000 +0100
+++ 6.x/upload_preview/upload_preview.info	2008-04-27 23:19:27.000000000 +0200
@@ -1,8 +1,9 @@
 ; $Id: upload_preview.info,v 1.1 2006/12/23 13:38:33 timcn Exp $
 name = Upload preview
 description = Adds image preview thumbnails to the file attachment section.
-dependencies = upload
-; Information added by drupal.org packaging script on 2007-01-30
-version = "5.x-1.2"
+dependencies[] = upload
+core = 6.x
+
+version = "6.x-dev"
 project = "upload_preview"
 
diff -urp 5.x/upload_preview/upload_preview.module 6.x/upload_preview/upload_preview.module
--- 5.x/upload_preview/upload_preview.module	2007-01-30 18:24:41.000000000 +0100
+++ 6.x/upload_preview/upload_preview.module	2008-04-27 23:19:27.000000000 +0200
@@ -10,7 +10,7 @@
 /**
  * Implementation of hook_form_alter().
  */
-function upload_preview_form_alter($form_id, &$form) {
+function upload_preview_form_alter(&$form, $form_state, $form_id) {
   if (isset($form['type']) && $form['type']['#value'] .'_node_form' == $form_id) {
     // Alter the file listing.
     _upload_preview_node_form($form['attachments']['wrapper']['files'], $form['#node']->vid);
@@ -238,31 +238,60 @@ function _upload_preview_prerequisites(&
   }
 }
 
+/**
+ * Implementation of hook_theme()
+ */
+function upload_preview_theme() {
+  return array(
+    'upload_preview_form_current' => array(
+      'arguments' => array('form' => NULL),
+      /*'file' => 'upload_preview.module'*/
+    ),
+    'upload_preview_image' => array(
+      'arguments' => array('element' => NULL),
+      /*'file' => 'upload_preview.module'*/
+    )
+    );
+}
 
 /**
  * Theme the attachments list.
  */
 function theme_upload_preview_form_current(&$form) {
-  $header = array(t('Preview'), array('data' => t('Description'), 'colspan' => 3));
+  $header = array(t('Preview'), t('Description'), t('Weight'));
+  drupal_add_tabledrag('upload-attachments', 'order', 'sibling', 'upload-weight');
 
   foreach (element_children($form) as $key) {
+    // Add class to group weight fields for drag and drop.
+    $form[$key]['weight']['#attributes']['class'] = 'upload-weight';
+    $form[$key]['description']['#cols'] = 20;
+    
     // Split up in two rows as the addition image would make the table too wide.
     // The first row contains the image and the description...
+    $divs = array();
+    $divs[] = drupal_render($form[$key]['remove']);
+    $divs[] = drupal_render($form[$key]['list']);
+    $divs[] = drupal_render($form[$key]['size']);
+    
+    $divs = '<br /><div style="float: left;margin-right:20px;">'.implode('</div><div style="float: left;margin-right:20px;">', $divs).'</div>';
+    
     $row = array();
-    $row[] = array('data' => drupal_render($form[$key]['preview']), 'rowspan' => 2);
-    $row[] = array('data' => drupal_render($form[$key]['description']), 'colspan' => 3);
-    $rows[] = $row;
+    $row[] = array('data' => drupal_render($form[$key]['preview']));
+    $row[] = array('data' => drupal_render($form[$key]['description']).$divs);
+    $row[] = array('data' => drupal_render($form[$key]['weight']));
+    $rows[] = array('data' => $row, 'class' => 'draggable');
 
     // ... and the second row contains the list/remove checkboxes and the size information.
+    /*
     $row = array();
     $row[] = drupal_render($form[$key]['remove']);
     $row[] = drupal_render($form[$key]['list']);
     $row[] = drupal_render($form[$key]['size']);
-    $rows[] = $row;
+    $rows[] = $row;*/
   }
 
   if (count($rows)) {
-    $output = theme('table', $header, $rows);
+    $output = theme('table', $header, $rows, array('id' => 'upload-attachments'));
     $output .= drupal_render($form);
   }
 
