lib/thoth/public/js/admin/name.js
/**
   * Handles keypress events on name input fields.
   *
   * @method handleKeyPress
   * @param {Event} e event object
   * @private
   */
Handles keypress events on name input fields.
@method handleKeyPress
@param {Event} e event object
@private
Handles keypress events on name input fields . @method handleKeyPress @param { Event } e event object @private
function handleKeyPress(e) {
    var c  = String.fromCharCode(yue.getCharCode(e)),
        el = yue.getTarget(e);
    if (e.isChar) {
      if (regexp.test(c)) {
        if (/[A-Z]/.test(c)) {
          yue.stopEvent(e);
          el.value += c.toLowerCase();
        }
      } else {
        yue.stopEvent(e);
        if (c === ' ') {
          el.value += '-';
        }
      }
    }
  }
function handleKeyPress ( e ) { var c = String . fromCharCode ( yue . getCharCode ( e ) ) , el = yue . getTarget ( e ) ; if ( e . isChar ) { if ( regexp . test ( c ) ) { if ( / [A-Z] / . test ( c ) ) { yue . stopEvent ( e ) ; el . value += c . toLowerCase ( ) ; } } else { yue . stopEvent ( e ) ; if ( c === ' ' ) { el . value += '-' ; } } } }
Handles keypress events on name input fields.
Handles keypress events on name input fields .