diff options
author | Holger Rüprich <holger@rueprich.de> | 2010-07-05 06:29:09 +0800 |
---|---|---|
committer | Scott González <scott.gonzalez@gmail.com> | 2010-07-17 03:06:04 +0800 |
commit | 9d01ab564525f9112c2488ad257637593062b70d (patch) | |
tree | 0d957cf226fe019018485008b21dad2f495d28af /ui/jquery.ui.sortable.js | |
parent | 325a262b14aa41be9bda584d770eedbde47297b6 (diff) | |
download | jquery-ui-9d01ab564525f9112c2488ad257637593062b70d.tar.gz jquery-ui-9d01ab564525f9112c2488ad257637593062b70d.zip |
Sortable: Return an empty URL param for empty sortable lists. Fixed #5794 - sortable("serialize", {key: "foo[]"}) returns an empty string for an empty list
Diffstat (limited to 'ui/jquery.ui.sortable.js')
-rw-r--r-- | ui/jquery.ui.sortable.js | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/ui/jquery.ui.sortable.js b/ui/jquery.ui.sortable.js index a51f543c5..6cc2434e8 100644 --- a/ui/jquery.ui.sortable.js +++ b/ui/jquery.ui.sortable.js @@ -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('&'); }, |