Merge branch 'indexrefresh'
This commit is contained in:
commit
76d31e5408
@ -4,7 +4,7 @@ ThreadHiding =
|
|||||||
@db = new DataBoard 'hiddenThreads'
|
@db = new DataBoard 'hiddenThreads'
|
||||||
return @catalogWatch() if g.VIEW is 'catalog'
|
return @catalogWatch() if g.VIEW is 'catalog'
|
||||||
@catalogSet g.BOARD
|
@catalogSet g.BOARD
|
||||||
$.on d, 'IndexRefresh', @onIndexRefresh
|
$.on d, 'IndexRefreshInternal', @onIndexRefresh
|
||||||
Callbacks.Post.push
|
Callbacks.Post.push
|
||||||
name: 'Thread Hiding'
|
name: 'Thread Hiding'
|
||||||
cb: @node
|
cb: @node
|
||||||
|
|||||||
@ -126,7 +126,7 @@ Index =
|
|||||||
$.replace board, Index.root
|
$.replace board, Index.root
|
||||||
if Index.nodes
|
if Index.nodes
|
||||||
$.event 'PostsInserted'
|
$.event 'PostsInserted'
|
||||||
$.event 'IndexBuild'
|
$.event 'IndexRefresh'
|
||||||
# Hacks:
|
# Hacks:
|
||||||
# - When removing an element from the document during page load,
|
# - When removing an element from the document during page load,
|
||||||
# its ancestors will still be correctly created inside of it.
|
# its ancestors will still be correctly created inside of it.
|
||||||
@ -616,7 +616,7 @@ Index =
|
|||||||
Main.callbackNodes 'Thread', threads
|
Main.callbackNodes 'Thread', threads
|
||||||
Main.callbackNodes 'Post', posts
|
Main.callbackNodes 'Post', posts
|
||||||
Index.updateHideLabel()
|
Index.updateHideLabel()
|
||||||
$.event 'IndexRefresh'
|
$.event 'IndexRefreshInternal'
|
||||||
|
|
||||||
buildReplies: (threads) ->
|
buildReplies: (threads) ->
|
||||||
posts = []
|
posts = []
|
||||||
@ -773,7 +773,7 @@ Index =
|
|||||||
$.add Index.root, nodes
|
$.add Index.root, nodes
|
||||||
if doc.contains Index.root
|
if doc.contains Index.root
|
||||||
$.event 'PostsInserted'
|
$.event 'PostsInserted'
|
||||||
$.event 'IndexBuild'
|
$.event 'IndexRefresh'
|
||||||
|
|
||||||
buildCatalog: (threads) ->
|
buildCatalog: (threads) ->
|
||||||
Index.buildCatalogViews threads
|
Index.buildCatalogViews threads
|
||||||
@ -791,7 +791,7 @@ Index =
|
|||||||
$.add Index.root, nodes
|
$.add Index.root, nodes
|
||||||
if doc.contains Index.root
|
if doc.contains Index.root
|
||||||
$.event 'PostsInserted'
|
$.event 'PostsInserted'
|
||||||
$.event 'IndexBuild'
|
$.event 'IndexRefresh'
|
||||||
|
|
||||||
clearSearch: ->
|
clearSearch: ->
|
||||||
Index.searchInput.value = ''
|
Index.searchInput.value = ''
|
||||||
|
|||||||
@ -3,7 +3,7 @@ ExpandThread =
|
|||||||
init: ->
|
init: ->
|
||||||
return if g.VIEW is 'thread' or !Conf['Thread Expansion']
|
return if g.VIEW is 'thread' or !Conf['Thread Expansion']
|
||||||
if Conf['JSON Index']
|
if Conf['JSON Index']
|
||||||
$.on d, 'IndexRefresh', @onIndexRefresh
|
$.on d, 'IndexRefreshInternal', @onIndexRefresh
|
||||||
else
|
else
|
||||||
Callbacks.Thread.push
|
Callbacks.Thread.push
|
||||||
name: 'Expand Thread'
|
name: 'Expand Thread'
|
||||||
@ -21,7 +21,7 @@ ExpandThread =
|
|||||||
status.req?.abort()
|
status.req?.abort()
|
||||||
delete ExpandThread.statuses[threadID]
|
delete ExpandThread.statuses[threadID]
|
||||||
|
|
||||||
$.off d, 'IndexRefresh', @onIndexRefresh unless refresh
|
$.off d, 'IndexRefreshInternal', @onIndexRefresh unless refresh
|
||||||
|
|
||||||
onIndexRefresh: ->
|
onIndexRefresh: ->
|
||||||
ExpandThread.disconnect true
|
ExpandThread.disconnect true
|
||||||
|
|||||||
@ -28,7 +28,7 @@ ThreadWatcher =
|
|||||||
|
|
||||||
switch g.VIEW
|
switch g.VIEW
|
||||||
when 'index'
|
when 'index'
|
||||||
$.on d, 'IndexRefresh', @cb.onIndexRefresh
|
$.on d, 'IndexRefreshInternal', @cb.onIndexRefresh
|
||||||
when 'thread'
|
when 'thread'
|
||||||
$.on d, 'ThreadUpdate', @cb.onThreadRefresh
|
$.on d, 'ThreadUpdate', @cb.onThreadRefresh
|
||||||
|
|
||||||
|
|||||||
@ -105,7 +105,7 @@ QR =
|
|||||||
$.on d, 'drop', QR.dropFile
|
$.on d, 'drop', QR.dropFile
|
||||||
$.on d, 'dragstart dragend', QR.drag
|
$.on d, 'dragstart dragend', QR.drag
|
||||||
|
|
||||||
$.on d, 'IndexRefresh', QR.generatePostableThreadsList
|
$.on d, 'IndexRefreshInternal', QR.generatePostableThreadsList
|
||||||
$.on d, 'ThreadUpdate', QR.statusCheck
|
$.on d, 'ThreadUpdate', QR.statusCheck
|
||||||
|
|
||||||
return if !Conf['Persistent QR']
|
return if !Conf['Persistent QR']
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user