diff options
author | Angie Byron <webchick@24967.no-reply.drupal.org> | 2009-02-18 13:46:55 +0000 |
---|---|---|
committer | Angie Byron <webchick@24967.no-reply.drupal.org> | 2009-02-18 13:46:55 +0000 |
commit | ac484c277a0ac0627561d2cac1f4ea47ab5da00b (patch) | |
tree | eac82650ab4c17d3f62461127403e2aff344cd82 /misc/tabledrag.js | |
parent | b6025a8820ffc84fccbde3a8f77ba6f9c183bfc4 (diff) | |
download | brdo-ac484c277a0ac0627561d2cac1f4ea47ab5da00b.tar.gz brdo-ac484c277a0ac0627561d2cac1f4ea47ab5da00b.tar.bz2 |
#125030 by kkaefer, quicksketch, dvessel, Steven, and John Resig: Allow compatibility with other JavaScript libraries.
Diffstat (limited to 'misc/tabledrag.js')
-rw-r--r-- | misc/tabledrag.js | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/misc/tabledrag.js b/misc/tabledrag.js index 3fce73041..aea64d617 100644 --- a/misc/tabledrag.js +++ b/misc/tabledrag.js @@ -1,4 +1,5 @@ // $Id$ +(function($) { /** * Drag and drop table rows with field manipulation. @@ -321,7 +322,9 @@ Drupal.tableDrag.prototype.makeDraggable = function(item) { var groupHeight = 0; nextGroup = new self.row(nextRow, 'keyboard', self.indentEnabled, self.maxDepth, false); if (nextGroup) { - $(nextGroup.group).each(function () {groupHeight += $(this).is(':hidden') ? 0 : this.offsetHeight}); + $(nextGroup.group).each(function () { + groupHeight += $(this).is(':hidden') ? 0 : this.offsetHeight; + }); nextGroupRow = $(nextGroup.group).filter(':last').get(0); self.rowObject.swap('after', nextGroupRow); // No need to check for indentation, 0 is the only valid one. @@ -957,7 +960,7 @@ Drupal.tableDrag.prototype.row.prototype.validIndentInterval = function (prevRow } return {'min':minIndent, 'max':maxIndent}; -} +}; /** * Indent a row within the legal bounds of the table. @@ -1021,7 +1024,7 @@ Drupal.tableDrag.prototype.row.prototype.findSiblings = function(rowSettings) { // Either add immediately if this is a flat table, or check to ensure // that this row has the same level of indentation. if (this.indentEnabled) { - var checkRowIndentation = $('.indentation', checkRow).length + var checkRowIndentation = $('.indentation', checkRow).length; } if (!(this.indentEnabled) || (checkRowIndentation == rowIndentation)) { @@ -1096,3 +1099,5 @@ Drupal.theme.prototype.tableDragIndentation = function () { Drupal.theme.prototype.tableDragChangedWarning = function () { return '<div class="warning">' + Drupal.theme('tableDragChangedMarker') + ' ' + Drupal.t("Changes made in this table will not be saved until the form is submitted.") + '</div>'; }; + +})(jQuery);
\ No newline at end of file |