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
0cae0c4c
Commit
0cae0c4c
authored
Mar 14, 2014
by
Randall Leeds
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix more inconsistent use of baseURI
parent
cfcf04d0
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
14 deletions
+9
-14
controllers.coffee
h/js/controllers.coffee
+5
-5
services.coffee
h/js/services.coffee
+4
-9
No files found.
h/js/controllers.coffee
View file @
0cae0c4c
...
...
@@ -9,13 +9,13 @@ class App
this
.
$inject
=
[
'$element'
,
'$filter'
,
'$http'
,
'$location'
,
'$rootScope'
,
'$scope'
,
'$timeout'
,
'annotator'
,
'authentication'
,
'base
url
'
,
'streamfilter'
'annotator'
,
'authentication'
,
'base
URI
'
,
'streamfilter'
]
constructor
:
(
$element
,
$filter
,
$http
,
$location
,
$rootScope
,
$scope
,
$timeout
annotator
,
authentication
,
base
url
,
streamfilter
annotator
,
authentication
,
base
URI
,
streamfilter
)
->
$scope
.
base
url
=
baseurl
[..
-
(
'/app/'
.
length
)]
+
'__streamer__'
$scope
.
base
URI
=
baseURI
[..
-
(
'/app/'
.
length
)]
+
'__streamer__'
{
plugins
,
host
,
providers
}
=
annotator
...
...
@@ -473,7 +473,7 @@ class App
.
setClausesParse
(
'uri:['
+
uris
)
.
getFilter
()
$scope
.
updater
=
new
SockJS
(
$scope
.
base
url
)
$scope
.
updater
=
new
SockJS
(
$scope
.
base
URI
)
$scope
.
updater
.
onopen
=
=>
sockmsg
=
...
...
@@ -658,7 +658,7 @@ class Annotation
# just not sure how best to do that with pyramid traversal since there
# is not a pre-determined route map. One possibility would be to
# unify everything so that it's relative to the app URL.
prefix
=
$scope
.
$parent
.
baseU
rl
.
replace
/\/\w+\/$/
,
''
prefix
=
$scope
.
$parent
.
baseU
RI
.
replace
/\/\w+\/$/
,
''
$scope
.
shared_link
=
prefix
+
'/a/'
+
$scope
.
model
.
id
$scope
.
shared
=
false
return
...
...
h/js/services.coffee
View file @
0cae0c4c
...
...
@@ -546,15 +546,10 @@ class AuthenticationProvider
@
actions
[
'claim'
]
=
@
actions
[
'forgot'
]
$get
:
[
'$document'
,
'$resource'
,
(
$document
,
$resource
)
->
baseUrl
=
$document
[
0
].
baseURI
.
replace
(
/:(\d+)/
,
'
\\
:$1'
)
# Strip an empty hash and end in exactly one slash
baseUrl
=
baseUrl
.
replace
/#$/
,
''
baseUrl
=
baseUrl
.
replace
/\/*$/
,
'/'
$resource
(
baseUrl
,
{},
@
actions
).
load
()]
'$resource'
,
'baseURI'
(
$resource
,
baseURI
)
->
$resource
(
baseURI
,
{},
@
actions
).
load
()
]
class
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