Modal dialogs rendered in sequence may conflict
When a new girder.confirm modal dialog is rendered immediately after annother is dismissed, we must wait for $('g-dialog-container'),on('hidden.bs.modal') to fire, or else the .modal-backgrop is not fully removed.
This should be fixed, so modals will wait for pending animations or remove old elements as soon as they render themselves.
Although isic.showAlertDialog is smart enough to directly avoid this problem, it also has the sub-optimal behavior of not firing its callback until the CSS animation completes. Ideally, the callback can be fired immediately, and any subsequent (if it exists) modal will wait for the previous animation to complete before rendering itself.
In Girder 2.0 I tested a case where the callback of a girder.confirm modal dialog calls girder.confirm to display another dialog and I don't see the same display issue that we saw in this plugin. I dug a bit but don't see what makes this behave differently. Still, we'll have to test once isic-archive uses Girder 2.0, and isic.showAlertDialog will likely need an update to remove its sub-optimal delay in calling the callback.