Auto-expand the discussion thread after it is scrolled to by simulating a click on the show/hide button. Note: the jQuery highlight effect doesnt work here due to a CSS !important setting on .discussion-module background color.

This commit is contained in:
Arthur Barrett
2013-02-12 13:57:28 -05:00
parent 7e7911a08d
commit 0c70d201f8

View File

@@ -105,8 +105,12 @@ class @Annotatable
onAfter: @makeAfterScroll(el)
})
makeAfterScroll: (el, duration = 500) ->
@_once -> el.effect 'shake', {}, duration
makeAfterScroll: (el, duration = 1500) ->
@_once ->
btn = $('.discussion-show', el)
if !btn.hasClass('shown')
btn.click()
#el.effect 'highlight', {}, duration
makeTipContent: (el) ->
(api) =>