Changeset 689

Show
Ignore:
Timestamp:
09/18/08 02:51:50 (18 months ago)
Author:
paul.bakaus
Message:

droppable: $.ui.ddmanager.drop now returns false in case of non-drop, or the actual droppable (instead of true) in the case of a drop.
draggable: implemented patch that allows revert to be a callback, receives one argument which is the droppable (implements #3175)

Location:
trunk/ui
Files:
2 modified

Legend:

Unmodified
Added
Removed
  • trunk/ui/ui.draggable.js

    r683 r689  
    310310                        var dropped = $.ui.ddmanager.drop(this, e);              
    311311                 
    312                 if((this.options.revert == "invalid" && !dropped) || (this.options.revert == "valid" && dropped) || this.options.revert === true) { 
     312                if((this.options.revert == "invalid" && !dropped) || (this.options.revert == "valid" && dropped) || this.options.revert === true || ($.isFunction(this.options.revert) && this.options.revert.call(this.element, dropped))) { 
    313313                        var self = this; 
    314314                        $(this.helper).animate(this.originalPosition, parseInt(this.options.revertDuration, 10) || 500, function() { 
  • trunk/ui/ui.droppable.js

    r678 r689  
    108108                        $.ui.plugin.call(this, 'drop', [e, this.ui(draggable)]); 
    109109                        this.element.triggerHandler("drop", [e, this.ui(draggable)], this.options.drop); 
    110                         return true; 
     110                        return this.element; 
    111111                } 
    112112