Confirm and Datetime Pop-up Changes

There was a bug in the Confirm and Datetime-type t.popup() types where there was not a valid t object accessible from within the onConfirm and callback callbacks. This prevented Power-Ups from taking meaningful action (like opening a new popup on the stack) after the user had made a selection. This bug was due to an assumption made that developers would want Trello to close the popup automatically after the user took an action.

This is being changed so that Trello will no longer automatically close the popup for you if you pass a onConfirm, onCancel, or callback. If you pass none of these, the popups will continue to work as they currently do - closing the current view on the stack (the equivalent of calling t.back().

If you are using a confirm or datetime popup and passing in a callback via onConfirm, callback, or onCancel, you should update the callbacks to explicitly call t.closePopup() or t.back() or other UI functions as appropriate.

For instance,

  type: 'confirm',
  title: 'Are you sure?',
  message: 'You are about to do a thing. Can you confirm you want to?',
  confirmText: 'Confirm',
  onConfirm: function(t, opts) {
    // user confirmed the prompt, do whatever you need to do
    // ...
    t.closePopup(); // or t.back()
  onCancel: function(t, opts)  {
    // user denied the prompt
    // ...
    t.closePopup(); // or t.back()