From 9c30295b8e4cffa03e78594eaf14891536089b5a Mon Sep 17 00:00:00 2001 From: ccd0 Date: Sun, 25 Sep 2016 18:59:20 -0700 Subject: [PATCH] Fix shift+click and alt+click in catalog. Was broken by 9cee88ce3a9676adb999b6fc2536716a7e8debfb which removed data-full-i-d on catalog threads. --- src/General/Index.coffee | 4 ++-- src/Monitoring/ThreadWatcher.coffee | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/General/Index.coffee b/src/General/Index.coffee index 730ba4783..3f4fe1b14 100644 --- a/src/General/Index.coffee +++ b/src/General/Index.coffee @@ -184,9 +184,9 @@ Index = true catalogNode: -> - $.on @nodes.root, 'mousedown click', (e) -> + $.on @nodes.root, 'mousedown click', (e) => return unless e.button is 0 and e.shiftKey - Index.toggleHide g.threads[@dataset.fullID] if e.type is 'click' + Index.toggleHide @thread if e.type is 'click' e.preventDefault() # Also on mousedown to prevent highlighting text. toggleHide: (thread) -> diff --git a/src/Monitoring/ThreadWatcher.coffee b/src/Monitoring/ThreadWatcher.coffee index 3c7f1ef10..37c95075d 100644 --- a/src/Monitoring/ThreadWatcher.coffee +++ b/src/Monitoring/ThreadWatcher.coffee @@ -97,9 +97,9 @@ ThreadWatcher = catalogNode: -> $.addClass @nodes.root, 'watched' if ThreadWatcher.isWatched @thread - $.on @nodes.root, 'mousedown click', (e) -> + $.on @nodes.root, 'mousedown click', (e) => return unless e.button is 0 and e.altKey - ThreadWatcher.toggle g.threads[@dataset.fullID] if e.type is 'click' + ThreadWatcher.toggle @thread if e.type is 'click' e.preventDefault() # Also on mousedown to prevent highlighting thumbnail in Firefox. addDialog: ->