sortable: moved serialize brackets after every key to default value, so configuring it as well using the key option is possible

This commit is contained in:
Paul Bakaus 2008-08-19 09:04:07 +00:00
parent 1de76c6f77
commit fd1f2e08ed

View File

@ -70,7 +70,7 @@ $.widget("ui.sortable", $.extend({}, $.ui.mouse, {
$(items).each(function() {
var res = ($(this.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]));
if(res) str.push((o.key || res[1]+'[]')+'='+(o.key && o.expression ? res[1] : res[2]));
});
return str.join('&');