Revision 3706:170617361020,
547 bytes
checked in by franck <carnet.franck.paul@…>, 7 years ago
(diff) |
use strict and no more linter warnings/errors as far as possible
|
Line | |
---|
1 | /*global $ */ |
---|
2 | 'use strict'; |
---|
3 | |
---|
4 | $(function() { |
---|
5 | $('#my-favs ul').sortable({ |
---|
6 | 'cursor': 'move' |
---|
7 | }); |
---|
8 | $('#my-favs ul, #my-favs ul *').css({ |
---|
9 | 'cursor': 'move' |
---|
10 | }); |
---|
11 | $('#my-favs ul input').css({ |
---|
12 | 'cursor': 'auto' |
---|
13 | }); |
---|
14 | $('#favs-form').submit(function() { |
---|
15 | var order = []; |
---|
16 | $('#my-favs ul li input.position').each(function() { |
---|
17 | order.push(this.name.replace(/^order\[([^\]]+)\]$/, '$1')); |
---|
18 | }); |
---|
19 | $('input[name=favs_order]')[0].value = order.join(','); |
---|
20 | return true; |
---|
21 | }); |
---|
22 | $('#my-favs ul li input.position').hide(); |
---|
23 | }); |
---|
Note: See
TracBrowser
for help on using the repository browser.