Clean-up javascript files

This commit is contained in:
Eike Foken
2011-08-15 23:25:24 +02:00
parent e1f3b8da54
commit cc134691ac
2 changed files with 46 additions and 45 deletions

View File

@@ -5,7 +5,7 @@
* Licensed like jQuery, see http://docs.jquery.com/License.
*
* Configuration options:
*
*
* onDragStyle
* This is the style that is assigned to the row during drag. There are limitations to the styles that can be
* associated with a row (such as you can't assign a border--well you can, but it won't be
@@ -28,7 +28,7 @@
* Pass a function that will be called when the user starts dragging. The function takes 2 parameters: the
* table and the row which the user has started to drag.
* onAllowDrop
* Pass a function that will be called as a row is over another row. If the function returns true, allow
* Pass a function that will be called as a row is over another row. If the function returns true, allow
* dropping on that row, otherwise not. The function takes 2 parameters: the dragged row and the row under
* the cursor. It returns a boolean: true allows the drop, false doesn't allow it.
* scrollAmount
@@ -40,7 +40,7 @@
* specify this class, then you are responsible for setting cursor: move in the CSS and only these cells
* will have the drag behaviour. If you do not specify a dragHandle, then you get the old behaviour where
* the whole row is draggable.
*
*
* Other ways to control behaviour:
*
* Add class="nodrop" to any rows for which you don't want to allow dropping, and class="nodrag" to any rows
@@ -52,7 +52,7 @@
*
* Other methods:
*
* $("...").tableDnDUpdate()
* $("...").tableDnDUpdate()
* Will update all the matching tables, that is it will reapply the mousedown method to the rows (or handle cells).
* This is useful if you have updated the table rows using Ajax and you want to make the table draggable again.
* The table maintains the original configuration (so you don't have to specify it again).
@@ -63,7 +63,7 @@
*
* Known problems:
* - Auto-scoll has some problems with IE7 (it scrolls even when it shouldn't), work-around: set scrollAmount to 0
*
*
* Version 0.2: 2008-02-20 First public version
* Version 0.3: 2008-02-07 Added onDragStart option
* Made the scroll amount configurable (default is 5 as before)
@@ -136,7 +136,7 @@ jQuery.tableDnD = {
}
return false;
});
})
});
} else {
// For backwards compatibility, we add the event to the whole row
var rows = jQuery("tr", table); // get all the rows as a wrapped set
@@ -167,7 +167,7 @@ jQuery.tableDnD = {
if (this.tableDnDConfig) {
jQuery.tableDnD.makeDraggable(this);
}
})
});
},
/** Get the mouse coordinates from the event (allowing for browser differences) */
@@ -241,7 +241,7 @@ jQuery.tableDnD = {
}
}
if (mousePos.y-yOffset < config.scrollAmount) {
window.scrollBy(0, -config.scrollAmount);
} else {
@@ -371,12 +371,10 @@ jQuery.tableDnD = {
return result;
}
}
};
jQuery.fn.extend(
{
tableDnD : jQuery.tableDnD.build,
tableDnDUpdate : jQuery.tableDnD.updateTables,
tableDnDSerialize: jQuery.tableDnD.serializeTables
}
);
jQuery.fn.extend({
tableDnD : jQuery.tableDnD.build,
tableDnDUpdate : jQuery.tableDnD.updateTables,
tableDnDSerialize: jQuery.tableDnD.serializeTables
});