Revision 3706:170617361020,
891 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 $, dotclear */ |
---|
2 | 'use strict'; |
---|
3 | |
---|
4 | $(function() { |
---|
5 | if ($.fn.nestedSortable !== undefined) { |
---|
6 | $('#categories ul li').css('cursor', 'move'); |
---|
7 | $('#save-set-order').prop('disabled', true).addClass('disabled'); |
---|
8 | $('#categories ul').nestedSortable({ |
---|
9 | listType: 'ul', |
---|
10 | items: 'li', |
---|
11 | placeholder: 'placeholder', |
---|
12 | update: function() { |
---|
13 | $('#categories_order').attr('value', JSON.stringify($('#categories ul').nestedSortable('toArray'))); |
---|
14 | $('#save-set-order').prop('disabled', false).removeClass('disabled'); |
---|
15 | } |
---|
16 | }); |
---|
17 | } |
---|
18 | |
---|
19 | $('input[name^="delete"]').click(function() { |
---|
20 | return window.confirm(dotclear.msg.confirm_delete_category.replace('%s', $(this).parents('li').first().find('.cat-title label a').text())); |
---|
21 | }); |
---|
22 | |
---|
23 | $('input[name="reset"]').click(function() { |
---|
24 | return window.confirm(dotclear.msg.confirm_reorder_categories); |
---|
25 | }); |
---|
26 | }); |
---|
Note: See
TracBrowser
for help on using the repository browser.