Make 'Show Last' checkbox in header menu no longer persistent.
This commit is contained in:
parent
0e8fade646
commit
185bfb2102
@ -1019,8 +1019,6 @@ Config =
|
|||||||
|
|
||||||
'Thread Quotes': false
|
'Thread Quotes': false
|
||||||
|
|
||||||
replyPruning:
|
'Max Replies': 1000
|
||||||
'Prune Replies': true
|
|
||||||
'Max Replies': 1000
|
|
||||||
|
|
||||||
'Autohiding Scrollbar': false
|
'Autohiding Scrollbar': false
|
||||||
|
|||||||
@ -2,9 +2,7 @@ ReplyPruning =
|
|||||||
init: ->
|
init: ->
|
||||||
return unless g.VIEW is 'thread' and Conf['Reply Pruning']
|
return unless g.VIEW is 'thread' and Conf['Reply Pruning']
|
||||||
|
|
||||||
if Conf['Quote Threading'] and Conf['Thread Quotes'] and Conf['Prune Replies']
|
@active = not (Conf['Quote Threading'] and Conf['Thread Quotes'])
|
||||||
Conf['Prune Replies'] = false
|
|
||||||
$.set 'Prune Replies', false
|
|
||||||
|
|
||||||
@container = $.frag()
|
@container = $.frag()
|
||||||
|
|
||||||
@ -16,7 +14,7 @@ ReplyPruning =
|
|||||||
@inputs.enabled.checked = !@inputs.enabled.checked
|
@inputs.enabled.checked = !@inputs.enabled.checked
|
||||||
$.event 'change', null, @inputs.enabled
|
$.event 'change', null, @inputs.enabled
|
||||||
|
|
||||||
label = UI.checkbox 'Prune Replies', 'Show Last'
|
label = UI.checkbox 'Prune Replies', 'Show Last', @active
|
||||||
el = $.el 'span',
|
el = $.el 'span',
|
||||||
title: 'Maximum number of replies to show.'
|
title: 'Maximum number of replies to show.'
|
||||||
,
|
,
|
||||||
@ -49,7 +47,7 @@ ReplyPruning =
|
|||||||
if @checked and other?.checked
|
if @checked and other?.checked
|
||||||
other.checked = false
|
other.checked = false
|
||||||
$.event 'change', null, other
|
$.event 'change', null, other
|
||||||
$.cb.checked.call @
|
ReplyPruning.active = @checked
|
||||||
|
|
||||||
showIfHidden: (id) ->
|
showIfHidden: (id) ->
|
||||||
if ReplyPruning.container?.getElementById id
|
if ReplyPruning.container?.getElementById id
|
||||||
@ -81,7 +79,7 @@ ReplyPruning =
|
|||||||
return
|
return
|
||||||
|
|
||||||
update: ->
|
update: ->
|
||||||
hidden2 = if Conf['Prune Replies']
|
hidden2 = if ReplyPruning.active
|
||||||
Math.max(ReplyPruning.total - +Conf["Max Replies"], 0)
|
Math.max(ReplyPruning.total - +Conf["Max Replies"], 0)
|
||||||
else
|
else
|
||||||
0
|
0
|
||||||
@ -107,7 +105,7 @@ ReplyPruning =
|
|||||||
$.after ReplyPruning.summary, frag
|
$.after ReplyPruning.summary, frag
|
||||||
$.event 'PostsInserted'
|
$.event 'PostsInserted'
|
||||||
|
|
||||||
ReplyPruning.summary.textContent = if Conf['Prune Replies']
|
ReplyPruning.summary.textContent = if ReplyPruning.active
|
||||||
Build.summaryText '+', ReplyPruning.hidden, ReplyPruning.hiddenFiles
|
Build.summaryText '+', ReplyPruning.hidden, ReplyPruning.hiddenFiles
|
||||||
else
|
else
|
||||||
Build.summaryText '-', ReplyPruning.total, ReplyPruning.totalFiles
|
Build.summaryText '-', ReplyPruning.total, ReplyPruning.totalFiles
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user