Commit 32539f27 authored by Randall Leeds's avatar Randall Leeds

working thread collapse -- fixes #19

parent 60bd047c
...@@ -282,6 +282,11 @@ class Hypothesis extends Annotator ...@@ -282,6 +282,11 @@ class Hypothesis extends Annotator
event.stopPropagation() event.stopPropagation()
switch d3.event.target.getAttribute('href') switch d3.event.target.getAttribute('href')
when '#collapse'
d3.event.preventDefault()
parent = d3.select(event.currentTarget)
parent.classed('hyp-collapsed', !parent.classed('hyp-collapsed'))
when '#reply' when '#reply'
d3.event.preventDefault() d3.event.preventDefault()
parent = d3.select(event.currentTarget).datum() parent = d3.select(event.currentTarget).datum()
......
...@@ -261,14 +261,9 @@ $threadexp-width: 1em; ...@@ -261,14 +261,9 @@ $threadexp-width: 1em;
background-image: url("../images/minus_1.png"); background-image: url("../images/minus_1.png");
background-size: 100% 100%; background-size: 100% 100%;
background-position: center; background-position: center;
&.hyp-closed {
background-image: url("../images/plus_1.png"); .hyp-collapsed & { background-image: url("../images/plus_1.png"); }
background-size: 100% 100%; }
background-position: center; }
&.hyp-dot {
background-image: url("../images/dot_2.png");
background-size: 100% 100%;
background-position: center; } }
//CONTROLS //CONTROLS
.annotator-controls { .annotator-controls {
...@@ -536,8 +531,7 @@ $threadexp-width: 1em; ...@@ -536,8 +531,7 @@ $threadexp-width: 1em;
text-overflow: ellipsis; text-overflow: ellipsis;
-o-text-overflow: ellipsis; -o-text-overflow: ellipsis;
white-space: nowrap; white-space: nowrap;
position: relative; }
bottom: -0.3em; }
.hyp-body { .hyp-body {
@include pie-clearfix; @include pie-clearfix;
margin-top: 0.5em; margin-top: 0.5em;
...@@ -551,7 +545,16 @@ $threadexp-width: 1em; ...@@ -551,7 +545,16 @@ $threadexp-width: 1em;
position: absolute; position: absolute;
left: -$score-width / 2; } left: -$score-width / 2; }
.hyp-tag { .hyp-tag {
padding: 0.1em 0.3em; } } } padding: 0.1em 0.3em;
}
.hyp-time { display: none; }
.hyp-detail { display: none; }
.hyp-body, .hyp-meta {
float: left;
margin: 0;
}
}
}
// Remove the expander from the top level annotation // Remove the expander from the top level annotation
.hyp-widget > .hyp-reply { .hyp-widget > .hyp-reply {
......
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