even lazier loading

closes #503
pull/567/head
Justin Richer 2014-03-16 00:23:06 -04:00
parent 68580dad72
commit 70a81dd1ee
6 changed files with 40 additions and 0 deletions

View File

@ -267,6 +267,11 @@ var BlackListListView = Backbone.View.extend({
},
load:function(callback) {
if (this.model.isFetched) {
callback();
return;
}
$('#loadingbox').show();
$('#loading').html('blacklist');

View File

@ -236,6 +236,14 @@ var ClientListView = Backbone.View.extend({
},
load:function(callback) {
if (this.model.isFetched &&
this.options.whiteListList.isFetched &&
this.options.stats.isFetched &&
this.options.systemScopeList.isFetched) {
callback();
return;
}
$('#loadingbox').show();
$('#loading').html('clients');

View File

@ -37,6 +37,13 @@ var ApprovedSiteListView = Backbone.View.extend({
initialize:function() { },
load:function(callback) {
if (this.model.isFetched &&
this.options.clientList.isFetched &&
this.options.systemScopeList.isFetched) {
callback();
return;
}
$('#loadingbox').show();
$('#loading').html('approved sites');

View File

@ -135,6 +135,11 @@ var SystemScopeListView = Backbone.View.extend({
tagName: 'span',
load:function(callback) {
if (this.model.isFetched) {
callback();
return;
}
$('#loadingbox').show();
$('#loading').html('approved sites');

View File

@ -312,6 +312,14 @@ var TokenListView = Backbone.View.extend({
},
load:function(callback) {
if (this.model.access.isFetched &&
this.model.refresh.isFetched &&
this.options.clientList.isFetched &&
this.options.systemScopeList.isFetched) {
callback();
return;
}
$('#loadingbox').show();
$('#loading').html('tokens');

View File

@ -51,6 +51,13 @@ var WhiteListListView = Backbone.View.extend({
},
load:function(callback) {
if (this.model.isFetched &&
this.options.clientList.isFetched &&
this.options.systemScopeList.isFetched) {
callback();
return;
}
$('#loadingbox').show();
$('#loading').html('whitelist');