Commit cbab975e authored by Jehan Tremback's avatar Jehan Tremback

nuked .hyp-

parent 8b969eb5
......@@ -50,5 +50,5 @@ Handlebars.registerHelper('formatUser', function (user) {
return new Handlebars.SafeString(
user.replace(
/^acct:([^@]+)@(.+)$/,
'$1 <span class="hyp-provider">on $2</span>'))
'$1 <span class="provider">on $2</span>'))
})
......@@ -152,7 +152,7 @@ class Hypothesis extends Annotator
@heatmap.subscribe 'updated', =>
# Creates tabs var by looking at all buckets on page.
tabs = d3.select(document.body)
.selectAll('div.hyp-heatmap-tab')
.selectAll('div.heatmap-tab')
.data =>
buckets = []
@heatmap.index.forEach (b, i) =>
......@@ -168,7 +168,7 @@ class Hypothesis extends Annotator
# Enters into tabs var, and generates bucket pointers from them
tabs.enter().append('div')
.classed('hyp-heatmap-tab', true)
.classed('heatmap-tab', true)
tabs.exit().remove()
......@@ -329,8 +329,8 @@ class Hypothesis extends Annotator
.data ((m) -> m.children), ((d) -> d.message.id)
context = d3.select(@viewer.element[0]).datum(messages)
items = thread context, '.hyp-annotation'
excerpts = thread context, '.hyp-excerpt'
items = thread context, '.annotation'
excerpts = thread context, '.excerpt'
if not detail
# Save the state so the bucket view can be restored when exiting
......@@ -340,16 +340,16 @@ class Hypothesis extends Annotator
excerpts.remove()
excerpts.exit().remove()
items.enter().append('li').classed('hyp-annotation', true)
items.enter().append('li').classed('annotation', true)
items.exit().remove()
items
.each (d) ->
_t = d3.select(this)
unless this and _t.classed('hyp-summary')
unless this and _t.classed('summary')
_t.html Handlebars.templates.summary d.message.annotation
.classed('hyp-detail', false)
.classed('hyp-summary', true)
.classed('hyp-paper', true)
.classed('detail', false)
.classed('summary', true)
.classed('paper', true)
.on 'mouseup', (d, i) =>
a = d.message.annotation
query =
......@@ -372,9 +372,9 @@ class Hypothesis extends Annotator
@detail = true
excerpts.enter()
.insert('li', '.hyp-annotation')
.classed('hyp-paper', true)
.classed('hyp-excerpt', true)
.insert('li', '.annotation')
.classed('paper', true)
.classed('excerpt', true)
.append('blockquote')
excerpts.exit().remove()
......@@ -404,16 +404,16 @@ class Hypothesis extends Annotator
@provider.setActiveHighlights highlights
while items.length
items.enter().append('li').classed('hyp-annotation', true)
items.enter().append('li').classed('annotation', true)
items.exit().remove()
items
.each (d) ->
_t = this and d3.select(this)
unless _t and _t.classed('hyp-detail')
unless _t and _t.classed('detail')
_t.html Handlebars.templates.detail d.message.annotation
.classed('hyp-paper', (c) -> not c.parent.message?)
.classed('hyp-detail', true)
.classed('hyp-summary', false)
.classed('paper', (c) -> not c.parent.message?)
.classed('detail', true)
.classed('summary', false)
.sort (d, e) =>
n = d.message.annotation.created
......@@ -422,11 +422,11 @@ class Hypothesis extends Annotator
.on 'mouseover', =>
d3.event.stopPropagation()
d3.select(d3.event.currentTarget).classed('hyp-hover', true)
d3.select(d3.event.currentTarget).classed('hover', true)
.on 'mouseout', =>
d3.event.stopPropagation()
d3.select(d3.event.currentTarget).classed('hyp-hover', false)
d3.select(d3.event.currentTarget).classed('hover', false)
.on 'mouseup', =>
event = d3.event
......@@ -435,8 +435,8 @@ class Hypothesis extends Annotator
event.stopPropagation()
animate = (parent) ->
collapsed = parent.classed('hyp-collapsed')
parent.select('.hyp-thread')
collapsed = parent.classed('collapsed')
parent.select('.thread')
.transition().duration(200)
.style('overflow', 'hidden')
.style 'height', ->
......@@ -454,15 +454,15 @@ class Hypothesis extends Annotator
switch d3.event.target.getAttribute('href')
when '#collapse'
d3.event.preventDefault()
collapsed = parent.classed('hyp-collapsed')
animate parent.classed('hyp-collapsed', !collapsed)
collapsed = parent.classed('collapsed')
animate parent.classed('collapsed', !collapsed)
when '#reply'
unless @plugins.Permissions?.user
showAuth true
break
d3.event.preventDefault()
parent = d3.select(event.currentTarget)
animate parent.classed('hyp-collapsed', false)
animate parent.classed('collapsed', false)
reply = this.createAnnotation()
reply.thread = this.threadId(parent.datum().message.annotation)
......@@ -479,16 +479,16 @@ class Hypothesis extends Annotator
item = d3.select(d3.event.currentTarget)
.select('.annotator-listing')
.insert('li', '.hyp-annotation')
.classed('hyp-annotation', true)
.classed('hyp-writer', true)
.insert('li', '.annotation')
.classed('annotation', true)
.classed('writer', true)
editor.element.appendTo(item.node())
editor.on('hide', => item.remove())
editor.element.find(":input:first").focus()
context = items.select '.hyp-thread'
items = thread context, '.hyp-annotation'
context = items.select '.thread'
items = thread context, '.annotation'
@editor.hide()
@viewer.show()
......@@ -509,10 +509,10 @@ class Hypothesis extends Annotator
@editor.element.find('.annotator-controls').remove()
quote = annotation.quote.replace(/\u00a0/g, ' ') # replace &nbsp;
excerpt = $('<li class="hyp-paper hyp-excerpt">')
excerpt = $('<li class="paper excerpt">')
excerpt.append($("<blockquote>#{quote}</blockquote>"))
item = $('<li class="hyp-paper hyp-writer">')
item = $('<li class="paper writer">')
item.append($(Handlebars.templates.editor(annotation)))
@editor.element.find('.annotator-listing').empty()
......
......@@ -37,7 +37,7 @@ svg { -webkit-tap-highlight-color: rgba(255, 255, 255, 0); }
}
//HEATMAP TABS
.hyp-heatmap-tab {
.heatmap-tab {
@include user-select(none);
background-image: url("../images/side_tab.svg");
background-position: center 1.025em;
......@@ -79,7 +79,7 @@ svg { -webkit-tap-highlight-color: rgba(255, 255, 255, 0); }
// .hyp-heatmap-tab {
// .heatmap-tab {
// @include user-select(none);
// color: rgb(238, 238, 238);
// cursor: pointer;
......@@ -187,7 +187,7 @@ svg { -webkit-tap-highlight-color: rgba(255, 255, 255, 0); }
@include transform-origin(50%, 0);
z-index: 4;
&.hyp-collapsed {
&.collapsed {
@include rotateX(90deg);
opacity: 0;
pointer-events: none;
......
......@@ -192,15 +192,15 @@ label {
color: $gray;
text-align: right;
&.hyp-write {
&.write {
background-image: url("../images/pen_1.png");
}
&.hyp-fave {
&.fave {
background-image: url("../images/fave_1.png");
}
&.hyp-flag {
&.flag {
background-image: url("../images/flag_1.png");
}
......@@ -215,10 +215,10 @@ label {
}
//BODY
.hyp-body { white-space: pre-wrap; }
.body { white-space: pre-wrap; }
//Provides the white background upon which items sit
.hyp-paper {
.paper {
@include border-radius(.2em);
@include smallshadow;
background: #fff;
......@@ -226,7 +226,7 @@ label {
}
//THREAD INDENTATION
.hyp-thread {
.thread {
margin: 0 -1em -1em (-$thread-padding / 2);
padding-left: $thread-padding / 2;
......@@ -237,14 +237,14 @@ label {
padding: .5em 1em 1em $thread-padding;
}
& .hyp-detail {
& .detail {
font-size: 1em;
}
}
}
//THREADEXP OBJECT
.hyp-threadexp {
.threadexp {
height: $threadexp-width;
width: $threadexp-width;
position: absolute;
......@@ -253,13 +253,13 @@ label {
outline: 1px dotted #aaa;
@include icon("minus_1.png");
.hyp-collapsed > & {
.collapsed > & {
background-image: url("../images/plus_1.png");
}
}
//EXCERPT
.hyp-excerpt {
.excerpt {
position: relative;
margin-bottom: 1em;
blockquote {
......@@ -387,7 +387,7 @@ blockquote {
}
//TIMESTAMP
.hyp-time {
.time {
float: right;
display: inline-block;
line-height: 2em;
......@@ -395,7 +395,7 @@ blockquote {
}
//COMMON CLASSES (TODO: put into a class common to all annotations)
.hyp-body {
.body {
margin-bottom: .5em
}
......@@ -404,7 +404,7 @@ blockquote {
}
//ANNOTATION DETAIL
.hyp-detail {
.detail {
position: relative;
& > .annotator-controls {
position: absolute;
......@@ -417,14 +417,14 @@ blockquote {
opacity: 0;
}
&.hyp-hover {
&.hover {
& > .annotator-controls {
opacity: 1;
}
}
&.hyp-collapsed {
& > .hyp-body {
&.collapsed {
& > .body {
overflow: hidden;
text-overflow: ellipsis;
-o-text-overflow: ellipsis;
......@@ -432,8 +432,8 @@ blockquote {
font-style: italic;
margin-top: 0;
}
& > .hyp-thread { overflow: hidden; }
& > .hyp-user {
& > .thread { overflow: hidden; }
& > .user {
display: run-in;
margin-right: .25em;
}
......@@ -441,18 +441,18 @@ blockquote {
}
// Remove the expander from the top level annotation
.hyp-paper > .hyp-threadexp {
.paper > .threadexp {
display: none;
}
.hyp-user {
.user {
margin-bottom: .25em;
font-weight: bold;
text-decoration: underline;
}
//EDITOR
.hyp-writer {
.writer {
@include smallshadow(0, 2px, .2);
position: relative;
......@@ -466,7 +466,7 @@ blockquote {
}
//BUCKET VIEW REPLY SUMMARIES
.hyp-summary {
.summary {
margin-bottom: 1em;
position: relative;
cursor: pointer;
......
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