marklogic-community / data-explorer

Data Explorer Tool
Other
15 stars 4 forks source link

133 - Use a load indicator for XHR requests #140

Closed nlaprell closed 6 years ago

nlaprell commented 6 years ago

This update modifies the XMLHttpRequest object to track when one or more XHR is outstanding and display a wait cursor there are no more outstanding. A customizable (currently 250ms) lag prevents the wait from being displayed in a flickering manor or for exceptionally short requests.

The branch /feature/133-alt-load-indicator contains an alternative implementation with the angular-busy that @cskeefer suggested looking at.

The main difference is that this branch overwrites the XMLHttpRequest object and applies the wait to all XHR activity, while the angular-busy implementation requires the wait indicator to be applied for each $http request or promise individually.

Opinions on the preferred solution are appreciated.