mirror of
https://github.com/overleaf/overleaf.git
synced 2025-04-08 21:00:45 +00:00
Use ide.$http, rather than jquery
This commit is contained in:
parent
5443b92e7d
commit
56385a798b
1 changed files with 6 additions and 8 deletions
|
@ -27,18 +27,16 @@ define [
|
|||
|
||||
## Loaders
|
||||
loadProjectLabelsFromServer: () ->
|
||||
$.get(
|
||||
"/project/#{window.project_id}/labels"
|
||||
, (data) =>
|
||||
@ide.$http
|
||||
.get("/project/#{window.project_id}/labels")
|
||||
.success (data) =>
|
||||
if data.projectLabels
|
||||
for docId, docLabels of data.projectLabels
|
||||
@_state.documents[docId] = docLabels
|
||||
)
|
||||
|
||||
loadDocLabelsFromServer: (docId) ->
|
||||
$.get(
|
||||
"/project/#{window.project_id}/#{docId}/labels"
|
||||
, (data) =>
|
||||
@ide.$http
|
||||
.get("/project/#{window.project_id}/#{docId}/labels")
|
||||
.success (data) =>
|
||||
if data.docId and data.labels
|
||||
@_state.documents[data.docId] = data.labels
|
||||
)
|
||||
|
|
Loading…
Add table
Reference in a new issue