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
ce3acc19
Commit
ce3acc19
authored
Aug 10, 2013
by
Ujvari Gergely
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed rebase inconsistencies
parent
b98b81df
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
66 deletions
+4
-66
controllers.coffee
h/js/controllers.coffee
+2
-2
services.coffee
h/js/services.coffee
+2
-64
No files found.
h/js/controllers.coffee
View file @
ce3acc19
...
...
@@ -7,11 +7,11 @@ class App
tab
:
null
this
.
$inject
=
[
'$
compile'
,
'$
element'
,
'$filter'
,
'$http'
,
'$location'
,
'$rootScope'
,
'$scope'
,
'$timeout'
,
'$element'
,
'$filter'
,
'$http'
,
'$location'
,
'$rootScope'
,
'$scope'
,
'$timeout'
,
'annotator'
,
'authentication'
,
'drafts'
,
'flash'
]
constructor
:
(
$
compile
,
$
element
,
$filter
,
$http
,
$location
,
$rootScope
,
$scope
,
$timeout
$element
,
$filter
,
$http
,
$location
,
$rootScope
,
$scope
,
$timeout
annotator
,
authentication
,
drafts
,
flash
)
->
# Get the base URL from the base tag or the app location
...
...
h/js/services.coffee
View file @
ce3acc19
...
...
@@ -51,8 +51,8 @@ class Hypothesis extends Annotator
viewer
:
addField
:
(
->
)
this
.
$inject
=
[
'$document'
,
'$location'
,
'$rootScope'
,
'$route'
,
'
$timeout'
,
'
drafts'
]
constructor
:
(
$document
,
$location
,
$rootScope
,
$route
,
$timeout
,
drafts
)
->
this
.
$inject
=
[
'$document'
,
'$location'
,
'$rootScope'
,
'$route'
,
'drafts'
]
constructor
:
(
$document
,
$location
,
$rootScope
,
$route
,
drafts
)
->
Gettext
.
prototype
.
parse_locale_data
annotator_locale_data
super
(
$document
.
find
'body'
)
...
...
@@ -416,68 +416,6 @@ class DraftProvider
else
false
class
FlashProvider
queues
:
''
:
[]
info
:
[]
error
:
[]
success
:
[]
notice
:
null
timeout
:
null
this
.
$inject
=
[
'$httpProvider'
]
constructor
:
(
$httpProvider
)
->
# Configure notification classes
angular
.
extend
Annotator
.
Notification
,
INFO
:
'info'
ERROR
:
'error'
SUCCESS
:
'success'
# Configure the response interceptor
$httpProvider
.
responseInterceptors
.
push
[
'$q'
,
(
$q
)
=>
(
promise
)
=>
promise
.
then
(
response
)
=>
data
=
response
.
data
format
=
response
.
headers
'content-type'
if
format
?
.
match
/^application\/json/
if
data
.
flash
?
this
.
_flash
q
,
msgs
for
q
,
msgs
of
data
.
flash
if
data
.
status
is
'failure'
this
.
_flash
'error'
,
data
.
reason
$q
.
reject
(
data
.
reason
)
else
if
data
.
status
is
'okay'
response
.
data
=
data
.
model
response
else
response
]
_process
:
->
@
timeout
=
null
for
q
,
msgs
of
@
queues
if
msgs
.
length
msg
=
msgs
.
shift
()
unless
q
then
[
q
,
msg
]
=
msg
notice
=
Annotator
.
showNotification
msg
,
q
@
timeout
=
this
.
_wait
=>
# work around Annotator.Notification not removing classes
for
_
,
klass
of
notice
.
options
.
classes
notice
.
element
.
removeClass
klass
this
.
_process
()
break
$get
:
[
'$timeout'
,
'annotator'
,
(
$timeout
,
annotator
)
->
this
.
_wait
=
(
cb
)
->
$timeout
cb
,
5000
angular
.
bind
this
,
this
.
_flash
]
_flash
:
(
queue
,
messages
)
->
if
@
queues
[
queue
]
?
@
queues
[
queue
]
=
@
queues
[
queue
]
?
.
concat
messages
this
.
_process
()
unless
@
timeout
?
angular
.
module
(
'h.services'
,
[
'ngResource'
,
'h.filters'
])
.
provider
(
'authentication'
,
AuthenticationProvider
)
.
provider
(
'drafts'
,
DraftProvider
)
...
...
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