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