|
2 | 2 | function ($q, $http, umbRequestHelper) {
|
3 | 3 | return {
|
4 | 4 | getContentTypeAliasByGuid: function (guid) {
|
5 |
| - var url = umbRequestHelper.convertVirtualToAbsolutePath("~/umbraco/backoffice/DocTypeGridEditorApi/DocTypeGridEditorApi/GetContentTypeAliasByGuid?guid=" + guid); |
| 5 | + var url = Umbraco.Sys.ServerVariables.umbracoSettings.umbracoPath + "/backoffice/DocTypeGridEditorApi/DocTypeGridEditorApi/GetContentTypeAliasByGuid?guid=" + guid; |
6 | 6 | return umbRequestHelper.resourcePromise(
|
7 | 7 | $http.get(url),
|
8 | 8 | 'Failed to retrieve content type alias by guid'
|
9 | 9 | );
|
10 | 10 | },
|
11 | 11 | getContentTypes: function (allowedContentTypes) {
|
12 |
| - var url = umbRequestHelper.convertVirtualToAbsolutePath("~/umbraco/backoffice/DocTypeGridEditorApi/DocTypeGridEditorApi/GetContentTypes"); |
| 12 | + var url = Umbraco.Sys.ServerVariables.umbracoSettings.umbracoPath + "/backoffice/DocTypeGridEditorApi/DocTypeGridEditorApi/GetContentTypes"; |
13 | 13 | if (allowedContentTypes) {
|
14 | 14 | for (var i = 0; i < allowedContentTypes.length; i++) {
|
15 | 15 | url += (i == 0 ? "?" : "&") + "allowedContentTypes=" + allowedContentTypes[i];
|
|
21 | 21 | );
|
22 | 22 | },
|
23 | 23 | getContentType: function (contentTypeAlias) {
|
24 |
| - var url = umbRequestHelper.convertVirtualToAbsolutePath("~/umbraco/backoffice/DocTypeGridEditorApi/DocTypeGridEditorApi/GetContentType?contentTypeAlias=" + contentTypeAlias); |
| 24 | + var url = Umbraco.Sys.ServerVariables.umbracoSettings.umbracoPath + "/backoffice/DocTypeGridEditorApi/DocTypeGridEditorApi/GetContentType?contentTypeAlias=" + contentTypeAlias; |
25 | 25 | return umbRequestHelper.resourcePromise(
|
26 | 26 | $http.get(url),
|
27 | 27 | 'Failed to retrieve content type icon'
|
28 | 28 | );
|
29 | 29 | },
|
30 | 30 | getDataTypePreValues: function (dtdId) {
|
31 |
| - var url = umbRequestHelper.convertVirtualToAbsolutePath("~/umbraco/backoffice/DocTypeGridEditorApi/DocTypeGridEditorApi/GetDataTypePreValues?dtdid=" + dtdId); |
| 31 | + var url = Umbraco.Sys.ServerVariables.umbracoSettings.umbracoPath + "/backoffice/DocTypeGridEditorApi/DocTypeGridEditorApi/GetDataTypePreValues?dtdid=" + dtdId; |
32 | 32 | return umbRequestHelper.resourcePromise(
|
33 | 33 | $http.get(url),
|
34 | 34 | 'Failed to retrieve datatypes'
|
35 | 35 | );
|
36 | 36 | },
|
37 | 37 | getEditorMarkupForDocTypePartial: function (pageId, id, editorAlias, contentTypeAlias, value, viewPath, previewViewPath, published) {
|
38 |
| - var url = umbRequestHelper.convertVirtualToAbsolutePath("~/umbraco/backoffice/DocTypeGridEditorApi/DocTypeGridEditorApi/GetPreviewMarkup?dtgePreview=1&pageId=" + pageId); |
| 38 | + var url = Umbraco.Sys.ServerVariables.umbracoSettings.umbracoPath + "/backoffice/DocTypeGridEditorApi/DocTypeGridEditorApi/GetPreviewMarkup?dtgePreview=1&pageId=" + pageId; |
39 | 39 | return $http({
|
40 | 40 | method: 'POST',
|
41 | 41 | url: url,
|
|
0 commit comments