tweak updater notifications

This commit is contained in:
James Campos 2011-01-18 04:02:44 -08:00
parent 31f400715f
commit 0cf4819749
2 changed files with 12 additions and 6 deletions

View File

@ -871,7 +871,9 @@ updateTime = ->
time = 0
g.req.abort()
updateNow()
span.textContent = time
$("#updater #count").textContent = 'retry'
else
span.textContent = time
updateTitle = ->
len = g.replies.length
@ -901,8 +903,9 @@ updateNow = ->
url = location.href + '?' + new Date().getTime() # fool the cache
g.req = request url, updateCallback
count = $ '#updater #count'
count.textContent = 'Updating...'
count.textContent = ''
count.className = ''
$("#updater #timer").textContent = 0
updaterMake = ->
html = "<div class=move><span id=count></span> <span id=timer>Thread Updater</span></div>"

View File

@ -1190,13 +1190,15 @@
span = $('#updater #timer');
time = Number(span.textContent);
if (++time === 0) {
updateNow();
return updateNow();
} else if (time > 10) {
time = 0;
g.req.abort();
updateNow();
return $("#updater #count").textContent = 'retry';
} else {
return span.textContent = time;
}
return span.textContent = time;
};
updateTitle = function() {
var len;
@ -1232,8 +1234,9 @@
url = location.href + '?' + new Date().getTime();
g.req = request(url, updateCallback);
count = $('#updater #count');
count.textContent = 'Updating...';
return count.className = '';
count.textContent = '';
count.className = '';
return $("#updater #timer").textContent = 0;
};
updaterMake = function() {
var autoG, autoL, div, html, interval;