Dotclear

source: admin/js/_install.js @ 3986:2ee15bffa1b5

Revision 3986:2ee15bffa1b5, 792 bytes checked in by franck <carnet.franck.paul@…>, 6 years ago (diff)

Switching from inline JS variables to JSON script, install page

Line 
1/*global $, getData */
2'use strict';
3
4$(function() {
5  const login_re = new RegExp('[^A-Za-z0-9@._-]+', 'g');
6  $('#u_firstname').keyup(function() {
7    $('#u_login').val(this.value.toLowerCase().replace(login_re, '').substring(0, 32));
8  });
9  $('#u_login').keyup(function() {
10    $(this).val(this.value.replace(login_re, ''));
11  });
12
13  const texts = getData('install');
14  $('#u_pwd').pwstrength({
15    texts: texts
16  });
17
18  $('#u_login').parent().after($('<input type="hidden" name="u_date" value="' + Date().toLocaleString() + '" />'));
19
20  const show = getData('install_show');
21  const password_link = $('<a href="#" id="obfus">' + show + '</a>').click(function() {
22    $('#password').show();
23    $(this).remove();
24    return false;
25  });
26  $('#password').hide().before(password_link);
27});
Note: See TracBrowser for help on using the repository browser.

Sites map