sortable: fixed serialize issue when a key was specified as option, but no custom expression

This commit is contained in:
Paul Bakaus 2008-06-26 10:00:32 +00:00
parent 3e5e8704c1
commit 980fbbea51

View File

@ -69,7 +69,7 @@ $.widget("ui.sortable", $.extend($.ui.mouse, {
items.each(function() {
var res = ($(this).attr(o.attribute || 'id') || '').match(o.expression || (/(.+)[-=_](.+)/));
if(res) str.push((o.key || res[1])+'[]='+(o.key ? res[1] : res[2]));
if(res) str.push((o.key || res[1])+'[]='+(o.key && o.expression ? res[1] : res[2]));
});
return str.join('&');