Merge pull request #577 from abjerner/patch-4

Moved the right click action for the tree header
This commit is contained in:
Shannon Deminick
2014-12-09 16:06:56 +11:00

View File

@@ -29,10 +29,10 @@ function umbTreeDirective($compile, $log, $q, $rootScope, treeService, notificat
//var showheader = (attrs.showheader !== 'false');
var hideoptions = (attrs.hideoptions === 'true') ? "hide-options" : "";
var template = '<ul class="umb-tree ' + hideoptions + '"><li class="root">';
template += '<div ng-hide="hideheader">' +
template += '<div ng-hide="hideheader" on-right-click="altSelect(tree.root, $event)">' +
'<h5>' +
'<i ng-if="enablecheckboxes == \'true\'" ng-class="selectEnabledNodeClass(tree.root)"></i>' +
'<a href="#/{{section}}" ng-click="select(tree.root, $event)" on-right-click="altSelect(tree.root, $event)" class="root-link">{{tree.name}}</a></h5>' +
'<a href="#/{{section}}" ng-click="select(tree.root, $event)" class="root-link">{{tree.name}}</a></h5>' +
'<a href class="umb-options" ng-hide="tree.root.isContainer || !tree.root.menuUrl" ng-click="options(tree.root, $event)" ng-swipe-right="options(tree.root, $event)"><i></i><i></i><i></i></a>' +
'</div>';
template += '<ul>' +