mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-07 20:31:06 -05:00
Use angular $http
service for references
This commit is contained in:
parent
e04d10d11f
commit
f74da0e6cf
1 changed files with 8 additions and 12 deletions
|
@ -44,22 +44,18 @@ define [
|
|||
docIds: docIds
|
||||
shouldBroadcast: shouldBroadcast
|
||||
_csrf: window.csrfToken
|
||||
$.post(
|
||||
@ide.$http.post(
|
||||
"/project/#{@$scope.project_id}/references/index",
|
||||
opts,
|
||||
(data) =>
|
||||
# console.log ">> got keys ", data
|
||||
@_storeReferencesKeys(data.keys)
|
||||
)
|
||||
opts
|
||||
).then (response) =>
|
||||
@_storeReferencesKeys(response.data.keys)
|
||||
|
||||
indexAllReferences: (shouldBroadcast) ->
|
||||
opts =
|
||||
shouldBroadcast: shouldBroadcast
|
||||
_csrf: window.csrfToken
|
||||
$.post(
|
||||
@ide.$http.post(
|
||||
"/project/#{@$scope.project_id}/references/indexAll",
|
||||
opts,
|
||||
(data) =>
|
||||
# console.log ">> got keys ", data
|
||||
@_storeReferencesKeys(data.keys)
|
||||
)
|
||||
opts
|
||||
).then (response) =>
|
||||
@_storeReferencesKeys(response.data.keys)
|
||||
|
|
Loading…
Reference in a new issue