Fixes: U4-2928 Packages tree shows context menu for items that shouldn't have one + other issues with legacy trees and menus
This commit is contained in:
@@ -10,8 +10,8 @@ function legacyResource($q, $http, umbRequestHelper) {
|
||||
/** Loads in the data to display the section list */
|
||||
deleteItem: function (args) {
|
||||
|
||||
if (!args.nodeId || !args.nodeType) {
|
||||
throw "The args parameter is not formatted correct, it requires properties: nodeId, nodeType";
|
||||
if (!args.nodeId || !args.nodeType || !args.alias) {
|
||||
throw "The args parameter is not formatted correct, it requires properties: nodeId, nodeType, alias";
|
||||
}
|
||||
|
||||
return umbRequestHelper.resourcePromise(
|
||||
@@ -19,7 +19,7 @@ function legacyResource($q, $http, umbRequestHelper) {
|
||||
umbRequestHelper.getApiUrl(
|
||||
"legacyApiBaseUrl",
|
||||
"DeleteLegacyItem",
|
||||
[{ nodeId: args.nodeId }, { nodeType: args.nodeType }])),
|
||||
[{ nodeId: args.nodeId }, { nodeType: args.nodeType }, { alias: args.alias }])),
|
||||
'Failed to delete item ' + args.nodeId);
|
||||
|
||||
}
|
||||
|
||||
@@ -15,7 +15,8 @@ function LegacyDeleteController($scope, legacyResource, treeService, navigationS
|
||||
|
||||
legacyResource.deleteItem({
|
||||
nodeId: $scope.currentNode.id,
|
||||
nodeType: $scope.currentNode.nodetype
|
||||
nodeType: $scope.currentNode.nodetype,
|
||||
alias: $scope.currentNode.name,
|
||||
}).then(function () {
|
||||
$scope.currentNode.loading = false;
|
||||
//TODO: Need to sync tree, etc...
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
ng-show="loaded"
|
||||
ng-submit="save()"
|
||||
val-form-manager>
|
||||
<umb-panel>
|
||||
<umb-panel>
|
||||
<umb-header tabs="content.tabs">
|
||||
|
||||
<div class="span4">
|
||||
|
||||
Reference in New Issue
Block a user