created generic "loading" page to sit behind loading sheet, avoids sheet getting re-used (which doesn't tend to work)

pull/612/head
Justin Richer 2014-06-04 13:34:08 -04:00
parent 737eec432a
commit dd5ee4bf80
3 changed files with 11 additions and 9 deletions

View File

@ -24,11 +24,17 @@
<div id="breadcrumbs"></div>
<div id="loadingbox" class="sheet hide fade" data-sheet-parent="#breadcrumbs">
<div class="sheet-body">
<p>Loading...</p>
<p>Loading:</p>
<p><span id="loading"></span></p>
</div>
</div>
<span id="content">
<div class="well">
<div><h3>Loading...</h3></div>
<div class="progress progress-striped active">
<div class="bar" style="width: 100%;"></div>
</div>
</div>
</span>
</div>
</div>

View File

@ -470,15 +470,11 @@ var AppRouter = Backbone.Router.extend({
this.breadCrumbView.render();
$('#loadingbox').sheet('show');
$("#loading").html('<span class="label" id="loading-system">System Configuration</span>');
var base = $('base').attr('href');
$.getJSON(base + '.well-known/openid-configuration', function(data) {
app.serverConfiguration = data;
$('#loading-system').addClass('label-success');
var baseUrl = $.url(app.serverConfiguration.issuer);
Backbone.history.start({pushState: true, root: baseUrl.attr('relative') + 'manage/'});
$('#loadingbox').sheet('hide');
});
},

View File

@ -304,8 +304,8 @@ var ClientListView = Backbone.View.extend({
$('#loadingbox').sheet('show');
$('#loading').html('<span class="label" id="loading-clients">Clients</span> ' +
'<span class="label" id="loading-whitelist">Whitelist</span> ' +
'<span class="label" id="loading-stats">Statistics</span> ' +
'<span class="label" id="loading-scopes">Scopes</span> '
'<span class="label" id="loading-scopes">Scopes</span> ' +
'<span class="label" id="loading-stats">Statistics</span> '
);
$.when(this.model.fetchIfNeeded({success:function(e) {$('#loading-clients').addClass('label-success');}}),
@ -412,8 +412,8 @@ var ClientListView = Backbone.View.extend({
$('#loadingbox').sheet('show');
$('#loading').html('<span class="label" id="loading-clients">Clients</span> ' +
'<span class="label" id="loading-whitelist">Whitelist</span> ' +
'<span class="label" id="loading-stats">Statistics</span> ' +
'<span class="label" id="loading-scopes">Scopes</span> '
'<span class="label" id="loading-scopes">Scopes</span> ' +
'<span class="label" id="loading-stats">Statistics</span> '
);
var _self = this;