mirror of
https://github.com/jquery/jquery-ui.git
synced 2025-01-07 20:34:24 +00:00
sortable: fixed toArray method
coverflow: renamed init to _init
This commit is contained in:
parent
2827a42c44
commit
77f717d830
@ -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;
|
||||
|
||||
},
|
||||
|
Loading…
Reference in New Issue
Block a user