Fixes creation of codefiles in folders

This commit is contained in:
Emil Wangaa
2017-02-02 11:47:46 +01:00
parent c21837e906
commit c073191f69
5 changed files with 29 additions and 13 deletions

View File

@@ -198,12 +198,12 @@ function codefileResource($q, $http, umbDataFormatter, umbRequestHelper) {
*
*/
getScaffold: function (type, snippetName) {
getScaffold: function (type, id, snippetName) {
return umbRequestHelper.resourcePromise(
$http.get(
umbRequestHelper.getApiUrl(
"codeFileApiBaseUrl",
"GetScaffold?type=" + type + "&snippetName=" + snippetName)),
"GetScaffold?type=" + type + "&id=" + id + "&snippetName=" + snippetName)),
"Failed to get scaffold for" + type);
}

View File

@@ -236,7 +236,7 @@
snippet = $routeParams.snippet;
}
codefileResource.getScaffold("partialViewMacros", snippet).then(function (partialViewMacro) {
codefileResource.getScaffold("partialViewMacros", $routeParams.id, snippet).then(function (partialViewMacro) {
ready(partialViewMacro);
});

View File

@@ -236,7 +236,7 @@
snippet = $routeParams.snippet;
}
codefileResource.getScaffold("partialViews", snippet).then(function (partialView) {
codefileResource.getScaffold("partialViews", $routeParams.id, snippet).then(function (partialView) {
ready(partialView);
});

View File

@@ -79,7 +79,7 @@
assetsService.loadCss("lib/ace-razor-mode/theme/razor_chrome.css");
if ($routeParams.create) {
codefileResource.getScaffold("scripts").then(function(script) {
codefileResource.getScaffold("scripts", $routeParams.id).then(function (script) {
ready(script);
});
} else {