mirror of
https://github.com/tuxis-ie/nsedit.git
synced 2025-07-10 17:43:58 +03:00
Merge commit 'd21ea7816e
' as 'jquery-ui'
This commit is contained in:
commit
e904a80717
629 changed files with 341074 additions and 0 deletions
63
jquery-ui/tests/unit/droppable/droppable_events.js
vendored
Normal file
63
jquery-ui/tests/unit/droppable/droppable_events.js
vendored
Normal file
|
@ -0,0 +1,63 @@
|
|||
(function( $ ) {
|
||||
|
||||
module( "droppable: events" );
|
||||
|
||||
test( "droppable destruction/recreation on drop event", function() {
|
||||
expect( 1 );
|
||||
|
||||
var config = {
|
||||
activeClass: "active",
|
||||
drop: function() {
|
||||
var element = $( this ),
|
||||
newDroppable = $( "<div>" )
|
||||
.css({ width: 100, height: 100 })
|
||||
.text( "Droppable" );
|
||||
element.after( newDroppable );
|
||||
element.remove();
|
||||
newDroppable.droppable( config );
|
||||
}
|
||||
},
|
||||
|
||||
draggable = $( "#draggable1" ).draggable(),
|
||||
droppable1 = $( "#droppable1" ).droppable( config ),
|
||||
droppable2 = $( "#droppable2" ).droppable( config ),
|
||||
|
||||
droppableOffset = droppable1.offset(),
|
||||
draggableOffset = draggable.offset(),
|
||||
dx = droppableOffset.left - draggableOffset.left,
|
||||
dy = droppableOffset.top - draggableOffset.top;
|
||||
|
||||
draggable.simulate( "drag", {
|
||||
dx: dx,
|
||||
dy: dy
|
||||
});
|
||||
|
||||
ok( !droppable2.hasClass( "active" ), "subsequent droppable no longer active" );
|
||||
});
|
||||
|
||||
|
||||
|
||||
// todo: comment the following in when ready to actually test
|
||||
/*
|
||||
test("activate", function() {
|
||||
ok(false, 'missing test - untested code is broken code');
|
||||
});
|
||||
|
||||
test("deactivate", function() {
|
||||
ok(false, 'missing test - untested code is broken code');
|
||||
});
|
||||
|
||||
test("over", function() {
|
||||
ok(false, 'missing test - untested code is broken code');
|
||||
});
|
||||
|
||||
test("out", function() {
|
||||
ok(false, 'missing test - untested code is broken code');
|
||||
});
|
||||
|
||||
test("drop", function() {
|
||||
ok(false, 'missing test - untested code is broken code');
|
||||
});
|
||||
*/
|
||||
|
||||
})( jQuery );
|
Loading…
Add table
Add a link
Reference in a new issue