Droppable: Remove core event/alias and deprecated module dependencies

This commit is contained in:
Alexander Schmitz 2015-05-13 21:58:16 -04:00
parent ce949812b6
commit 35ef105430
3 changed files with 6 additions and 6 deletions

View File

@ -124,7 +124,7 @@
} }
// resolve the icons behavior with event delegation // resolve the icons behavior with event delegation
$( "ul.gallery > li" ).click(function( event ) { $( "ul.gallery > li" ).on( "click", function( event ) {
var $item = $( this ), var $item = $( this ),
$target = $( event.target ); $target = $( event.target );

View File

@ -134,7 +134,7 @@ test( "tolerance, intersect", function() {
left: 0 left: 0
}); });
droppable.unbind( "drop" ).bind( "drop", function() { droppable.off( "drop" ).on( "drop", function() {
equal( true, data[ 2 ], data[ 3 ] ); equal( true, data[ 2 ], data[ 3 ] );
}); });
@ -173,7 +173,7 @@ test( "tolerance, pointer", function() {
$.each( dataset, function() { $.each( dataset, function() {
var data = this; var data = this;
droppable.unbind( "drop" ).bind( "drop", function() { droppable.off( "drop" ).on( "drop", function() {
equal( true, data[ 2 ], data[ 3 ] ); equal( true, data[ 2 ], data[ 3 ] );
}); });
@ -187,7 +187,7 @@ test( "tolerance, pointer", function() {
draggable.css({ top: 0, left: 0 }).draggable( "option", "axis", "x" ); draggable.css({ top: 0, left: 0 }).draggable( "option", "axis", "x" );
droppable.css({ top: 15, left: 15 }); droppable.css({ top: 15, left: 15 });
droppable.unbind( "drop" ).bind( "drop", function() { droppable.off( "drop" ).on( "drop", function() {
ok( true, "drop fires as long as pointer is within droppable" ); ok( true, "drop fires as long as pointer is within droppable" );
}); });

View File

@ -348,7 +348,7 @@ $.ui.ddmanager = {
}, },
dragStart: function( draggable, event ) { dragStart: function( draggable, event ) {
// Listen for scrolling so that if the dragging causes scrolling the position of the droppables can be recalculated (see #5003) // Listen for scrolling so that if the dragging causes scrolling the position of the droppables can be recalculated (see #5003)
draggable.element.parentsUntil( "body" ).bind( "scroll.droppable", function() { draggable.element.parentsUntil( "body" ).on( "scroll.droppable", function() {
if ( !draggable.options.refreshPositions ) { if ( !draggable.options.refreshPositions ) {
$.ui.ddmanager.prepareOffsets( draggable, event ); $.ui.ddmanager.prepareOffsets( draggable, event );
} }
@ -409,7 +409,7 @@ $.ui.ddmanager = {
}, },
dragStop: function( draggable, event ) { dragStop: function( draggable, event ) {
draggable.element.parentsUntil( "body" ).unbind( "scroll.droppable" ); draggable.element.parentsUntil( "body" ).off( "scroll.droppable" );
// Call prepareOffsets one final time since IE does not fire return scroll events when overflow was caused by drag (see #5003) // Call prepareOffsets one final time since IE does not fire return scroll events when overflow was caused by drag (see #5003)
if ( !draggable.options.refreshPositions ) { if ( !draggable.options.refreshPositions ) {
$.ui.ddmanager.prepareOffsets( draggable, event ); $.ui.ddmanager.prepareOffsets( draggable, event );