Dotclear

source: admin/js/_preferences.js @ 3880:e6d1f6d9d7df

Revision 3880:e6d1f6d9d7df, 513 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 $ */
2'use strict';
3
4$(function() {
5  if ($('#new_pwd').length == 0) {
6    return;
7  }
8  const user_email = $('#user_email').val();
9  $('#user-form').submit(function() {
10    var e = this.elements.cur_pwd;
11    if (e.value != '') {
12      return true;
13    }
14    if ($('#user_email').val() != user_email || $('#new_pwd').val() != '') {
15      $(e).addClass('missing').focusout(function() {
16        $(this).removeClass('missing');
17      });
18      e.focus();
19      return false;
20    }
21    return true;
22  });
23});
Note: See TracBrowser for help on using the repository browser.

Sites map