Use ide.$http, rather than jquery

This commit is contained in:
Shane Kilkelly 2017-06-09 11:41:35 +01:00
parent 5443b92e7d
commit 56385a798b

View file

@ -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
)