Created
March 15, 2011 10:10
-
-
Save zubairov/870542 to your computer and use it in GitHub Desktop.
Sample on how to implement loading indicator in Sproutcore application
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SC.Request.manager.inflight.addObserver('[]', function(array) { | |
var length=array.get('length'); | |
SC.debug('Number of inflight requets are %@', length); | |
// Need to run with the SC Event Loop to update the visuals | |
SC.run(new function() { | |
App.mainPage.getPath('mainPane.loading').set('isVisible', length > 0); | |
}); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment