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
f5be22af
Commit
f5be22af
authored
Feb 21, 2013
by
Randall Leeds
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch '158_reply_count_in_summary_view' into develop
parents
0fdc89e5
1f31cbd5
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
35 additions
and
31 deletions
+35
-31
common.scss
h/css/common.scss
+9
-0
controllers.coffee
h/js/controllers.coffee
+19
-9
filters.coffee
h/js/filters.coffee
+6
-6
services.coffee
h/js/services.coffee
+1
-16
No files found.
h/css/common.scss
View file @
f5be22af
...
...
@@ -557,6 +557,15 @@ blockquote {
}
}
.reply-count
{
.detail
.magicontrols
&
{
display
:
none
;
}
.summary
&
:after
{
content
:
' /'
}
}
//SUMMARY////////////////////////////////
...
...
h/js/controllers.coffee
View file @
f5be22af
...
...
@@ -113,15 +113,6 @@ class App
if
data
.
flash
?
then
flash
q
,
msgs
for
q
,
msgs
of
data
.
flash
if
data
.
status
is
'failure'
then
flash
'error'
,
data
.
reason
$scope
.
toggleShow
=
->
if
annotator
.
visible
$location
.
path
(
''
).
replace
()
annotator
.
hide
()
else
if
$location
.
path
()
?
.
match
'^/?$'
$location
.
path
(
'/viewer'
).
replace
()
annotator
.
show
()
$scope
.
$watch
'personas'
,
(
newValue
,
oldValue
)
=>
if
newValue
?
.
length
annotator
.
element
.
find
(
'#persona'
)
...
...
@@ -158,6 +149,16 @@ class App
plugins
.
HypothesisPermissions
.
setUser
(
null
)
delete
plugins
.
Auth
$scope
.
$watch
'visible'
,
(
newValue
)
->
if
newValue
then
annotator
.
show
()
else
annotator
.
hide
()
$scope
.
$on
'back'
,
->
return
unless
drafts
.
discard
()
if
$location
.
path
()
==
'/viewer'
and
$location
.
search
()
?
.
id
?
$location
.
search
(
'id'
,
null
).
replace
()
else
$scope
.
visible
=
false
$scope
.
$on
'showAuth'
,
(
event
,
show
=
true
)
->
angular
.
extend
$scope
.
sheet
,
collapsed
:
!
show
...
...
@@ -245,6 +246,15 @@ class Annotation
$scope
.
editing
=
true
$scope
.
unsaved
=
true
$scope
.
directChildren
=
->
if
$scope
.
$modelValue
?
and
threading
.
getContainer
(
$scope
.
$modelValue
.
id
).
children
?
return
threading
.
getContainer
(
$scope
.
$modelValue
.
id
).
children
.
length
0
$scope
.
allChildren
=
->
if
$scope
.
$modelValue
?
and
threading
.
getContainer
(
$scope
.
$modelValue
.
id
).
flattenChildren
()
?
return
threading
.
getContainer
(
$scope
.
$modelValue
.
id
).
flattenChildren
().
length
0
class
Editor
this
.
$inject
=
[
...
...
h/js/filters.coffee
View file @
f5be22af
...
...
@@ -16,17 +16,17 @@ fuzzyTime = (date) ->
month
=
day
*
30
if
(
delta
<
30
)
fuzzy
=
'moments ago
.
'
fuzzy
=
'moments ago'
else
if
(
delta
<
minute
)
fuzzy
=
delta
+
' seconds ago
.
'
fuzzy
=
delta
+
' seconds ago'
else
if
(
delta
<
2
*
minute
)
fuzzy
=
'a minute ago
.
'
fuzzy
=
'a minute ago'
else
if
(
delta
<
hour
)
fuzzy
=
Math
.
floor
(
delta
/
minute
)
+
' minutes ago
.
'
fuzzy
=
Math
.
floor
(
delta
/
minute
)
+
' minutes ago'
else
if
(
Math
.
floor
(
delta
/
hour
)
==
1
)
fuzzy
=
'1 hour ago
.
'
fuzzy
=
'1 hour ago'
else
if
(
delta
<
day
)
fuzzy
=
Math
.
floor
(
delta
/
hour
)
+
' hours ago
.
'
fuzzy
=
Math
.
floor
(
delta
/
hour
)
+
' hours ago'
else
if
(
delta
<
day
*
2
)
fuzzy
=
'yesterday'
else
if
(
delta
<
month
)
...
...
h/js/services.coffee
View file @
f5be22af
...
...
@@ -10,11 +10,6 @@ class Hypothesis extends Annotator
showViewPermissionsCheckbox
:
false
,
userString
:
(
user
)
->
user
.
replace
(
/^acct:(.+)@(.+)$/
,
'$1 on $2'
)
# Internal state
detail
:
false
# * Whether the viewer shows a summary or detail listing
visible
:
false
# * Whether the sidebar is visible
unsaved_drafts
:
[]
# * Unsaved drafts currenty open
this
.
$inject
=
[
'$document'
,
'$location'
,
'$rootScope'
,
'threading'
...
...
@@ -82,7 +77,6 @@ class Hypothesis extends Annotator
_setupXDM
:
->
$scope
=
@
element
.
scope
()
$location
=
@
element
.
injector
().
get
'$location'
drafts
=
@
element
.
injector
().
get
'drafts'
threading
=
@
element
.
injector
().
get
'threading'
@
provider
=
new
easyXDM
.
Rpc
...
...
@@ -199,14 +193,7 @@ class Hypothesis extends Annotator
thread
.
message
?
.
annotation
or
a
$scope
.
$apply
=>
this
.
showViewer
annotations
this
.
show
()
# This guy does stuff when you "back out" of the interface.
# (Currently triggered by a click on the source page.)
back
:
=>
return
unless
drafts
.
discard
()
if
$location
.
path
()
==
'/viewer'
and
$location
.
search
()
?
.
id
?
$scope
.
$apply
=>
$location
.
search
(
'id'
,
null
).
replace
()
else
this
.
hide
()
back
:
=>
$scope
.
$apply
=>
$scope
.
$broadcast
'back'
update
:
=>
this
.
publish
'hostUpdated'
remote
:
publish
:
{}
...
...
@@ -340,14 +327,12 @@ class Hypothesis extends Annotator
]
show
:
=>
@
visible
=
true
@
provider
.
showFrame
()
@
element
.
find
(
'#toolbar'
).
addClass
(
'shown'
)
.
find
(
'.tri'
).
attr
(
'draggable'
,
true
)
hide
:
=>
@
lastWidth
=
window
.
innerWidth
@
visible
=
false
@
provider
.
setActiveHighlights
[]
@
provider
.
hideFrame
()
@
element
.
find
(
'#toolbar'
).
removeClass
(
'shown'
)
...
...
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