Fixes deleting partial view and script files

This commit is contained in:
Shannon
2017-03-21 18:38:54 +11:00
parent e8668f3ed4
commit dfa58183c6
3 changed files with 6 additions and 12 deletions

View File

@@ -12,10 +12,8 @@ function PartialViewMacrosDeleteController($scope, codefileResource, treeService
//mark it for deletion (used in the UI)
$scope.currentNode.loading = true;
var virtualPath = $scope.currentNode.parentId + $scope.currentNode.name;
codefileResource.deleteByPath('partialViewMacros', virtualPath)
codefileResource.deleteByPath('partialViewMacros', $scope.currentNode.id)
.then(function() {
$scope.currentNode.loading = false;
//get the root node before we remove it

View File

@@ -12,10 +12,8 @@ function PartialViewsDeleteController($scope, codefileResource, treeService, nav
//mark it for deletion (used in the UI)
$scope.currentNode.loading = true;
var virtualPath = $scope.currentNode.parentId + $scope.currentNode.name;
codefileResource.deleteByPath('partialViews', virtualPath)
codefileResource.deleteByPath('partialViews', $scope.currentNode.id)
.then(function() {
$scope.currentNode.loading = false;
//get the root node before we remove it

View File

@@ -12,10 +12,8 @@ function ScriptsDeleteController($scope, codefileResource, treeService, navigati
//mark it for deletion (used in the UI)
$scope.currentNode.loading = true;
var virtualPath = $scope.currentNode.parentId + $scope.currentNode.name;
codefileResource.deleteByPath('scripts', virtualPath)
codefileResource.deleteByPath('scripts', $scope.currentNode.id)
.then(function() {
$scope.currentNode.loading = false;
//get the root node before we remove it