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:
Shannon
2013-10-14 15:36:17 +11:00
parent d41188598a
commit df25edfaf6
9 changed files with 109 additions and 186 deletions

View File

@@ -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);
}

View File

@@ -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...

View File

@@ -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">