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
8dcfd66b
Commit
8dcfd66b
authored
Aug 08, 2013
by
Randall Leeds
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #591 from hypothesis/user-stream-improvements-4
Stream improvements 4
parents
adf90838
9436734c
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
40 additions
and
3 deletions
+40
-3
common.scss
h/css/common.scss
+15
-0
stream.coffee
h/js/stream.coffee
+25
-3
No files found.
h/css/common.scss
View file @
8dcfd66b
...
...
@@ -915,6 +915,14 @@ blockquote {
margin-bottom
:
.75em
;
}
.no-overflow
{
overflow
:
hidden
;
}
.strech
{
width
:
100%
;
white-space
:
nowrap
;
}
.filter-body
{
overflow
:
visible
;
...
...
@@ -937,6 +945,13 @@ blockquote {
left
:
0px
;
}
.card-grid
{
.full-quote
{
margin
:
0
;
padding-left
:
2em
;
padding-right
:
1
.75em
;
}
}
@mixin
sidebar_animation
{
-webkit-transition
:
1s
linear
all
;
-moz-transition
:
1s
linear
all
;
...
...
h/js/stream.coffee
View file @
8dcfd66b
get_quote
=
(
annotation
)
->
if
annotation
.
quote
?
then
return
annotation
.
quote
if
not
'target'
in
annotation
then
return
''
quote
=
'(Reply annotation)'
for
target
in
annotation
[
'target'
]
for
selector
in
target
[
'selector'
]
if
selector
[
'type'
]
is
'TextQuoteSelector'
quote
=
selector
[
'exact'
]
+
' '
quote
class
Stream
...
...
@@ -27,7 +28,7 @@ class Stream
$scope
.
filter
=
streamfilter
.
setPastDataHits
(
1
0
0
)
.
setPastDataHits
(
1
5
0
)
.
setMatchPolicyIncludeAny
()
.
setClausesParse
(
filterClause
)
.
getFilter
()
...
...
@@ -36,8 +37,29 @@ class Stream
for
annotation
in
data
annotation
.
action
=
action
annotation
.
quote
=
get_quote
annotation
annotation
.
_share_link
=
window
.
location
.
protocol
+
'//'
+
window
.
location
.
hostname
+
':'
+
window
.
location
.
port
+
"/a/"
+
annotation
.
id
annotation
.
_anim
=
'fade'
$scope
.
annotations
.
splice
0
,
0
,
annotation
switch
action
when
'create'
,
'past'
unless
annotation
in
$scope
.
annotations
$scope
.
annotations
.
unshift
annotation
when
'update'
index
=
0
for
ann
in
$scope
.
annotations
if
ann
.
id
is
annotation
.
id
# Remove the original
$scope
.
annotations
.
splice
index
,
1
# Put back the edited
$scope
.
annotations
.
unshift
annotation
break
index
+=
1
when
'delete'
for
ann
in
$scope
.
annotations
if
ann
.
id
is
annotation
.
id
$scope
.
annotations
.
splice
index
,
1
break
index
+=
1
$scope
.
open
=
=>
$scope
.
sock
=
new
SockJS
(
@
path
)
...
...
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