From 146a8ecec8783cf7e75a5de783448835d408ad8d Mon Sep 17 00:00:00 2001 From: snesin Date: Fri, 19 Oct 2012 15:07:39 -0500 Subject: [PATCH 1/3] Update controller/controller.js bind method is supposed to return index in _bindings, not length of _bindings afterwards. --- controller/controller.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/controller/controller.js b/controller/controller.js index f3bd8476..262585d7 100644 --- a/controller/controller.js +++ b/controller/controller.js @@ -798,7 +798,7 @@ steal('jquery/class', 'jquery/lang/string', 'jquery/event/destroyed', function( bindings.push(function( el ) { $(el).unbind("destroyed", destroyCB); }); - return bindings.length; + return bindings.length-1; } if ( typeof el == 'string' ) { func = eventName; @@ -812,7 +812,7 @@ steal('jquery/class', 'jquery/lang/string', 'jquery/event/destroyed', function( func = shifter(this,func); } this._bindings.push(binder(el, eventName, func, selector)); - return this._bindings.length; + return this._bindings.length-1; }, _unbind : function(){ var el = this.element[0]; From 32897ec414a7ddd6f83a3408f0e678a634846236 Mon Sep 17 00:00:00 2001 From: snesin Date: Mon, 5 Nov 2012 13:43:32 -0600 Subject: [PATCH 2/3] Update event/drag/drag.js Add drag.perpetuate method, allowing multiple drops or rejected drops to force additional dragging. --- event/drag/drag.js | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/event/drag/drag.js b/event/drag/drag.js index 78f2dfd2..e3dcb7ff 100644 --- a/event/drag/drag.js +++ b/event/drag/drag.js @@ -192,8 +192,9 @@ steal('jquery/event', 'jquery/lang/vector', 'jquery/event/livehack',function( $ mouseup: function( docEl, event ) { //if there is a current, we should call its dragstop - if ( this.moved ) { - this.end(event); + if ( this.moved && this.end(event) ) { + //drag was perpetuated, still using + return; } this.destroy(); }, @@ -388,6 +389,12 @@ steal('jquery/event', 'jquery/lang/vector', 'jquery/event/livehack',function( $ this.callEvents('end', this.element, event); + if ( this._perpetuated ) { + //drag was perpetuated, still using + this._perpetuated = false; + return true; + } + if ( this._revert ) { var self = this; this.movingElement.animate({ @@ -402,6 +409,12 @@ steal('jquery/event', 'jquery/lang/vector', 'jquery/event/livehack',function( $ } this.event = null; }, + /** + * Perpetuates the drag after a drop. + */ + perpetuate: function() { + this._perpetuated = true; + }, /** * Cleans up drag element after drag drop. * @hide From b67410a6ecd60fb8c8e27bec80f245f2edae096c Mon Sep 17 00:00:00 2001 From: snesin Date: Mon, 5 Nov 2012 13:46:33 -0600 Subject: [PATCH 3/3] Update event/drop/drop.js Add drag.perpetuate method, allowing multiple drops or rejected drops to force additional dragging. --- event/drop/drop.js | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/event/drop/drop.js b/event/drop/drop.js index 792c860a..bbbbce56 100644 --- a/event/drop/drop.js +++ b/event/drop/drop.js @@ -377,6 +377,13 @@ steal('jquery/event/drag','jquery/dom/within','jquery/dom/compare',function($){ la.callHandlers(this.endName, null, event, moveable); } } + + if ( this.dragging && this.dragging._perpetuated ) { + //drag perpetuated, still using + return; + } + + // call dropend for(var r =0; r