rem: this.rtl = $('body').css('direction') == 'rtl' ? -1 : 1; 
add: this.rtl = $(this.table).css('direction') == 'rtl' ? -1 : 1; 
context: Drupal.tableDrag = function(table, tableSettings) {  var self = this;  // Required object variables.  this.table = table;  this.tableSettings = tableSettings;  this.dragObject = null; // Used to hold information about a current drag operation.  this.rowObject = null; // Provides operations for row manipulation.  this.oldRowElement = null; // Remember the previous element.  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.  // Configure the scroll settings.  this.scrollSettings = { amount: 4, interval: 50, trigger: 70 };  this.scrollInterval = null;  this.scrollY = 0;  this.windowHeight = 0;  // Check this table's settings to see if there are parent relationships in  // this table. For efficiency, large sections of code can be skipped if we  // don't need to track horizontal movement and indentations.  this.indentEnabled = false;  for (group in tableSettings) {    for (n in tableSettings[group]) {      if (tableSettings[group][n]['relationship'] == 'parent') {        this.indentEnabled = true;      }      if (tableSettings[group][n]['limit'] > 0) {        this.maxDepth = tableSettings[group][n]['limit'];      }    }  }  if (this.indentEnabled) {    this.oldX = 0;    this.indentCount = 1; // Total width of indents, set in makeDraggable.    // Find the width of indentations to measure mouse movements against.    // Because the table doesn't need to start with any indentations, we    // manually create an empty div, check it's width, then remove.    var indent = $(Drupal.theme('tableDragIndentation')).appendTo('body');    this.indentAmount = parseInt(indent.css('width'));    indent.remove();  }  // Make each applicable row draggable.  $('tr.draggable', table).each(function() { self.makeDraggable(this); });  // Hide columns containing affected form elements.  this.hideColumns();  // Add mouse bindings to the document. The self variable is passed along  // as event handlers do not have direct access to the tableDrag object.  $(document).bind('mousemove', function(event) { self.dragRow(event, self); });  $(document).bind('mouseup', function(event) { self.dropRow(event, self); });};
meta: 639	/local1/tlutelli/issta_data/temp/all_js/javascript/2007_temp/2007/639/a859f4a0e8b3469e0e6bbc5f4f9246acd641137b/tabledrag.js/buggy/misc/tabledrag.js