Update QR depending on state.
This commit is contained in:
parent
79cf8713a4
commit
890277f296
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -105,9 +105,11 @@ Navigate =
|
||||
|
||||
switch view
|
||||
when 'index'
|
||||
QR.link.textContent = 'Start a Thread'
|
||||
$.off d, 'ThreadUpdate', QR.statusCheck
|
||||
$.on d, 'indexRefresh', QR.generatePostableThreadsList
|
||||
when 'thread'
|
||||
QR.link.textContent = 'Reply to Thread'
|
||||
$.on d, 'ThreadUpdate', QR.statusCheck
|
||||
$.off d, 'IndexRefresh', QR.generatePostableThreadsList
|
||||
|
||||
|
||||
@ -765,7 +765,7 @@ a.hide-announcement {
|
||||
:root.hide-original-post-form .postingMode,
|
||||
:root.hide-original-post-form #togglePostForm,
|
||||
#qr.autohide:not(.has-focus):not(:hover) > form,
|
||||
.postingMode ~ #qr select[data-name=thread],
|
||||
.thread #qr select[data-name=thread],
|
||||
#file-n-submit:not(.has-file) #qr-filerm {
|
||||
display: none;
|
||||
}
|
||||
|
||||
@ -45,6 +45,8 @@ QR =
|
||||
link = $.el 'h1',
|
||||
innerHTML: "<a href=javascript:; class='qr-link'>#{if g.VIEW is 'thread' then 'Reply to Thread' else 'Start a Thread'}</a>"
|
||||
className: "qr-link-container"
|
||||
|
||||
QR.link = link.firstElementChild
|
||||
$.on link.firstChild, 'click', ->
|
||||
|
||||
$.event 'CloseMenu'
|
||||
@ -70,11 +72,13 @@ QR =
|
||||
when 'index'
|
||||
$.on d, 'IndexRefresh', QR.generatePostableThreadsList
|
||||
when 'thread'
|
||||
$.on d, 'ThreadUpdate', ->
|
||||
if g.DEAD
|
||||
QR.abort()
|
||||
else
|
||||
QR.status()
|
||||
$.on d, 'ThreadUpdate', QR.statusCheck
|
||||
|
||||
statusCheck: ->
|
||||
if g.DEAD
|
||||
QR.abort()
|
||||
else
|
||||
QR.status()
|
||||
|
||||
node: ->
|
||||
$.on $('a[title="Quote this post"]', @nodes.info), 'click', QR.quote
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user