Dotclear

source: plugins/blogroll/js/blogroll.js @ 3880:e6d1f6d9d7df

Revision 3880:e6d1f6d9d7df, 750 bytes checked in by franck <carnet.franck.paul@…>, 7 years ago (diff)

Use let and const rather than var (ES2015/ES6), use template string where is more efficient

Line 
1/*global $, dotclear */
2'use strict';
3
4$(function() {
5  $('#links-list').sortable({
6    'cursor': 'move'
7  });
8  $('#links-list tr').hover(function() {
9    $(this).css({
10      'cursor': 'move'
11    });
12  }, function() {
13    $(this).css({
14      'cursor': 'auto'
15    });
16  });
17  $('#links-form').submit(function() {
18    let order = [];
19    $('#links-list tr td input.position').each(function() {
20      order.push(this.name.replace(/^order\[([^\]]+)\]$/, '$1'));
21    });
22    $('input[name=links_order]')[0].value = order.join(',');
23    return true;
24  });
25  $('#links-list tr td input.position').hide();
26  $('#links-list tr td.handle').addClass('handler');
27  dotclear.condSubmit('#links-form td input[type="checkbox"]', '#links-form #remove-action');
28});
Note: See TracBrowser for help on using the repository browser.

Sites map