aboutsummaryrefslogtreecommitdiffstats
path: root/themes/default/js/ui/jquery.ui.sortable.js
diff options
context:
space:
mode:
authorpatdenice <patdenice@piwigo.org>2011-10-28 13:32:48 +0000
committerpatdenice <patdenice@piwigo.org>2011-10-28 13:32:48 +0000
commit01847bcd75bbc46efbd1d17354a1b6c2dad261e1 (patch)
tree3ee1f001db3a33cb4971d1a9951cf2b38c99c140 /themes/default/js/ui/jquery.ui.sortable.js
parenta60d358af034f0d9c003b952cc6a4328eaff8b91 (diff)
merge r12525 from trunk to branch 2.3
feature:2487 Update jQuery to 1.6.4 and jQuery UI to 1.8.16 git-svn-id: http://piwigo.org/svn/branches/2.3@12526 68402e56-0260-453c-a942-63ccdbb3a9ee
Diffstat (limited to 'themes/default/js/ui/jquery.ui.sortable.js')
-rw-r--r--themes/default/js/ui/jquery.ui.sortable.js14
1 files changed, 9 insertions, 5 deletions
diff --git a/themes/default/js/ui/jquery.ui.sortable.js b/themes/default/js/ui/jquery.ui.sortable.js
index 9665b77dd..2c94cb14b 100644
--- a/themes/default/js/ui/jquery.ui.sortable.js
+++ b/themes/default/js/ui/jquery.ui.sortable.js
@@ -1,5 +1,5 @@
/*
- * jQuery UI Sortable 1.8.10
+ * jQuery UI Sortable 1.8.16
*
* Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
* Dual licensed under the MIT or GPL Version 2 licenses.
@@ -49,8 +49,8 @@ $.widget("ui.sortable", $.ui.mouse, {
//Get the items
this.refresh();
- //Let's determine if the items are floating
- this.floating = this.items.length ? (/left|right/).test(this.items[0].item.css('float')) : false;
+ //Let's determine if the items are being displayed horizontally
+ this.floating = this.items.length ? o.axis === 'x' || (/left|right/).test(this.items[0].item.css('float')) || (/inline|table-cell/).test(this.items[0].item.css('display')) : false;
//Let's determine the parent's offset
this.offset = this.element.offset();
@@ -615,6 +615,10 @@ $.widget("ui.sortable", $.ui.mouse, {
for (var i = this.items.length - 1; i >= 0; i--){
var item = this.items[i];
+ //We ignore calculating positions of all connected containers when we're not over them
+ if(item.instance != this.currentContainer && this.currentContainer && item.item[0] != this.currentItem[0])
+ continue;
+
var t = this.options.toleranceElement ? $(this.options.toleranceElement, item.item) : item.item;
if (!fast) {
@@ -980,7 +984,7 @@ $.widget("ui.sortable", $.ui.mouse, {
// We first have to update the dom position of the actual currentItem
// Note: don't do it if the current item is already removed (by a user), or it gets reappended (see #4088)
- if(!this._noFinalSort && this.currentItem[0].parentNode) this.placeholder.before(this.currentItem);
+ if(!this._noFinalSort && this.currentItem.parent().length) this.placeholder.before(this.currentItem);
this._noFinalSort = null;
if(this.helper[0] == this.currentItem[0]) {
@@ -1067,7 +1071,7 @@ $.widget("ui.sortable", $.ui.mouse, {
});
$.extend($.ui.sortable, {
- version: "1.8.10"
+ version: "1.8.16"
});
})(jQuery);