Commit 0cae0c4c authored by Randall Leeds's avatar Randall Leeds

Fix more inconsistent use of baseURI

parent cfcf04d0
...@@ -9,13 +9,13 @@ class App ...@@ -9,13 +9,13 @@ class App
this.$inject = [ this.$inject = [
'$element', '$filter', '$http', '$location', '$rootScope', '$scope', '$timeout', '$element', '$filter', '$http', '$location', '$rootScope', '$scope', '$timeout',
'annotator', 'authentication', 'baseurl', 'streamfilter' 'annotator', 'authentication', 'baseURI', 'streamfilter'
] ]
constructor: ( constructor: (
$element, $filter, $http, $location, $rootScope, $scope, $timeout $element, $filter, $http, $location, $rootScope, $scope, $timeout
annotator, authentication, baseurl, streamfilter annotator, authentication, baseURI, streamfilter
) -> ) ->
$scope.baseurl = baseurl[..-('/app/'.length)] + '__streamer__' $scope.baseURI = baseURI[..-('/app/'.length)] + '__streamer__'
{plugins, host, providers} = annotator {plugins, host, providers} = annotator
...@@ -473,7 +473,7 @@ class App ...@@ -473,7 +473,7 @@ class App
.setClausesParse('uri:[' + uris) .setClausesParse('uri:[' + uris)
.getFilter() .getFilter()
$scope.updater = new SockJS($scope.baseurl) $scope.updater = new SockJS($scope.baseURI)
$scope.updater.onopen = => $scope.updater.onopen = =>
sockmsg = sockmsg =
...@@ -658,7 +658,7 @@ class Annotation ...@@ -658,7 +658,7 @@ class Annotation
# just not sure how best to do that with pyramid traversal since there # 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 # is not a pre-determined route map. One possibility would be to
# unify everything so that it's relative to the app URL. # unify everything so that it's relative to the app URL.
prefix = $scope.$parent.baseUrl.replace /\/\w+\/$/, '' prefix = $scope.$parent.baseURI.replace /\/\w+\/$/, ''
$scope.shared_link = prefix + '/a/' + $scope.model.id $scope.shared_link = prefix + '/a/' + $scope.model.id
$scope.shared = false $scope.shared = false
return return
......
...@@ -546,15 +546,10 @@ class AuthenticationProvider ...@@ -546,15 +546,10 @@ class AuthenticationProvider
@actions['claim'] = @actions['forgot'] @actions['claim'] = @actions['forgot']
$get: [ $get: [
'$document', '$resource', '$resource', 'baseURI'
($document, $resource) -> ($resource, baseURI) ->
baseUrl = $document[0].baseURI.replace(/:(\d+)/, '\\:$1') $resource(baseURI, {}, @actions).load()
]
# Strip an empty hash and end in exactly one slash
baseUrl = baseUrl.replace /#$/, ''
baseUrl = baseUrl.replace /\/*$/, '/'
$resource(baseUrl, {}, @actions).load()]
class DraftProvider class DraftProvider
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment