meteoric / meteor-ionic

Ionic components for Meteor. No Angular!
http://meteoric.github.io
MIT License
1.51k stars 219 forks source link

IonPopup - return a handle to close individual popups + bug fixes with multiple IonPopups #350

Closed ClarenceL closed 8 years ago

ClarenceL commented 8 years ago
ClarenceL commented 8 years ago

Now you can nest IonPopups within each other, and close individual popups


# TODO: form to submit email
    IonPopup.show({
      title: 'Forgotten Password'
      template: ...
      cssClass: 'popup-wide popup-forgot-password'
      buttons: [{
        text: 'Cancel'
        type: 'button-default'
        onTap: ( ev, t) ->
          return true;
      },
      {
        text: 'Submit'
        type: 'button-positive'
        onTap: ( ev, t ) ->

          resetEmail = $('#forgot_password_container .forgotten-password-email').val()

          unless resetEmail?.length
            subPopup = IonPopup.show(
              template: 'You must enter an email'
              buttons: [{
                text: 'Ok'
                type: 'button-default'
                onTap: (ev) ->
                  subPopup.close()
              }]
            )