Heine

  • home
  • drupal
  • drupal core commits
  • about
Home › Drupal Core Commits

Commit 339746 by webchick

#737596 by casey: Fixed tabledrag.js: ('.indentation', testCell).get(1) is undefined.

--- <a href="http://drupalcode.org/viewvc/drupal/drupal/misc/tabledrag.js" title="http://drupalcode.org/viewvc/drupal/drupal/misc/tabledrag.js" rel="nofollow">http://drupalcode.org/viewvc/drupal/drupal/misc/tabledrag.js</a> 2010/03/09 20:52:27     1.34
+++ <a href="http://drupalcode.org/viewvc/drupal/drupal/misc/tabledrag.js" title="http://drupalcode.org/viewvc/drupal/drupal/misc/tabledrag.js" rel="nofollow">http://drupalcode.org/viewvc/drupal/drupal/misc/tabledrag.js</a> 2010/03/10 20:31:59     1.35
@@ -73,10 +73,10 @@
     // manually append 2 indentations in the first draggable row, measure
     // the offset, then remove.
     var indent = Drupal.theme('tableDragIndentation');
-    // Match immediate children of the parent element to allow nesting.
-    var testCell = $('> tbody > tr.draggable:first td:first, > tr.draggable:first td:first', table).prepend(indent).prepend(indent);
+    var testRow = $('<tr/>').addClass('draggable').appendTo(table);
+    var testCell = $('<td/>').appendTo(testRow).prepend(indent).prepend(indent);
     this.indentAmount = $('.indentation', testCell).get(1).offsetLeft - $('.indentation', testCell).get(0).offsetLeft;
-    $('.indentation', testCell).slice(0, 2).remove();
+    testRow.remove();
   }
 
   // Make each applicable row draggable.

No votes yet
  • Drupal Core
  • Download patch

Recent posts

  • Planet Drupal past and current
  • Help! - Cannot access a global variable.
  • Why is my module's update hook not listed on update.php's selection form?
  • How do I add a class to a link generated with l()
  • ZeroDayScan - Full path disclosure bug in Drupal 6.16 (0day)
more

Security reviews

  • Afraid custom code makes your site vulnerable?
  • You don't really trust that module you just downloaded from Drupal.org?

Sleep better after a security review.

Tags

Captcha CSRF Drupal embed Input Format modx OpenID Performance Planet Drupal rants Security Varnish
more tags
  • home
  • drupal
  • drupal core commits
  • about

Copyright © 2010 by Heine Deelstra. All rights reserved.