B2G/gaia/apps/settings/js/simcard_dialog.js
// when the dialog is closed, we can relocate back to the caller's div.
when the dialog is closed, we can relocate back to the caller's div.
when the dialog is closed we can relocate back to the caller ' s div .
function spl_show(action, onsuccess, oncancel, origin) {
    if ('#simpin-dialog' == Settings.currentPanel)
      return;
    var _ = navigator.mozL10n.get;
    this.dialogDone.disabled = true;
    this.action = action;
    this.lockType = 'pin';
    switch (action) {
      case 'unlock':
        this.handleCardState();
        break;
      case 'enable':
        this.inputFieldControl(true, false, false);
        this.dialogTitle.textContent = _('pinTitle') || '';
        break;
      case 'changePin':
        this.inputFieldControl(true, false, true);
        this.dialogTitle.textContent = _('newpinTitle') || '';
        break;
    }
    var retryCount = this.mobileConnection.retryCount;
    if (!retryCount) {
      this.triesLeftMsg.hidden = true;
    } else {
      var l10nArgs = { n: retryCount };
      this.triesLeftMsg.textContent = _('inputCodeRetriesLeft', l10nArgs);
      this.triesLeftMsg.hidden = false;
    }
    if (onsuccess && typeof onsuccess === 'function')
      this.onsuccess = onsuccess;
    if (oncancel && typeof oncancel === 'function')
      this.oncancel = oncancel;
    this.origin = origin;
    Settings.currentPanel = '#simpin-dialog';
    var self = this;
    window.addEventListener('transitionend', function focusInput() {
      window.removeEventListener('transitionend', focusInput);
      if (action === 'unlock' && this.lockType === 'puk')
        self.pukInput.focus();
      else
        self.pinInput.focus();
    });
  }
function spl_show ( action , onsuccess , oncancel , origin ) { if ( '#simpin-dialog' == Settings . currentPanel ) return ; var _ = navigator . mozL10n . get ; this . dialogDone . disabled = true ; this . action = action ; this . lockType = 'pin' ; switch ( action ) { case 'unlock' : this . handleCardState ( ) ; break ; case 'enable' : this . inputFieldControl ( true , false , false ) ; this . dialogTitle . textContent = _ ( 'pinTitle' ) || '' ; break ; case 'changePin' : this . inputFieldControl ( true , false , true ) ; this . dialogTitle . textContent = _ ( 'newpinTitle' ) || '' ; break ; } var retryCount = this . mobileConnection . retryCount ; if ( ! retryCount ) { this . triesLeftMsg . hidden = true ; } else { var l10nArgs = { n : retryCount } ; this . triesLeftMsg . textContent = _ ( 'inputCodeRetriesLeft' , l10nArgs ) ; this . triesLeftMsg . hidden = false ; } if ( onsuccess && typeof onsuccess === 'function' ) this . onsuccess = onsuccess ; if ( oncancel && typeof oncancel === 'function' ) this . oncancel = oncancel ; this . origin = origin ; Settings . currentPanel = '#simpin-dialog' ; var self = this ; window . addEventListener ( 'transitionend' , function focusInput ( ) { window . removeEventListener ( 'transitionend' , focusInput ) ; if ( action === 'unlock' && this . lockType === 'puk' ) self . pukInput . focus ( ) ; else self . pinInput . focus ( ) ; } ) ; }
when the dialog is closed, we can relocate back to the caller's div.
when the dialog is closed we can relocate back to the caller ' s div .