Fix the QR's state upon navigation with JSON
This commit is contained in:
parent
4957eca880
commit
c61c71c764
@ -11974,10 +11974,12 @@
|
||||
g.VIEW = view;
|
||||
switch (view) {
|
||||
case 'index':
|
||||
delete g.THREADID;
|
||||
QR.link.textContent = 'Start a Thread';
|
||||
$.off(d, 'ThreadUpdate', QR.statusCheck);
|
||||
return $.on(d, 'indexRefresh', QR.generatePostableThreadsList);
|
||||
return $.on(d, 'IndexRefresh', QR.generatePostableThreadsList);
|
||||
case 'thread':
|
||||
g.THREADID = +window.location.pathname.split('/')[3];
|
||||
QR.link.textContent = 'Reply to Thread';
|
||||
$.on(d, 'ThreadUpdate', QR.statusCheck);
|
||||
return $.off(d, 'IndexRefresh', QR.generatePostableThreadsList);
|
||||
|
||||
@ -11963,10 +11963,12 @@
|
||||
g.VIEW = view;
|
||||
switch (view) {
|
||||
case 'index':
|
||||
delete g.THREADID;
|
||||
QR.link.textContent = 'Start a Thread';
|
||||
$.off(d, 'ThreadUpdate', QR.statusCheck);
|
||||
return $.on(d, 'indexRefresh', QR.generatePostableThreadsList);
|
||||
return $.on(d, 'IndexRefresh', QR.generatePostableThreadsList);
|
||||
case 'thread':
|
||||
g.THREADID = +window.location.pathname.split('/')[3];
|
||||
QR.link.textContent = 'Reply to Thread';
|
||||
$.on(d, 'ThreadUpdate', QR.statusCheck);
|
||||
return $.off(d, 'IndexRefresh', QR.generatePostableThreadsList);
|
||||
|
||||
@ -104,10 +104,12 @@ Navigate =
|
||||
|
||||
switch view
|
||||
when 'index'
|
||||
delete g.THREADID
|
||||
QR.link.textContent = 'Start a Thread'
|
||||
$.off d, 'ThreadUpdate', QR.statusCheck
|
||||
$.on d, 'indexRefresh', QR.generatePostableThreadsList
|
||||
$.on d, 'IndexRefresh', QR.generatePostableThreadsList
|
||||
when 'thread'
|
||||
g.THREADID = +window.location.pathname.split('/')[3]
|
||||
QR.link.textContent = 'Reply to Thread'
|
||||
$.on d, 'ThreadUpdate', QR.statusCheck
|
||||
$.off d, 'IndexRefresh', QR.generatePostableThreadsList
|
||||
|
||||
@ -655,8 +655,6 @@ QR =
|
||||
|
||||
ThreadUpdater.postID = postID
|
||||
|
||||
|
||||
|
||||
# Post/upload confirmed as successful.
|
||||
$.event 'QRPostSuccessful', {
|
||||
board: g.BOARD
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user