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
ba6280b3
Commit
ba6280b3
authored
Feb 24, 2015
by
Nick Stenning
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use browserify to manage JavaScript packaging
parent
a6aec003
Changes
16
Hide whitespace changes
Inline
Side-by-side
Showing
16 changed files
with
130 additions
and
14 deletions
+130
-14
bootstrap.js
h/static/bootstrap.js
+5
-2
.gitignore
h/static/scripts/.gitignore
+0
-2
account.coffee
h/static/scripts/account/account.coffee
+5
-0
monkey.coffee
h/static/scripts/annotator/monkey.coffee
+2
-0
enhancedanchoring.coffee
h/static/scripts/annotator/plugin/enhancedanchoring.coffee
+1
-1
app.coffee
h/static/scripts/app.coffee
+43
-0
bridge.coffee
h/static/scripts/bridge.coffee
+3
-0
filters.coffee
h/static/scripts/filters.coffee
+3
-0
guest.coffee
h/static/scripts/guest.coffee
+46
-3
helpers.coffee
h/static/scripts/helpers/helpers.coffee
+8
-0
string-helpers.coffee
h/static/scripts/helpers/string-helpers.coffee
+3
-0
host.coffee
h/static/scripts/host.coffee
+4
-3
session.coffee
h/static/scripts/session/session.coffee
+4
-0
threading-service.coffee
h/static/scripts/threading-service.coffee
+3
-0
.gitignore
h/static/scripts/vendor/.gitignore
+0
-2
.gitignore
h/static/scripts/vendor/polyfills/.gitignore
+0
-1
No files found.
h/static/bootstrap.js
View file @
ba6280b3
var
Klass
=
window
.
Annotator
.
Host
;
require
(
'./scripts/vendor/jquery.scrollintoview'
);
var
Annotator
=
require
(
'annotator'
);
var
Klass
=
require
(
'./scripts/host'
);
var
docs
=
'https://github.com/hypothesis/h/blob/master/README.rst#customized-embedding'
;
var
options
=
{
app
:
jQuery
(
'link[type="application/annotator+html"]'
).
attr
(
'href'
),
...
...
@@ -23,4 +26,4 @@ if (window.hasOwnProperty('hypothesisConfig')) {
}
window
.
annotator
=
new
Klass
(
document
.
body
,
options
);
window
.
Annotator
.
noConflict
().
$
.
noConflict
(
true
);
Annotator
.
noConflict
().
$
.
noConflict
(
true
);
h/static/scripts/.gitignore
deleted
100644 → 0
View file @
a6aec003
*.js
!vendor/*.js
h/static/scripts/account/account.coffee
View file @
ba6280b3
angular
=
require
(
'angular'
)
AUTH_SESSION_ACTIONS
=
[
'login'
'logout'
...
...
@@ -124,3 +126,6 @@ angular.module('h')
.
config
(
configure
)
.
controller
(
'AuthAppController'
,
AuthAppController
)
.
controller
(
'AuthPageController'
,
AuthPageController
)
require
(
'./account-controller'
)
require
(
'./auth-controller'
)
h/static/scripts/annotator/monkey.coffee
View file @
ba6280b3
Annotator
=
require
(
'annotator'
)
# Save references to Range and Util (because we call Annotator.noConflict() when
# bootstrapping)
Range
=
Annotator
.
Range
...
...
h/static/scripts/annotator/plugin/enhancedanchoring.coffee
View file @
ba6280b3
Annotator
=
@
Annotator
Annotator
=
require
(
'annotator'
)
$
=
Annotator
.
$
# Fake two-phase / pagination support, used for HTML documents
...
...
h/static/scripts/app.coffee
View file @
ba6280b3
angular
=
require
(
'angular'
)
uuid
=
require
(
'./vendor/uuid'
)
# These services are provided in their own angular modules and thus must be
# loaded first.
require
(
'./identity-service'
)
require
(
'./streamer-service'
)
imports
=
[
'ngAnimate'
'ngRoute'
...
...
@@ -92,3 +100,38 @@ module = angular.module('h', imports)
unless
mocha
?
# Crude method of detecting test environment.
module
.
run
(
setupCrossFrame
)
module
.
run
(
setupStreamer
)
require
(
'./vendor/annotator.auth.js'
)
require
(
'./annotator/monkey'
)
require
(
'./controllers'
)
require
(
'./directives'
)
require
(
'./directives/annotation'
)
require
(
'./directives/deep-count'
)
require
(
'./directives/markdown'
)
require
(
'./directives/privacy'
)
require
(
'./directives/simple-search'
)
require
(
'./directives/status-button'
)
require
(
'./directives/thread-filter'
)
require
(
'./directives/thread'
)
require
(
'./filters'
)
require
(
'./searchfilters'
)
require
(
'./services'
)
require
(
'./annotation-mapper-service'
)
require
(
'./annotation-ui-service'
)
require
(
'./auth-service'
)
require
(
'./cross-frame-service'
)
require
(
'./flash-service'
)
require
(
'./permissions-service'
)
require
(
'./store-service'
)
require
(
'./threading-service'
)
require
(
'./streamsearch'
)
require
(
'./annotation-sync'
)
require
(
'./annotation-ui-sync'
)
require
(
'./bridge'
)
require
(
'./discovery'
)
h/static/scripts/bridge.coffee
View file @
ba6280b3
$
=
require
(
'jquery'
)
Channel
=
require
(
'./vendor/jschannel'
)
class
Bridge
options
:
# Scope identifier to distinguish this channel from any others
...
...
h/static/scripts/filters.coffee
View file @
ba6280b3
angular
=
require
(
'angular'
)
Markdown
=
require
(
'./vendor/Markdown.Converter'
)
class
Converter
extends
Markdown
.
Converter
constructor
:
->
super
...
...
h/static/scripts/guest.coffee
View file @
ba6280b3
Annotator
=
@
Annotator
$
=
Annotator
.
$
$
=
require
(
'jquery'
)
Annotator
=
require
(
'annotator'
)
Channel
=
require
(
'./vendor/jschannel'
)
# Monkeypatch annotator!
require
(
'./annotator/monkey'
)
class
Annotator
.
Guest
extends
Annotator
# Cross-frame communication
require
(
'./annotator/plugin/cross-frame'
)
require
(
'./annotation-sync'
)
require
(
'./bridge'
)
require
(
'./discovery'
)
# Document plugin
require
(
'./vendor/annotator.document'
)
# Bucket bar
require
(
'./annotator/plugin/bucket-bar'
)
# Toolbar
require
(
'./annotator/plugin/toolbar'
)
# Drawing highlights
require
(
'./annotator/plugin/texthighlights'
)
# Creating selections
require
(
'./annotator/plugin/textselection'
)
# URL fragments
require
(
'./annotator/plugin/fragmentselector'
)
# Anchoring
require
(
'./vendor/dom_text_mapper'
)
require
(
'./annotator/plugin/enhancedanchoring'
)
require
(
'./annotator/plugin/domtextmapper'
)
require
(
'./annotator/plugin/textposition'
)
require
(
'./annotator/plugin/textquote'
)
require
(
'./annotator/plugin/textrange'
)
# PDF
require
(
'./vendor/page_text_mapper_core'
)
require
(
'./annotator/plugin/pdf'
)
# Fuzzy
require
(
'./vendor/dom_text_matcher'
)
require
(
'./annotator/plugin/fuzzytextanchors'
)
module
.
exports
=
class
Annotator
.
Guest
extends
Annotator
SHOW_HIGHLIGHTS_CLASS
=
'annotator-highlights-always-on'
# Events to be bound on Annotator#element.
...
...
h/static/scripts/helpers/helpers.coffee
View file @
ba6280b3
angular
=
require
(
'angular'
)
angular
.
module
(
'h.helpers'
,
[
'bootstrap'
])
require
(
'./form-helpers'
)
require
(
'./string-helpers'
)
require
(
'./time-helpers'
)
require
(
'./ui-helpers'
)
require
(
'./xsrf-service'
)
h/static/scripts/helpers/string-helpers.coffee
View file @
ba6280b3
angular
=
require
(
'angular'
)
unorm
=
require
(
'../vendor/unorm'
)
# Shared helper methods for working with strings/unicode strings
# For unicode normalization we use the unorm library
createStringHelpers
=
->
...
...
h/static/scripts/host.coffee
View file @
ba6280b3
Annotator
=
@
Annotator
$
=
Annotator
.
$
$
=
require
(
'jquery'
)
Annotator
=
require
(
'annotator'
)
Guest
=
require
(
'./guest'
)
class
Annotator
.
Host
extends
Annotator
.
Guest
module
.
exports
=
class
Annotator
.
Host
extends
Annotator
.
Guest
# Drag state variables
drag
:
delta
:
0
...
...
h/static/scripts/session/session.coffee
View file @
ba6280b3
angular
=
require
(
'angular'
)
angular
.
module
(
'h.session'
,
[
'ngResource'
,
'h.helpers'
])
require
(
'./session-service'
)
h/static/scripts/threading-service.coffee
View file @
ba6280b3
angular
=
require
(
'angular'
)
mail
=
require
(
'./vendor/jwz'
)
class
ThreadingService
# Mix in message thread properties into the prototype. The body of the
# class will overwrite any methods applied here. If you need inheritance
...
...
h/static/scripts/vendor/.gitignore
deleted
100644 → 0
View file @
a6aec003
*.min.js
!jquery.min.js
h/static/scripts/vendor/polyfills/.gitignore
deleted
100644 → 0
View file @
a6aec003
raf.min.js
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