aboutsummaryrefslogtreecommitdiffstats
path: root/themes/default/js/ui/jquery.ui.sortable.js
diff options
context:
space:
mode:
authorpatdenice <patdenice@piwigo.org>2011-10-28 13:25:54 +0000
committerpatdenice <patdenice@piwigo.org>2011-10-28 13:25:54 +0000
commit2a5be28bc5a0fe4748279bebe23d1be6416fe015 (patch)
tree19dc0a131baa6ad1b8fb1c96e64c153013785d81 /themes/default/js/ui/jquery.ui.sortable.js
parent3ea95e0ebcce5ecd80ac4e95879dae72e9360988 (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.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);