Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
C
coopwire-hypothesis
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
孙灵跃 Leon Sun
coopwire-hypothesis
Commits
02b13e2f
Commit
02b13e2f
authored
Mar 12, 2015
by
Jake Hartnell
Committed by
Randall Leeds
Mar 17, 2015
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Clean up code. Remove hacky stuff.
parent
82591e48
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
13 additions
and
21 deletions
+13
-21
toolbar.coffee
h/static/scripts/annotator/plugin/toolbar.coffee
+1
-1
annotation.coffee
h/static/scripts/directives/annotation.coffee
+7
-7
help-page.scss
h/static/styles/help-page.scss
+0
-8
inject.scss
h/static/styles/inject.scss
+2
-3
variables.scss
h/static/styles/variables.scss
+1
-1
thread.html
h/templates/client/thread.html
+2
-1
No files found.
h/static/scripts/annotator/plugin/toolbar.coffee
View file @
02b13e2f
...
@@ -49,7 +49,7 @@ class Annotator.Plugin.Toolbar extends Annotator.Plugin
...
@@ -49,7 +49,7 @@ class Annotator.Plugin.Toolbar extends Annotator.Plugin
state
=
not
@
annotator
.
visibleHighlights
state
=
not
@
annotator
.
visibleHighlights
@
annotator
.
setVisibleHighlights
state
@
annotator
.
setVisibleHighlights
state
,
,
## TODO: if we are going to allow highlighting on mobile we should show
e 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"
# "title": "Highlighting Mode"
# "class": "h-icon-highlighter"
# "class": "h-icon-highlighter"
# "on":
# "on":
...
...
h/static/scripts/directives/annotation.coffee
View file @
02b13e2f
...
@@ -46,7 +46,6 @@ AnnotationController = [
...
@@ -46,7 +46,6 @@ AnnotationController = [
@timestamp = null
@timestamp = null
model = $scope.annotationGet()
model = $scope.annotationGet()
highlight = model.$highlight
original = null
original = null
vm = this
vm = this
...
@@ -64,8 +63,11 @@ AnnotationController = [
...
@@ -64,8 +63,11 @@ AnnotationController = [
# @returns {boolean} True if the annotation is a highlight.
# @returns {boolean} True if the annotation is a highlight.
###
###
this.isHighlight = ->
this.isHighlight = ->
model.target?.length and not model.references?.length and
if model.id
not (model.text or model.deleted or model.tags?.length)
model.target?.length and not model.references?.length and
not (model.text or model.deleted or model.tags?.length)
else
model.$highlight
###
*
###
*
# @ngdoc method
# @ngdoc method
...
@@ -265,13 +267,11 @@ AnnotationController = [
...
@@ -265,13 +267,11 @@ AnnotationController = [
$scope.$emit('annotationUpdate')
$scope.$emit('annotationUpdate')
# Save highlights once logged in.
# Save highlights once logged in.
if
highlight and
this.isHighlight()
if this.isHighlight()
if model.user and not model.id
if model.user and not model.id
highlight = false # skip this on future updates
model.permissions = permissions.private()
model.permissions = permissions.private()
model.$create().then ->
model.$create().then ->
$rootScope.$emit('annotationCreated', model)
$rootScope.$emit('annotationCreated', model)
highlight = false # skip this on future updates
else
else
drafts.add model, => this.revert()
drafts.add model, => this.revert()
...
@@ -280,7 +280,7 @@ AnnotationController = [
...
@@ -280,7 +280,7 @@ AnnotationController = [
, true
, true
# Start editing brand new annotations immediately
# 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
this
]
]
...
...
h/static/styles/help-page.scss
View file @
02b13e2f
@import
"./mixins/icons"
;
@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
{
.help-page
{
padding-top
:
2
.5em
;
padding-top
:
2
.5em
;
padding-bottom
:
2
.5em
;
padding-bottom
:
2
.5em
;
...
...
h/static/styles/inject.scss
View file @
02b13e2f
...
@@ -19,7 +19,6 @@ $base-font-size: 14px;
...
@@ -19,7 +19,6 @@ $base-font-size: 14px;
position
:
absolute
;
position
:
absolute
;
border
:
4px
solid
$border
;
border
:
4px
solid
$border
;
border-radius
:
4px
;
border-radius
:
4px
;
// width: 40px;
z-index
:
999
;
z-index
:
999
;
&
:before
{
&
:before
{
...
@@ -51,7 +50,7 @@ $base-font-size: 14px;
...
@@ -51,7 +50,7 @@ $base-font-size: 14px;
padding
:
0
;
padding
:
0
;
text-align
:
center
;
text-align
:
center
;
background
:
white
!
important
;
background
:
white
!
important
;
color
:
$
border
!
important
;
color
:
$
gray-light
!
important
;
&
:
:-
moz-focus-inner
{
&
:
:-
moz-focus-inner
{
border
:
0
;
border
:
0
;
...
@@ -227,7 +226,7 @@ $base-font-size: 14px;
...
@@ -227,7 +226,7 @@ $base-font-size: 14px;
left
:
-1px
;
left
:
-1px
;
position
:
absolute
;
position
:
absolute
;
color
:
fade-out
(
$text-color
,
.75
)
;
color
:
$gray-light
;
text-decoration
:
none
;
text-decoration
:
none
;
}
}
...
...
h/static/styles/variables.scss
View file @
02b13e2f
...
@@ -35,7 +35,7 @@ $link-color-hover: $hypothered !default;
...
@@ -35,7 +35,7 @@ $link-color-hover: $hypothered !default;
// Typography
// 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
;
$serif-font-family
:
Georgia
,
"Bitstream Charter"
,
"Times"
,
"Times New Roman"
,
serif
!
default
;
$mono-font-family
:
Open
Sans
Mono
,
Menlo
,
DejaVu
Sans
Mono
,
monospace
!
default
;
$mono-font-family
:
Open
Sans
Mono
,
Menlo
,
DejaVu
Sans
Mono
,
monospace
!
default
;
...
...
h/templates/client/thread.html
View file @
02b13e2f
<a
href=
""
<a
href=
""
class=
"threadexp"
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,
<span
ng-class=
"{'h-icon-expand-more': !!vm.collapsed,
'h-icon-expand-less': !vm.collapsed}"
></span>
'h-icon-expand-less': !vm.collapsed}"
></span>
</a>
</a>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment