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
8d0ead6d
Commit
8d0ead6d
authored
Jun 03, 2014
by
Randall Leeds
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Consistency in angular module boilerplate
parent
e11f4991
Changes
10
Show whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
77 additions
and
37 deletions
+77
-37
app_directives.coffee
h/js/app_directives.coffee
+1
-1
controllers.coffee
h/js/controllers.coffee
+15
-8
csrf.coffee
h/js/csrf.coffee
+4
-1
directives.coffee
h/js/directives.coffee
+13
-13
displayer.coffee
h/js/displayer.coffee
+11
-2
filters.coffee
h/js/filters.coffee
+4
-4
helpers.coffee
h/js/helpers.coffee
+1
-1
services.coffee
h/js/services.coffee
+10
-4
session.coffee
h/js/session.coffee
+7
-1
streamsearch.coffee
h/js/streamsearch.coffee
+11
-2
No files found.
h/js/app_directives.coffee
View file @
8d0ead6d
...
...
@@ -35,4 +35,4 @@ annotation = ['$filter', 'annotator', ($filter, annotator) ->
]
angular
.
module
(
'h.app_directives'
,
[
'ngSanitize'
])
.
directive
(
'annotation'
,
annotation
)
.
directive
(
'annotation'
,
annotation
)
h/js/controllers.coffee
View file @
8d0ead6d
imports
=
[
'bootstrap'
'h.helpers'
'h.streamfilter'
]
class
App
scope
:
frame
:
...
...
@@ -1067,11 +1074,11 @@ class Notification
)
->
angular
.
module
(
'h.controllers'
,
[
'bootstrap'
,
'h.streamfilter'
]
)
.
controller
(
'AppController'
,
App
)
.
controller
(
'AnnotationController'
,
Annotation
)
.
controller
(
'AuthController'
,
Auth
)
.
controller
(
'EditorController'
,
Editor
)
.
controller
(
'ViewerController'
,
Viewer
)
.
controller
(
'SearchController'
,
Search
)
.
controller
(
'NotificationController'
,
Notification
)
angular
.
module
(
'h.controllers'
,
imports
)
.
controller
(
'AppController'
,
App
)
.
controller
(
'AnnotationController'
,
Annotation
)
.
controller
(
'AuthController'
,
Auth
)
.
controller
(
'EditorController'
,
Editor
)
.
controller
(
'ViewerController'
,
Viewer
)
.
controller
(
'SearchController'
,
Search
)
.
controller
(
'NotificationController'
,
Notification
)
h/js/csrf.coffee
View file @
8d0ead6d
imports
=
[
'h.helpers'
]
configure
=
[
'$httpProvider'
,
(
$httpProvider
)
->
# Use the Pyramid XSRF header name
$httpProvider
.
defaults
.
xsrfHeaderName
=
'X-CSRF-Token'
...
...
@@ -31,4 +34,4 @@ configure = ['$httpProvider', ($httpProvider) ->
]
angular
.
module
(
'h.csrf'
,
[
'h.helpers'
]
,
configure
)
angular
.
module
(
'h.csrf'
,
imports
,
configure
)
h/js/directives.coffee
View file @
8d0ead6d
...
...
@@ -407,16 +407,16 @@ whenscrolled = ['$window', ($window) ->
]
angular
.
module
(
'h.directives'
,
[
'ngSanitize'
])
.
directive
(
'fuzzytime'
,
fuzzytime
)
.
directive
(
'markdown'
,
markdown
)
.
directive
(
'privacy'
,
privacy
)
.
directive
(
'recursive'
,
recursive
)
.
directive
(
'slowValidate'
,
slowValidate
)
.
directive
(
'tabReveal'
,
tabReveal
)
.
directive
(
'tags'
,
tags
)
.
directive
(
'thread'
,
thread
)
.
directive
(
'username'
,
username
)
.
directive
(
'userPicker'
,
userPicker
)
.
directive
(
'repeatAnim'
,
repeatAnim
)
.
directive
(
'streamviewer'
,
streamviewer
)
.
directive
(
'whenscrolled'
,
whenscrolled
)
.
directive
(
'fuzzytime'
,
fuzzytime
)
.
directive
(
'markdown'
,
markdown
)
.
directive
(
'privacy'
,
privacy
)
.
directive
(
'recursive'
,
recursive
)
.
directive
(
'slowValidate'
,
slowValidate
)
.
directive
(
'tabReveal'
,
tabReveal
)
.
directive
(
'tags'
,
tags
)
.
directive
(
'thread'
,
thread
)
.
directive
(
'username'
,
username
)
.
directive
(
'userPicker'
,
userPicker
)
.
directive
(
'repeatAnim'
,
repeatAnim
)
.
directive
(
'streamviewer'
,
streamviewer
)
.
directive
(
'whenscrolled'
,
whenscrolled
)
h/js/displayer.coffee
View file @
8d0ead6d
imports
=
[
'bootstrap'
'h.filters'
'h.directives'
'h.helpers'
'h.streamfilter'
]
get_quote
=
(
annotation
)
->
if
not
'target'
in
annotation
then
return
''
quote
=
'(This is a reply annotation)'
...
...
@@ -138,5 +147,5 @@ class Displayer
document
.
init_annotation
=
null
$scope
.
open
()
angular
.
module
(
'h.displayer'
,
[
'h.streamfilter'
,
'h.filters'
,
'h.directives'
,
'h.helpers'
,
'bootstrap'
]
)
.
controller
(
'DisplayerCtrl'
,
Displayer
)
angular
.
module
(
'h.displayer'
,
imports
)
.
controller
(
'DisplayerCtrl'
,
Displayer
)
h/js/filters.coffee
View file @
8d0ead6d
...
...
@@ -52,7 +52,7 @@ elide = (text, split_length) ->
angular
.
module
(
'h.filters'
,
[])
.
filter
(
'converter'
,
->
(
new
Converter
()).
makeHtml
)
.
filter
(
'fuzzyTime'
,
->
fuzzyTime
)
.
filter
(
'persona'
,
->
persona
)
.
filter
(
'elide'
,
->
elide
)
.
filter
(
'converter'
,
->
(
new
Converter
()).
makeHtml
)
.
filter
(
'fuzzyTime'
,
->
fuzzyTime
)
.
filter
(
'persona'
,
->
persona
)
.
filter
(
'elide'
,
->
elide
)
h/js/helpers.coffee
View file @
8d0ead6d
...
...
@@ -12,4 +12,4 @@ baseURI = [
angular
.
module
(
'h.helpers'
,
[])
.
factory
(
'baseURI'
,
baseURI
)
.
factory
(
'baseURI'
,
baseURI
)
h/js/services.coffee
View file @
8d0ead6d
imports
=
[
'h.filters'
'h.session'
]
class
Hypothesis
extends
Annotator
events
:
'annotationCreated'
:
'updateAncestors'
...
...
@@ -826,7 +832,7 @@ class ViewFilter
results
angular
.
module
(
'h.services'
,
[
'h.filters'
,
'h.session'
]
)
.
provider
(
'drafts'
,
DraftProvider
)
.
service
(
'annotator'
,
Hypothesis
)
.
service
(
'viewFilter'
,
ViewFilter
)
angular
.
module
(
'h.services'
,
imports
)
.
provider
(
'drafts'
,
DraftProvider
)
.
service
(
'annotator'
,
Hypothesis
)
.
service
(
'viewFilter'
,
ViewFilter
)
h/js/session.coffee
View file @
8d0ead6d
imports
=
[
'ngResource'
'h.helpers'
]
# bw compat
sessionPersonaInterceptor
=
(
response
)
->
data
=
response
.
data
...
...
@@ -72,5 +78,5 @@ class SessionProvider
]
angular
.
module
(
'h.session'
,
[
'ngResource'
]
)
angular
.
module
(
'h.session'
,
imports
)
.
provider
(
'session'
,
SessionProvider
)
h/js/streamsearch.coffee
View file @
8d0ead6d
imports
=
[
'bootstrap'
'h.directives'
'h.filters'
'h.helpers'
'h.streamfilter'
]
get_quote
=
(
annotation
)
->
if
annotation
.
quote
?
then
return
annotation
.
quote
if
not
'target'
in
annotation
then
return
''
...
...
@@ -313,5 +322,5 @@ configure = [
]
angular
.
module
(
'h.streamsearch'
,
[
'h.streamfilter'
,
'h.filters'
,
'h.directives'
,
'h.helpers'
,
'bootstrap'
]
,
configure
)
.
controller
(
'StreamSearchController'
,
StreamSearch
)
angular
.
module
(
'h.streamsearch'
,
imports
,
configure
)
.
controller
(
'StreamSearchController'
,
StreamSearch
)
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