From a859f4a0e8b3469e0e6bbc5f4f9246acd641137b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?G=C3=A1bor=20Hojtsy?= Date: Sun, 16 Dec 2007 10:36:53 +0000 Subject: #197641 follow up by moofie: make drag and drop handle text translatable and fix smaller bugs --- misc/tabledrag.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'misc/tabledrag.js') diff --git a/misc/tabledrag.js b/misc/tabledrag.js index 295dd820a..46a89b2fa 100644 --- a/misc/tabledrag.js +++ b/misc/tabledrag.js @@ -13,7 +13,7 @@ */ Drupal.behaviors.tableDrag = function(context) { for (var base in Drupal.settings.tableDrag) { - if (!$('#' + base + '.tabledrag-processed').size(), context) { + if (!$('#' + base + '.tabledrag-processed', context).size()) { var tableSettings = Drupal.settings.tableDrag[base]; $('#' + base).filter(':not(.tabledrag-processed)').each(function() { @@ -47,7 +47,7 @@ Drupal.tableDrag = function(table, tableSettings) { this.oldY = 0; // Used to determine up or down direction from last mouse move. this.changed = false; // Whether anything in the entire table has changed. this.maxDepth = 0; // Maximum amount of allowed parenting. - this.rtl = $('body').css('direction') == 'rtl' ? -1 : 1; // Direction of the page language. + this.rtl = $(this.table).css('direction') == 'rtl' ? -1 : 1; // Direction of the table. // Configure the scroll settings. this.scrollSettings = { amount: 4, interval: 50, trigger: 70 }; @@ -162,7 +162,7 @@ Drupal.tableDrag.prototype.makeDraggable = function(item) { var self = this; // Create the handle. - var handle = $('
 
'); + var handle = $('
 
').attr('title', Drupal.t('Drag to re-order')); // Insert the handle after indentations (if any). if ($('td:first .indentation:last', item).after(handle).size()) { // Update the total width of indentation in this entire table. -- cgit v1.2.3