Sortable: Return an empty URL param for empty sortable lists. Fixed #5794 - sortable("serialize", {key: "foo[]"}) returns an empty string for an empty list

This commit is contained in:
Holger Rüprich 2010-07-05 06:29:09 +08:00 committed by Scott González
parent 325a262b14
commit 9d01ab5645

View File

@ -409,6 +409,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('&');
},