pagelets/nodejitsu/login/base.js
function modal(e) {
    e.preventDefault();

    // Remove the old listeners so we don't trigger the regular validation
    Cortex.app('modal').off('done');

    var self = this;
    self.redirect = $(e.element).get('data-redirect');

    if (!this.restore) this.restore = Cortex.app('modal').on('close', function () {
      // The modal is closed, make sure that we still have a login state
      // present or restore it with our cached content.
      var modal = $('section.modal');
      if (~modal.get('innerHTML').indexOf('type="password"')) return;

      modal.set('innerHTML', self.content);
    });

    return this.render('login');
  }
function modal(e) {
    e.preventDefault();

    // Remove the old listeners so we don't trigger the regular validation
    Cortex.app('modal').off('done');

    var self = this;
    self.redirect = $(e.element).get('data-redirect');

    if (!this.restore) this.restore = Cortex.app('modal').on('close', function () {
      // The modal is closed, make sure that we still have a login state
      // present or restore it with our cached content.
      var modal = $('section.modal');
      if (~modal.get('innerHTML').indexOf('type="password"')) return;

      modal.set('innerHTML', self.content);
    });

    return this.render('login');
  }
function modal ( e ) { e . preventDefault ( ) ; // Remove the old listeners so we don't trigger the regular validation Cortex . app ( 'modal' ) . off ( 'done' ) ; var self = this ; self . redirect = $ ( e . element ) . get ( 'data-redirect' ) ; if ( ! this . restore ) this . restore = Cortex . app ( 'modal' ) . on ( 'close' , function ( ) { // The modal is closed, make sure that we still have a login state // present or restore it with our cached content. var modal = $ ( 'section.modal' ) ; if ( ~ modal . get ( 'innerHTML' ) . indexOf ( 'type="password"' ) ) return ; modal . set ( 'innerHTML' , self . content ) ; } ) ; return this . render ( 'login' ) ; }
Open the Login modal

@param {Event} e
@api private
Open the Login modal