diff options
author | Angie Byron <webchick@24967.no-reply.drupal.org> | 2010-11-21 07:24:53 +0000 |
---|---|---|
committer | Angie Byron <webchick@24967.no-reply.drupal.org> | 2010-11-21 07:24:53 +0000 |
commit | d7f60066595aae432d43849e21ae569016942c5a (patch) | |
tree | 3a6de9a0fd65709e8ec7b021db81af27b13ef5d0 | |
parent | 3d2a7d26719a94cd9715c02dcd710bb90a9b64b4 (diff) | |
download | brdo-d7f60066595aae432d43849e21ae569016942c5a.tar.gz brdo-d7f60066595aae432d43849e21ae569016942c5a.tar.bz2 |
#942060 by Sweetchack: Add draggability to the new image effect row in image style table.
-rw-r--r-- | modules/image/image.admin.inc | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/modules/image/image.admin.inc b/modules/image/image.admin.inc index ae910e7a9..1f1121c05 100644 --- a/modules/image/image.admin.inc +++ b/modules/image/image.admin.inc @@ -700,10 +700,10 @@ function theme_image_style_effects($variables) { $rows = array(); foreach (element_children($form) as $key) { + $row = array(); + $form[$key]['weight']['#attributes']['class'] = array('image-effect-order-weight'); if (is_numeric($key)) { - $form[$key]['weight']['#attributes']['class'] = array('image-effect-order-weight'); $summary = drupal_render($form[$key]['summary']); - $row = array(); $row[] = drupal_render($form[$key]['label']) . (empty($summary) ? '' : ' ' . $summary); $row[] = drupal_render($form[$key]['weight']); $row[] = drupal_render($form[$key]['configure']); @@ -711,8 +711,6 @@ function theme_image_style_effects($variables) { } else { // Add the row for adding a new image effect. - $form['new']['weight']['#attributes']['class'] = array('image-effect-order-weight'); - $row = array(); $row[] = '<div class="image-style-new">' . drupal_render($form['new']['new']) . drupal_render($form['new']['add']) . '</div>'; $row[] = drupal_render($form['new']['weight']); $row[] = array('data' => '', 'colspan' => 2); @@ -721,7 +719,7 @@ function theme_image_style_effects($variables) { if (!isset($form[$key]['#access']) || $form[$key]['#access']) { $rows[] = array( 'data' => $row, - 'class' => !empty($form[$key]['weight']['#access']) ? array('draggable') : array(), + 'class' => !empty($form[$key]['weight']['#access']) || $key == 'new' ? array('draggable') : array(), ); } } |