App loading screen: show messages processed so far
Also, show the same loading screen on index.js before we've bootstrapped the app. FREEBIE
This commit is contained in:
parent
e36aa524c9
commit
305bd6b3b8
10 changed files with 110 additions and 25 deletions
|
@ -64,8 +64,14 @@
|
|||
Whisper.AppLoadingScreen = Whisper.View.extend({
|
||||
templateName: 'app-loading-screen',
|
||||
className: 'app-loading-screen',
|
||||
updateProgress: function(count) {
|
||||
if (count > 0) {
|
||||
var message = i18n('loadingMessages', count.toString());
|
||||
this.$('.message').text(message);
|
||||
}
|
||||
},
|
||||
render_attributes: {
|
||||
loading: i18n('loading')
|
||||
message: i18n('loading')
|
||||
}
|
||||
});
|
||||
|
||||
|
@ -171,6 +177,12 @@
|
|||
view.remove();
|
||||
}
|
||||
},
|
||||
onProgress: function(count) {
|
||||
var view = this.appLoadingScreen;
|
||||
if (view) {
|
||||
view.updateProgress(count);
|
||||
}
|
||||
},
|
||||
focusConversation: function(e) {
|
||||
if (e && this.$(e.target).closest('.placeholder').length) {
|
||||
return;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue