animated loading bar for management console

pull/650/head
Justin Richer 2013-08-19 14:13:33 -04:00
parent 5c40539561
commit 028f15c039
2 changed files with 13 additions and 1 deletions

View File

@ -10,7 +10,10 @@
<div class="content span12">
<o:breadcrumbs crumb="Manage"/>
<span id="content">
loading...
Loading <span id="loading"></span>...
<div class="progress progress-striped active">
<div class="bar" style="width: 0%"></div>
</div>
</span>
</div>
</div>

View File

@ -367,14 +367,23 @@ var AppRouter = Backbone.Router.extend({
//
// load things in the right order:
$("#loading").html("scopes");
this.systemScopeList.fetch({
success: function(collection, response) {
$("#content .progress .bar").css("width", "25%");
$("#loading").html("clients");
app.clientList.fetch({
success: function(collection, response) {
$("#content .progress .bar").css("width", "50%");
$("#loading").html("whitelists");
app.whiteListList.fetch({
success: function(collection, response) {
$("#content .progress .bar").css("width", "75%");
$("#loading").html("statistics");
app.clientStats.fetch({
success: function(model, response) {
$("#content .progress .bar").css("width", "100%");
$("#loading").html("console");
var baseUrl = $.url($('base').attr('href'));
Backbone.history.start({pushState: true, root: baseUrl.attr('relative') + 'manage/'});
}