Yangman - delete_list_item button misses in operations form
[dlux.git] / modules / yangman-resources / src / main / resources / yangman / controllers / form / ym-output.controller.js
1 define([], function () {
2     'use strict';
3
4     angular.module('app.yangman').controller('YMOutputCtrl', YMOutputCtrl);
5
6     YMOutputCtrl.$inject = ['$scope'];
7
8     function YMOutputCtrl($scope){
9         var yangOutput = this;
10         yangOutput.notEditable = true;
11
12         // methods
13         yangOutput.isActionMenu = isActionMenu;
14         yangOutput.toggleExpanded = toggleExpanded;
15
16         /**
17          * Show hide node
18          */
19         function toggleExpanded() {
20             $scope.node.expanded = !$scope.node.expanded;
21         }
22
23         /**
24          * Show hide action menu
25          * @returns {boolean|*}
26          */
27         function isActionMenu() {
28             return $scope.node.augmentionGroups && $scope.node.augmentionGroups.length;
29         }
30     }
31 });
32
33