diff options
author | patdenice <patdenice@piwigo.org> | 2011-10-28 13:25:54 +0000 |
---|---|---|
committer | patdenice <patdenice@piwigo.org> | 2011-10-28 13:25:54 +0000 |
commit | 2a5be28bc5a0fe4748279bebe23d1be6416fe015 (patch) | |
tree | 19dc0a131baa6ad1b8fb1c96e64c153013785d81 /themes/default/js/ui/jquery.ui.droppable.js | |
parent | 3ea95e0ebcce5ecd80ac4e95879dae72e9360988 (diff) |
feature:2487
Update jQuery to 1.6.4 and jQuery UI to 1.8.16
git-svn-id: http://piwigo.org/svn/trunk@12525 68402e56-0260-453c-a942-63ccdbb3a9ee
Diffstat (limited to 'themes/default/js/ui/jquery.ui.droppable.js')
-rw-r--r-- | themes/default/js/ui/jquery.ui.droppable.js | 19 |
1 files changed, 15 insertions, 4 deletions
diff --git a/themes/default/js/ui/jquery.ui.droppable.js b/themes/default/js/ui/jquery.ui.droppable.js index 62bd7b0e5..461f5e597 100644 --- a/themes/default/js/ui/jquery.ui.droppable.js +++ b/themes/default/js/ui/jquery.ui.droppable.js @@ -1,5 +1,5 @@ /* - * jQuery UI Droppable 1.8.10 + * jQuery UI Droppable 1.8.16 * * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) * Dual licensed under the MIT or GPL Version 2 licenses. @@ -147,7 +147,7 @@ $.widget("ui.droppable", { }); $.extend($.ui.droppable, { - version: "1.8.10" + version: "1.8.16" }); $.ui.intersect = function(draggable, droppable, toleranceMode) { @@ -212,11 +212,11 @@ $.ui.ddmanager = { for (var j=0; j < list.length; j++) { if(list[j] == m[i].element[0]) { m[i].proportions.height = 0; continue droppablesLoop; } }; //Filter out elements in the current dragged item m[i].visible = m[i].element.css("display") != "none"; if(!m[i].visible) continue; //If the element is not visible, continue + if(type == "mousedown") m[i]._activate.call(m[i], event); //Activate the droppable if used directly from draggables + m[i].offset = m[i].element.offset(); m[i].proportions = { width: m[i].element[0].offsetWidth, height: m[i].element[0].offsetHeight }; - if(type == "mousedown") m[i]._activate.call(m[i], event); //Activate the droppable if used directly from draggables - } }, @@ -238,6 +238,12 @@ $.ui.ddmanager = { return dropped; }, + dragStart: function( draggable, event ) { + //Listen for scrolling so that if the dragging causes scrolling the position of the droppables can be recalculated (see #5003) + draggable.element.parents( ":not(body,html)" ).bind( "scroll.droppable", function() { + if( !draggable.options.refreshPositions ) $.ui.ddmanager.prepareOffsets( draggable, event ); + }); + }, drag: function(draggable, event) { //If you have a highly dynamic page, you might try this option. It renders positions every time you move the mouse. @@ -279,6 +285,11 @@ $.ui.ddmanager = { } }); + }, + dragStop: function( draggable, event ) { + draggable.element.parents( ":not(body,html)" ).unbind( "scroll.droppable" ); + //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 ) $.ui.ddmanager.prepareOffsets( draggable, event ); } }; |