Skip to content

Commit b02f6c5

Browse files
committed
Improve loading message when downloading new application cache
1 parent 5cc7cc5 commit b02f6c5

File tree

2 files changed

+10
-5
lines changed

2 files changed

+10
-5
lines changed

src/client/core/app.js

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -66,11 +66,16 @@ box, session, addons, box, files, commands, menu, tabs, panels, operations, loca
6666
});
6767

6868
// Application manifest
69-
$(window.applicationCache).bind('downloading', function(e) {
70-
loading.show("Downloading new application cache");
69+
$(window.applicationCache).bind('downloading progress', function(e) {
70+
var progress = "";
71+
if (e && e.originalEvent && e.originalEvent.lengthComputable) {
72+
progress = Math.round(100*e.originalEvent.loaded/e.originalEvent.total) + "%";
73+
}
74+
75+
loading.show("Downloading new version "+progress);
7176
});
7277
$(window.applicationCache).bind('checking', function(e) {
73-
loading.show("Checking new application cache version");
78+
loading.show("Checking for a new version");
7479
});
7580
$(window.applicationCache).bind('noupdate cached obsolete error', function(e) {
7681
loading.stop();

src/client/resources/stylesheets/main.less

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -80,11 +80,11 @@ body {
8080

8181
.cb-loading-message {
8282
position: absolute;
83-
width: 200px;
83+
width: 500px;
8484
height: 60px;
8585
line-height: 60px;
8686
font-size: 26px;
87-
margin-left: -100px;
87+
margin-left: -250px;
8888
margin-top: -30px;
8989
top: 50%;
9090
left: 50%;

0 commit comments

Comments
 (0)