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;
|
g.VIEW = view;
|
||||||
switch (view) {
|
switch (view) {
|
||||||
case 'index':
|
case 'index':
|
||||||
|
delete g.THREADID;
|
||||||
QR.link.textContent = 'Start a Thread';
|
QR.link.textContent = 'Start a Thread';
|
||||||
$.off(d, 'ThreadUpdate', QR.statusCheck);
|
$.off(d, 'ThreadUpdate', QR.statusCheck);
|
||||||
return $.on(d, 'indexRefresh', QR.generatePostableThreadsList);
|
return $.on(d, 'IndexRefresh', QR.generatePostableThreadsList);
|
||||||
case 'thread':
|
case 'thread':
|
||||||
|
g.THREADID = +window.location.pathname.split('/')[3];
|
||||||
QR.link.textContent = 'Reply to Thread';
|
QR.link.textContent = 'Reply to Thread';
|
||||||
$.on(d, 'ThreadUpdate', QR.statusCheck);
|
$.on(d, 'ThreadUpdate', QR.statusCheck);
|
||||||
return $.off(d, 'IndexRefresh', QR.generatePostableThreadsList);
|
return $.off(d, 'IndexRefresh', QR.generatePostableThreadsList);
|
||||||
|
|||||||
@ -11963,10 +11963,12 @@
|
|||||||
g.VIEW = view;
|
g.VIEW = view;
|
||||||
switch (view) {
|
switch (view) {
|
||||||
case 'index':
|
case 'index':
|
||||||
|
delete g.THREADID;
|
||||||
QR.link.textContent = 'Start a Thread';
|
QR.link.textContent = 'Start a Thread';
|
||||||
$.off(d, 'ThreadUpdate', QR.statusCheck);
|
$.off(d, 'ThreadUpdate', QR.statusCheck);
|
||||||
return $.on(d, 'indexRefresh', QR.generatePostableThreadsList);
|
return $.on(d, 'IndexRefresh', QR.generatePostableThreadsList);
|
||||||
case 'thread':
|
case 'thread':
|
||||||
|
g.THREADID = +window.location.pathname.split('/')[3];
|
||||||
QR.link.textContent = 'Reply to Thread';
|
QR.link.textContent = 'Reply to Thread';
|
||||||
$.on(d, 'ThreadUpdate', QR.statusCheck);
|
$.on(d, 'ThreadUpdate', QR.statusCheck);
|
||||||
return $.off(d, 'IndexRefresh', QR.generatePostableThreadsList);
|
return $.off(d, 'IndexRefresh', QR.generatePostableThreadsList);
|
||||||
|
|||||||
@ -104,10 +104,12 @@ Navigate =
|
|||||||
|
|
||||||
switch view
|
switch view
|
||||||
when 'index'
|
when 'index'
|
||||||
|
delete g.THREADID
|
||||||
QR.link.textContent = 'Start a Thread'
|
QR.link.textContent = 'Start a Thread'
|
||||||
$.off d, 'ThreadUpdate', QR.statusCheck
|
$.off d, 'ThreadUpdate', QR.statusCheck
|
||||||
$.on d, 'indexRefresh', QR.generatePostableThreadsList
|
$.on d, 'IndexRefresh', QR.generatePostableThreadsList
|
||||||
when 'thread'
|
when 'thread'
|
||||||
|
g.THREADID = +window.location.pathname.split('/')[3]
|
||||||
QR.link.textContent = 'Reply to Thread'
|
QR.link.textContent = 'Reply to Thread'
|
||||||
$.on d, 'ThreadUpdate', QR.statusCheck
|
$.on d, 'ThreadUpdate', QR.statusCheck
|
||||||
$.off d, 'IndexRefresh', QR.generatePostableThreadsList
|
$.off d, 'IndexRefresh', QR.generatePostableThreadsList
|
||||||
|
|||||||
@ -655,8 +655,6 @@ QR =
|
|||||||
|
|
||||||
ThreadUpdater.postID = postID
|
ThreadUpdater.postID = postID
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# Post/upload confirmed as successful.
|
# Post/upload confirmed as successful.
|
||||||
$.event 'QRPostSuccessful', {
|
$.event 'QRPostSuccessful', {
|
||||||
board: g.BOARD
|
board: g.BOARD
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user