From 52b6df5b729dd53668de21776f879cc6d4ee22d3 Mon Sep 17 00:00:00 2001 From: webchick Date: Tue, 14 Feb 2012 13:54:16 -0500 Subject: Issue #1414824 by nod_: Fixed Leaking vars in tabledrag.js. --- misc/tabledrag.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'misc/tabledrag.js') diff --git a/misc/tabledrag.js b/misc/tabledrag.js index 0461491f2..4d4edfbd0 100644 --- a/misc/tabledrag.js +++ b/misc/tabledrag.js @@ -402,12 +402,12 @@ Drupal.tableDrag.prototype.makeDraggable = function (item) { if ($(item).is('.tabledrag-root')) { // Swap with the next group (necessarily a top-level one). var groupHeight = 0; - nextGroup = new self.row(nextRow, 'keyboard', self.indentEnabled, self.maxDepth, false); + var nextGroup = new self.row(nextRow, 'keyboard', self.indentEnabled, self.maxDepth, false); if (nextGroup) { $(nextGroup.group).each(function () { groupHeight += $(this).is(':hidden') ? 0 : this.offsetHeight; }); - nextGroupRow = $(nextGroup.group).filter(':last').get(0); + var nextGroupRow = $(nextGroup.group).filter(':last').get(0); self.rowObject.swap('after', nextGroupRow); // No need to check for indentation, 0 is the only valid one. window.scrollBy(0, parseInt(groupHeight, 10)); @@ -1042,8 +1042,8 @@ Drupal.tableDrag.prototype.row.prototype.validIndentInterval = function (prevRow Drupal.tableDrag.prototype.row.prototype.indent = function (indentDiff) { // Determine the valid indentations interval if not available yet. if (!this.interval) { - prevRow = $(this.element).prev('tr').get(0); - nextRow = $(this.group).filter(':last').next('tr').get(0); + var prevRow = $(this.element).prev('tr').get(0); + var nextRow = $(this.group).filter(':last').next('tr').get(0); this.interval = this.validIndentInterval(prevRow, nextRow); } -- cgit v1.2.3