Revision 3182:adf3c934173f,
648 bytes
checked in by franck <carnet.franck.paul@…>, 10 years ago
(diff) |
Disable submit button unless at least one item selected whenever is possible, closes #1600
|
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'); |
---|
[3182] | 18 | dotclear.condSubmit('#links-form td input[type="checkbox"]','#links-form #remove-action'); |
---|
[1131] | 19 | }); |
---|
Note: See
TracBrowser
for help on using the repository browser.