Exemplo n.º 1
0
 onBack: function(e) {
   if (e) {
     e.preventDefault();
   }
   this.cancelCreation();
   cards.removeCardAndSuccessors(this, 'animate', 1);
 },
Exemplo n.º 2
0
    close: function(event) {
      if (event) {
        event.stopPropagation();
        event.preventDefault();
      }

      cards.removeCardAndSuccessors(this, 'animate', 1,
                                    this.restoreCard);
    }
Exemplo n.º 3
0
 onBack: function(event) {
   if (!model.foldersSlice) {
     // No account has been formally initialized, but one
     // likely exists given that this back button should
     // only be available for cases that have accounts.
     // Likely just need the app to reset to load model.
     evt.emit('resetApp');
   } else {
     cards.removeCardAndSuccessors(this, 'animate', 1);
   }
 },
Exemplo n.º 4
0
    onTransitionEnd: function(event) {
      // If this is an animation for the content closing, then
      // it means the card should be removed now.
      if (!this.classList.contains('opened') &&
          event.target.classList.contains('fld-content')) {
        cards.removeCardAndSuccessors(this, 'none');

        // After card is removed, then switch the account, to provide
        // smooth animation on closing of drawer.
        if (this._waitingAccountId) {
          model.changeAccountFromId(this._waitingAccountId, function() {
            model.selectInbox();
          });
          this._waitingAccountId = null;
        }
      }
    },
Exemplo n.º 5
0
    onCancelSearch: function(event) {
      // Only care about real clicks on actual button, not fake ones triggered
      // by a form submit from the Enter button on the keyboard.
      // Note: the cancel button should not really be a type="submit", but it is
      // that way because the /shared styles for this search form wants to see
      // a submit. Longer term this should be changed in the /shared components.
      // This event test is used because in form submit cases, the
      // explicitOriginalTarget (the text input) is not the same as the target
      // (the button).
      if (event.explicitOriginalTarget !== event.target) {
        return;
      }

      try {
        this.headerCursor.endSearch();
      }
      catch (ex) {
        console.error('problem killing slice:', ex, '\n', ex.stack);
      }
      cards.removeCardAndSuccessors(this, 'animate');
    },
Exemplo n.º 6
0
 onClose: function() {
   cards.removeCardAndSuccessors(this, 'animate', 1);
 },
Exemplo n.º 7
0
 onCreationError: function(err, errDetails) {
   this.callingCard.showError(err, errDetails);
   cards.removeCardAndSuccessors(this, 'animate', 1);
 },
Exemplo n.º 8
0
 cards.folderSelector(this.model, function(folder) {
   var op = this.header.moveMessage(folder);
   cards.removeCardAndSuccessors(this, 'animate');
   toaster.toastOperation(op);
 }.bind(this), function(folder) {
Exemplo n.º 9
0
 handler: function() {
   var op = this.header.deleteMessage();
   cards.removeCardAndSuccessors(this, 'animate');
   toaster.toastOperation(op);
 }.bind(this)
Exemplo n.º 10
0
 onBack: function(event) {
   cards.removeCardAndSuccessors(this, 'animate');
 },
Exemplo n.º 11
0
 proceed: function() {
   this.account.clearProblems();
   cards.removeCardAndSuccessors(this, 'animate', 1, this.restoreCard);
 },
Exemplo n.º 12
0
 _closeCard: function() {
   this._selfClosed = true;
   cards.removeCardAndSuccessors(this, 'animate');
 },