Dotclear

source: plugins/antispam/js/antispam.js @ 3987:dcc501ff21f4

Revision 3987:dcc501ff21f4, 872 bytes checked in by franck <carnet.franck.paul@…>, 6 years ago (diff)

Switching from inline JS variables to JSON script, antispam plugin

RevLine 
[3987]1/*global $, dotclear, getData */
[3709]2'use strict';
3
[3987]4Object.assign(dotclear.msg, getData('antispam'));
5
[0]6$(function() {
[3880]7  $('#filters-list').sortable({
8    'cursor': 'move'
9  });
10  $('#filters-list tr').hover(function() {
11    $(this).css({
12      'cursor': 'move'
13    });
14  }, function() {
15    $(this).css({
16      'cursor': 'auto'
17    });
18  });
19  $('#filters-list-form').submit(function() {
20    let order = [];
21    $('#filters-list tr td input.position').each(function() {
22      order.push(this.name.replace(/^f_order\[([^\]]+)\]$/, '$1'));
23    });
24    $('input[name=filters_order]')[0].value = order.join(',');
25    return true;
26  });
27  $('#filters-list tr td input.position').hide();
28  $('#filters-list tr td.handle').addClass('handler');
[2207]29
[3880]30  $('form input[type=submit][name=delete_all]').click(function() {
31    return window.confirm(dotclear.msg.confirm_spam_delete);
32  });
[0]33});
Note: See TracBrowser for help on using the repository browser.

Sites map