Commit 02b13e2f authored by Jake Hartnell's avatar Jake Hartnell Committed by Randall Leeds

Clean up code. Remove hacky stuff.

parent 82591e48
......@@ -49,7 +49,7 @@ class Annotator.Plugin.Toolbar extends Annotator.Plugin
state = not @annotator.visibleHighlights
@annotator.setVisibleHighlights state
,
## TODO: if we are going to allow highlighting on mobile we should showe this button on a selection (mobile only)
## TODO: if we are going to allow highlighting on mobile we should show this button on a selection (mobile only).
# "title": "Highlighting Mode"
# "class": "h-icon-highlighter"
# "on":
......
......@@ -46,7 +46,6 @@ AnnotationController = [
@timestamp = null
model = $scope.annotationGet()
highlight = model.$highlight
original = null
vm = this
......@@ -64,8 +63,11 @@ AnnotationController = [
# @returns {boolean} True if the annotation is a highlight.
###
this.isHighlight = ->
model.target?.length and not model.references?.length and
not (model.text or model.deleted or model.tags?.length)
if model.id
model.target?.length and not model.references?.length and
not (model.text or model.deleted or model.tags?.length)
else
model.$highlight
###*
# @ngdoc method
......@@ -265,13 +267,11 @@ AnnotationController = [
$scope.$emit('annotationUpdate')
# Save highlights once logged in.
if highlight and this.isHighlight()
if this.isHighlight()
if model.user and not model.id
highlight = false # skip this on future updates
model.permissions = permissions.private()
model.$create().then ->
$rootScope.$emit('annotationCreated', model)
highlight = false # skip this on future updates
else
drafts.add model, => this.revert()
......@@ -280,7 +280,7 @@ AnnotationController = [
, true
# Start editing brand new annotations immediately
unless model.id? or (highlight and this.isHighlight()) then this.edit()
unless model.id? or this.isHighlight() then this.edit()
this
]
......
@import "./mixins/icons";
/* HACKY THINGS */
@import url(https://fonts.googleapis.com/css?family=Lato:400,300,300italic);
html, body {
font-family: "lato", sans-serif !important;
}
/* / HACKY THINGS */
.help-page {
padding-top: 2.5em;
padding-bottom: 2.5em;
......
......@@ -19,7 +19,6 @@ $base-font-size: 14px;
position: absolute;
border: 4px solid $border;
border-radius: 4px;
// width: 40px;
z-index: 999;
&:before {
......@@ -51,7 +50,7 @@ $base-font-size: 14px;
padding: 0;
text-align: center;
background: white !important;
color: $border !important;
color: $gray-light !important;
&::-moz-focus-inner {
border: 0;
......@@ -227,7 +226,7 @@ $base-font-size: 14px;
left: -1px;
position: absolute;
color: fade-out($text-color, .75);
color: $gray-light;
text-decoration: none;
}
......
......@@ -35,7 +35,7 @@ $link-color-hover: $hypothered !default;
// Typography
// -------------------------
$sans-font-family: "Helvetica Neue", Helvetica, Arial, "Lucida Grande", sans-serif !default;
$sans-font-family: "Lato","Helvetica Neue", Helvetica, Arial, "Lucida Grande", sans-serif !default;
$serif-font-family: Georgia, "Bitstream Charter", "Times", "Times New Roman", serif !default;
$mono-font-family: Open Sans Mono, Menlo, DejaVu Sans Mono, monospace !default;
......
<a href=""
class="threadexp"
title="{{vm.collapsed && 'Expand' || 'Collapse'}}">
title="{{vm.collapsed && 'Expand' || 'Collapse'}}"
ng-click="vm.toggleCollapsed()">
<span ng-class="{'h-icon-expand-more': !!vm.collapsed,
'h-icon-expand-less': !vm.collapsed}"></span>
</a>
......
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