mirror of
https://github.com/jquery/jquery-ui.git
synced 2024-11-21 11:04:24 +00:00
sortable unit tests - fixed el.css not a function
This commit is contained in:
parent
81099914a9
commit
c7361062d0
@ -2,26 +2,6 @@
|
||||
* sortable_core.js
|
||||
*/
|
||||
|
||||
var el, offsetBefore, offsetAfter, dragged;
|
||||
|
||||
var drag = function(handle, dx, dy) {
|
||||
offsetBefore = $(handle).offset();
|
||||
$(handle).simulate("drag", {
|
||||
dx: dx || 0,
|
||||
dy: dy || 0
|
||||
});
|
||||
dragged = { dx: dx, dy: dy };
|
||||
offsetAfter = $(handle).offset();
|
||||
}
|
||||
|
||||
var sort = function(handle, dx, dy, index, msg) {
|
||||
drag(handle, dx, dy);
|
||||
equals($(handle).parent().children().index(handle), index, msg);
|
||||
}
|
||||
|
||||
var border = function(el, side) { return parseInt(el.css('border-' + side + '-width')); }
|
||||
var margin = function(el, side) { return parseInt(el.css('margin-' + side)); }
|
||||
|
||||
(function($) {
|
||||
|
||||
module("sortable: core");
|
||||
|
@ -3,6 +3,23 @@
|
||||
*/
|
||||
(function($) {
|
||||
|
||||
var el, offsetBefore, offsetAfter, dragged;
|
||||
|
||||
var drag = function(handle, dx, dy) {
|
||||
offsetBefore = $(handle).offset();
|
||||
$(handle).simulate("drag", {
|
||||
dx: dx || 0,
|
||||
dy: dy || 0
|
||||
});
|
||||
dragged = { dx: dx, dy: dy };
|
||||
offsetAfter = $(handle).offset();
|
||||
}
|
||||
|
||||
var sort = function(handle, dx, dy, index, msg) {
|
||||
drag(handle, dx, dy);
|
||||
equals($(handle).parent().children().index(handle), index, msg);
|
||||
}
|
||||
|
||||
module("sortable: methods");
|
||||
|
||||
test("init", function() {
|
||||
|
@ -3,6 +3,23 @@
|
||||
*/
|
||||
(function($) {
|
||||
|
||||
var el, offsetBefore, offsetAfter, dragged;
|
||||
|
||||
var drag = function(handle, dx, dy) {
|
||||
offsetBefore = $(handle).offset();
|
||||
$(handle).simulate("drag", {
|
||||
dx: dx || 0,
|
||||
dy: dy || 0
|
||||
});
|
||||
dragged = { dx: dx, dy: dy };
|
||||
offsetAfter = $(handle).offset();
|
||||
}
|
||||
|
||||
var sort = function(handle, dx, dy, index, msg) {
|
||||
drag(handle, dx, dy);
|
||||
equals($(handle).parent().children().index(handle), index, msg);
|
||||
}
|
||||
|
||||
module("sortable: tickets");
|
||||
|
||||
test("#3019: Stop fires too early", function() {
|
||||
|
Loading…
Reference in New Issue
Block a user