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
9a161af8
Commit
9a161af8
authored
Jul 09, 2013
by
Randall Leeds
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Kill the slide-over detail
Fix #466
parent
0125ec0e
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
29 additions
and
47 deletions
+29
-47
common.scss
h/css/common.scss
+4
-10
controllers.coffee
h/js/controllers.coffee
+20
-36
directives.coffee
h/js/directives.coffee
+5
-1
No files found.
h/css/common.scss
View file @
9a161af8
...
...
@@ -297,15 +297,15 @@ blockquote {
&
:before
{
content
:
"\23"
;
font-size
:
6em
;
top
:
-.
2
em
;
left
:
-.
15
em
;
top
:
-.
36
em
;
left
:
-.
31
em
;
}
&
:after
{
content
:
"\24"
;
font-size
:
5em
;
right
:
-.
15
em
;
bottom
:
-.
1
em
;
right
:
-.
31
em
;
bottom
:
-.
27
em
;
}
}
...
...
@@ -835,7 +835,6 @@ blockquote {
//SUMMARY////////////////////////////////
//This is specific to the summary view.
.summary
{
margin-bottom
:
1em
;
position
:
relative
;
cursor
:
pointer
;
...
...
@@ -848,11 +847,6 @@ blockquote {
@include
smallshadow
(
2px
,
1px
,
.1
);
bottom
:
0
;
}
// Things not shown in the summary view
.magicontrols
.show
{
display
:
none
;
}
}
//STREAMER////////////////////////////////
...
...
h/js/controllers.coffee
View file @
9a161af8
...
...
@@ -379,25 +379,7 @@ class Viewer
$location
,
$routeParams
,
$scope
,
annotator
)
->
{
plugins
,
provider
}
=
annotator
listening
=
false
refresh
=
=>
return
unless
$scope
.
frame
.
visible
this
.
refresh
$scope
,
$routeParams
,
annotator
if
listening
if
$scope
.
detail
plugins
.
Heatmap
.
unsubscribe
'updated'
,
refresh
listening
=
false
else
unless
$scope
.
detail
plugins
.
Heatmap
.
subscribe
'updated'
,
refresh
listening
=
true
$scope
.
showDetail
=
(
annotation
)
->
search
=
$location
.
search
()
or
{}
search
.
id
=
annotation
.
id
$location
.
search
(
search
).
replace
()
{
provider
,
threading
}
=
annotator
$scope
.
focus
=
(
annotation
)
->
if
angular
.
isArray
annotation
...
...
@@ -408,29 +390,31 @@ class Viewer
highlights
=
[]
provider
.
notify
method
:
'setActiveHighlights'
,
params
:
highlights
$scope
.
replies
=
(
annotation
)
->
thread
=
threading
.
idTable
[
annotation
.
id
]
(
r
.
message
for
r
in
thread
.
children
)
$scope
.
toggleDetail
=
(
$event
)
->
# XXX: Super hacky nonsense here that should probably be handled
# by stopping the propagation or something. Also, the silly traversal
# of scope has got to stop.
$target
=
angular
.
element
$event
.
target
if
(
$event
.
target
.
tagName
in
[
'A'
,
'BUTTON'
,
'INPUT'
,
'TEXTAREA'
]
or
$target
.
attr
(
'ng-click'
)
or
$target
.
attr
(
'role'
)
==
'button'
)
$target
.
scope
()
?
.
$parent
?
.
$
$prevSibling
?
.
collapsed
=
false
@
detail
=
true
else
@
detail
=
!
@
detail
$scope
.
sortThread
=
(
thread
)
->
if
thread
?
.
message
?
.
updated
return
new
Date
(
thread
.
message
.
updated
)
else
return
new
Date
()
$scope
.
$on
'$destroy'
,
->
if
listening
then
plugins
.
Heatmap
.
unsubscribe
'updated'
,
refresh
$scope
.
$on
'$routeUpdate'
,
refresh
refresh
()
refresh
:
(
$scope
,
$routeParams
,
annotator
)
=>
if
$routeParams
.
id
?
and
annotator
.
threading
.
idTable
[
$routeParams
.
id
]
?
$scope
.
detail
=
true
$scope
.
thread
=
annotator
.
threading
.
getContainer
$routeParams
.
id
$scope
.
focus
$scope
.
thread
.
message
?
else
$scope
.
detail
=
false
$scope
.
thread
=
null
$scope
.
focus
[]
angular
.
module
(
'h.controllers'
,
[
'bootstrap'
])
.
controller
(
'AppController'
,
App
)
...
...
h/js/directives.coffee
View file @
9a161af8
annotation
=
[
'$filter'
,
(
$filte
r
)
->
annotation
=
[
'$filter'
,
'annotator'
,
(
$filter
,
annotato
r
)
->
link
:
(
scope
,
elem
,
attrs
,
controller
)
->
return
unless
controller
?
...
...
@@ -9,6 +9,10 @@ annotation = ['$filter', ($filter) ->
e
.
preventDefault
()
scope
.
save
()
# Watch for changes
scope
.
$watch
'model.$modelValue.id'
,
(
id
)
->
scope
.
thread
=
annotator
.
threading
.
idTable
[
id
]
# Publish the controller
scope
.
model
=
controller
controller
:
'AnnotationController'
...
...
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