diff options
author | Gábor Hojtsy <gabor@hojtsy.hu> | 2007-12-16 10:36:53 +0000 |
---|---|---|
committer | Gábor Hojtsy <gabor@hojtsy.hu> | 2007-12-16 10:36:53 +0000 |
commit | a859f4a0e8b3469e0e6bbc5f4f9246acd641137b (patch) | |
tree | ff79d5981ba32ad42ce3ccea697adc7818e4265c /misc/tabledrag.js | |
parent | a2ae92457ac8a80265971e477337ee9323f0084c (diff) | |
download | brdo-a859f4a0e8b3469e0e6bbc5f4f9246acd641137b.tar.gz brdo-a859f4a0e8b3469e0e6bbc5f4f9246acd641137b.tar.bz2 |
#197641 follow up by moofie: make drag and drop handle text translatable and fix smaller bugs
Diffstat (limited to 'misc/tabledrag.js')
-rw-r--r-- | misc/tabledrag.js | 6 |
1 files changed, 3 insertions, 3 deletions
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 = $('<a href="#" title="Drag to re-order" class="tabledrag-handle"><div class="handle"> </div></a>'); + var handle = $('<a href="#" class="tabledrag-handle"><div class="handle"> </div></a>').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. |