owncloud/core — pull request #4806 by tanghus (2013-09-11 14:18:45+00:00)
Title: Don't popup meaningless alerts when dialog called on page leave

I noticed that when deleting users OC.dialogs.alert() [*] is called when refreshing or navigating away from the page. The request to get the template is then aborted by the browser, which then triggers an ajax error.

This patch shows the message in a window.alert instead. Same goes for info() and prompt() btw.

If the page is left while loading a filepicker, the error is silently ignored as there's nothing sensible to do there.

[*] When deleting a user it is apparently put in some deletion queue that is called on page leave. The error is triggered no matter if the user is actually deleted because the request is aborted before a response is sent back.
@raghunayyar if you use the same method in the new UI you should be aware of this.
btw, in the current user UI you can only delete one user. The next delete triggers an error. But that's a whole other subject :)

@Kondou-ger @bartv2