Commit 85893c77 by Victor Shnayder

Make collapsibles not collapse the entire page

- need to set text of the link, not the document
- there was something funny with the operator precedence in the ternary operator (was getting 'true', instead of a string)
parent f627c9e9
......@@ -18,8 +18,11 @@ class @Collapsible
@toggleFull: (event) =>
$(event.target).parent().siblings().slideToggle()
$(event.target).parent().parent().toggleClass('open')
text = $(event.target).text() == 'See full output' ? 'Hide output' : 'See full output'
$(this).text(text)
if $(event.target).text() == 'See full output'
new_text = 'Hide output'
else
new_text = 'See full ouput'
$(event.target).text(new_text)
@toggleHint: (event) =>
event.preventDefault()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment