summaryrefslogtreecommitdiff
path: root/resources/jquery.ui/jquery.ui.sortable.js
diff options
context:
space:
mode:
Diffstat (limited to 'resources/jquery.ui/jquery.ui.sortable.js')
-rw-r--r--resources/jquery.ui/jquery.ui.sortable.js52
1 files changed, 29 insertions, 23 deletions
diff --git a/resources/jquery.ui/jquery.ui.sortable.js b/resources/jquery.ui/jquery.ui.sortable.js
index fe9898e0..1a06dcae 100644
--- a/resources/jquery.ui/jquery.ui.sortable.js
+++ b/resources/jquery.ui/jquery.ui.sortable.js
@@ -1,9 +1,9 @@
/*
- * jQuery UI Sortable 1.8.2
+ * jQuery UI Sortable 1.8.11
*
- * Copyright (c) 2010 AUTHORS.txt (http://jqueryui.com/about)
- * Dual licensed under the MIT (MIT-LICENSE.txt)
- * and GPL (GPL-LICENSE.txt) licenses.
+ * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
*
* http://docs.jquery.com/UI/Sortables
*
@@ -12,7 +12,7 @@
* jquery.ui.mouse.js
* jquery.ui.widget.js
*/
-(function($) {
+(function( $, undefined ) {
$.widget("ui.sortable", $.ui.mouse, {
widgetEventPrefix: "sort",
@@ -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 ? (/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();
@@ -360,7 +360,7 @@ $.widget("ui.sortable", $.ui.mouse, {
if(this.dragging) {
- this._mouseUp();
+ this._mouseUp({ target: null });
if(this.options.helper == "original")
this.currentItem.css(this._storedCSS).removeClass("ui-sortable-helper");
@@ -378,21 +378,23 @@ $.widget("ui.sortable", $.ui.mouse, {
}
- //$(this.placeholder[0]).remove(); would have been the jQuery way - unfortunately, it unbinds ALL events from the original node!
- if(this.placeholder[0].parentNode) this.placeholder[0].parentNode.removeChild(this.placeholder[0]);
- if(this.options.helper != "original" && this.helper && this.helper[0].parentNode) this.helper.remove();
-
- $.extend(this, {
- helper: null,
- dragging: false,
- reverting: false,
- _noFinalSort: null
- });
+ if (this.placeholder) {
+ //$(this.placeholder[0]).remove(); would have been the jQuery way - unfortunately, it unbinds ALL events from the original node!
+ if(this.placeholder[0].parentNode) this.placeholder[0].parentNode.removeChild(this.placeholder[0]);
+ if(this.options.helper != "original" && this.helper && this.helper[0].parentNode) this.helper.remove();
- if(this.domPosition.prev) {
- $(this.domPosition.prev).after(this.currentItem);
- } else {
- $(this.domPosition.parent).prepend(this.currentItem);
+ $.extend(this, {
+ helper: null,
+ dragging: false,
+ reverting: false,
+ _noFinalSort: null
+ });
+
+ if(this.domPosition.prev) {
+ $(this.domPosition.prev).after(this.currentItem);
+ } else {
+ $(this.domPosition.parent).prepend(this.currentItem);
+ }
}
return this;
@@ -409,6 +411,10 @@ $.widget("ui.sortable", $.ui.mouse, {
if(res) str.push((o.key || res[1]+'[]')+'='+(o.key && o.expression ? res[1] : res[2]));
});
+ if(!str.length && o.key) {
+ str.push(o.key + '=');
+ }
+
return str.join('&');
},
@@ -1061,7 +1067,7 @@ $.widget("ui.sortable", $.ui.mouse, {
});
$.extend($.ui.sortable, {
- version: "1.8.2"
+ version: "1.8.11"
});
})(jQuery);