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