Fixes deleting partial view and script files
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user