aboutsummaryrefslogtreecommitdiffstats
path: root/ui/ui.sortable.js
diff options
context:
space:
mode:
authorPaul Bakaus <paul.bakaus@googlemail.com>2008-10-14 10:00:52 +0000
committerPaul Bakaus <paul.bakaus@googlemail.com>2008-10-14 10:00:52 +0000
commit77f717d83083e65684e392635268cbf83dbbee00 (patch)
treea94d2f24e4431863dcc11492d55ebbbdfe14fe41 /ui/ui.sortable.js
parent2827a42c448f89423079c25fd8314e97840c8668 (diff)
downloadjquery-ui-77f717d83083e65684e392635268cbf83dbbee00.tar.gz
jquery-ui-77f717d83083e65684e392635268cbf83dbbee00.zip
sortable: fixed toArray method
coverflow: renamed init to _init
Diffstat (limited to 'ui/ui.sortable.js')
-rw-r--r--ui/ui.sortable.js6
1 files changed, 3 insertions, 3 deletions
diff --git a/ui/ui.sortable.js b/ui/ui.sortable.js
index fdee32752..6c81c2e94 100644
--- a/ui/ui.sortable.js
+++ b/ui/ui.sortable.js
@@ -69,7 +69,7 @@ $.widget("ui.sortable", $.extend({}, $.ui.mouse, {
var str = []; o = o || {};
$(items).each(function() {
- var res = ($(this.item || this).attr(o.attribute || 'id') || '').match(o.expression || (/(.+)[-=_](.+)/));
+ var res = ($(o.item || this).attr(o.attribute || 'id') || '').match(o.expression || (/(.+)[-=_](.+)/));
if(res) str.push((o.key || res[1]+'[]')+'='+(o.key && o.expression ? res[1] : res[2]));
});
@@ -80,9 +80,9 @@ $.widget("ui.sortable", $.extend({}, $.ui.mouse, {
toArray: function(o) {
var items = this._getItemsAsjQuery(o && o.connected);
- var ret = [];
+ var ret = []; o = o || {};
- items.each(function() { ret.push($(this).attr(o.attr || 'id')); });
+ items.each(function() { ret.push($(o.item || this).attr(o.attribute || 'id') || ''); });
return ret;
},