Remove index refresh notifications, re-order some menus
This commit is contained in:
parent
8419b7c88b
commit
875a546668
@ -2229,8 +2229,8 @@
|
||||
el: $.el('span', {
|
||||
textContent: 'Index Navigation'
|
||||
}),
|
||||
order: 90,
|
||||
subEntries: [modeEntry, sortEntry, repliesEntry, anchorEntry, refNavEntry]
|
||||
order: 98,
|
||||
subEntries: [repliesEntry, anchorEntry, refNavEntry, modeEntry, sortEntry]
|
||||
});
|
||||
$.addClass(doc, 'index-loading');
|
||||
this.update();
|
||||
@ -2420,15 +2420,14 @@
|
||||
_ref1.close();
|
||||
}
|
||||
if (d.readyState !== 'loading') {
|
||||
Index.notice = new Notice('info', 'Refreshing index...');
|
||||
|
||||
} else {
|
||||
now = Date.now();
|
||||
$.ready(function() {
|
||||
return setTimeout((function() {
|
||||
if (!(Index.req && !Index.notice)) {
|
||||
return;
|
||||
|
||||
}
|
||||
return Index.notice = new Notice('info', 'Refreshing index...');
|
||||
}), 5 * $.SECOND - (Date.now() - now));
|
||||
});
|
||||
}
|
||||
@ -2475,11 +2474,6 @@
|
||||
}
|
||||
return;
|
||||
}
|
||||
if (notice) {
|
||||
notice.setType('success');
|
||||
notice.el.lastElementChild.textContent = 'Index refreshed!';
|
||||
setTimeout(notice.close, $.SECOND);
|
||||
}
|
||||
timeEl = $('#index-last-refresh', Index.navLinks);
|
||||
timeEl.dataset.utc = Date.parse(req.getResponseHeader('Last-Modified'));
|
||||
RelativeDates.update(timeEl);
|
||||
|
||||
@ -2239,8 +2239,8 @@
|
||||
el: $.el('span', {
|
||||
textContent: 'Index Navigation'
|
||||
}),
|
||||
order: 90,
|
||||
subEntries: [modeEntry, sortEntry, repliesEntry, anchorEntry, refNavEntry]
|
||||
order: 98,
|
||||
subEntries: [repliesEntry, anchorEntry, refNavEntry, modeEntry, sortEntry]
|
||||
});
|
||||
$.addClass(doc, 'index-loading');
|
||||
this.update();
|
||||
@ -2430,15 +2430,14 @@
|
||||
_ref1.close();
|
||||
}
|
||||
if (d.readyState !== 'loading') {
|
||||
Index.notice = new Notice('info', 'Refreshing index...');
|
||||
|
||||
} else {
|
||||
now = Date.now();
|
||||
$.ready(function() {
|
||||
return setTimeout((function() {
|
||||
if (!(Index.req && !Index.notice)) {
|
||||
return;
|
||||
|
||||
}
|
||||
return Index.notice = new Notice('info', 'Refreshing index...');
|
||||
}), 5 * $.SECOND - (Date.now() - now));
|
||||
});
|
||||
}
|
||||
@ -2485,11 +2484,6 @@
|
||||
}
|
||||
return;
|
||||
}
|
||||
if (notice) {
|
||||
notice.setType('success');
|
||||
notice.el.lastElementChild.textContent = 'Index refreshed!';
|
||||
setTimeout(notice.close, $.SECOND);
|
||||
}
|
||||
timeEl = $('#index-last-refresh', Index.navLinks);
|
||||
timeEl.dataset.utc = Date.parse(req.getResponseHeader('Last-Modified'));
|
||||
RelativeDates.update(timeEl);
|
||||
|
||||
@ -63,8 +63,8 @@ Index =
|
||||
type: 'header'
|
||||
el: $.el 'span',
|
||||
textContent: 'Index Navigation'
|
||||
order: 90
|
||||
subEntries: [modeEntry, sortEntry, repliesEntry, anchorEntry, refNavEntry]
|
||||
order: 98
|
||||
subEntries: [repliesEntry, anchorEntry, refNavEntry, modeEntry, sortEntry]
|
||||
|
||||
$.addClass doc, 'index-loading'
|
||||
@update()
|
||||
@ -203,7 +203,6 @@ Index =
|
||||
Index.req?.abort()
|
||||
Index.notice?.close()
|
||||
if d.readyState isnt 'loading'
|
||||
Index.notice = new Notice 'info', 'Refreshing index...'
|
||||
else
|
||||
# Delay the notice on initial page load
|
||||
# and only display it for slow connections.
|
||||
@ -211,7 +210,6 @@ Index =
|
||||
$.ready ->
|
||||
setTimeout (->
|
||||
return unless Index.req and !Index.notice
|
||||
Index.notice = new Notice 'info', 'Refreshing index...'
|
||||
), 5 * $.SECOND - (Date.now() - now)
|
||||
pageNum = null if typeof pageNum isnt 'number' # event
|
||||
onload = (e) -> Index.load e, pageNum
|
||||
@ -248,11 +246,6 @@ Index =
|
||||
new Notice 'error', 'Index refresh failed.', 2
|
||||
return
|
||||
|
||||
if notice
|
||||
notice.setType 'success'
|
||||
notice.el.lastElementChild.textContent = 'Index refreshed!'
|
||||
setTimeout notice.close, $.SECOND
|
||||
|
||||
timeEl = $ '#index-last-refresh', Index.navLinks
|
||||
timeEl.dataset.utc = Date.parse req.getResponseHeader 'Last-Modified'
|
||||
RelativeDates.update timeEl
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user