Revision 1131:54803678ecd0,
556 bytes
checked in by franck <carnet.franck.paul@…>, 12 years ago
(diff) |
Blogroll plugin now uses jQuery UI sortable for links ordering via drag'n'drop
|
Rev | Line | |
---|
[1131] | 1 | $(function() { |
---|
| 2 | $("#links-list").sortable({'cursor':'move'}); |
---|
| 3 | $("#links-list tr").hover(function () { |
---|
| 4 | $(this).css({'cursor':'move'}); |
---|
| 5 | }, function () { |
---|
| 6 | $(this).css({'cursor':'auto'}); |
---|
| 7 | }); |
---|
| 8 | $('#links-form').submit(function() { |
---|
| 9 | var order=[]; |
---|
| 10 | $("#links-list tr td input.position").each(function() { |
---|
| 11 | order.push(this.name.replace(/^order\[([^\]]+)\]$/,'$1')); |
---|
| 12 | }); |
---|
| 13 | $("input[name=links_order]")[0].value = order.join(','); |
---|
| 14 | return true; |
---|
| 15 | }); |
---|
| 16 | $("#links-list tr td input.position").hide(); |
---|
| 17 | $("#links-list tr td.handle").addClass('handler'); |
---|
| 18 | }); |
---|
Note: See
TracBrowser
for help on using the repository browser.