Skip to content

Commit

Permalink
MET-814 one click tree-view
Browse files Browse the repository at this point in the history
in latest develop
  • Loading branch information
musketyr committed Sep 25, 2015
1 parent 42f0695 commit 6873f11
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ cetiModule.run [ '$templateCache', ($templateCache) ->
<span class="badge pull-right" ng-if="currentDescend &amp;&amp; element.$$numberOfChildren">{{element.$$numberOfChildren}}</span>
<span class="catalogue-element-treeview-labels">
<span ng-if="!element.elementType"><a class="catalogue-element-treeview-icon btn btn-link"><span class="fa fa-fw fa-ban"></span></a> No Data</span>
<a ng-if="currentDescend &amp;&amp; element.elementType" class="catalogue-element-treeview-icon btn btn-link" ng-click="collapseOrExpand(element)">
<a ng-if="currentDescend &amp;&amp; element.elementType" class="catalogue-element-treeview-icon btn btn-link" ng-click="select(element)">
<span class="fa fa-fw fa-folder" ng-if="element.$$collapsed &amp;&amp; element.$$numberOfChildren &amp;&amp; !element.$$loadingChildren"></span>
<span class="fa fa-fw fa-folder-open" ng-if="!element.$$collapsed &amp;&amp; element.$$numberOfChildren &amp;&amp; !element.$$loadingChildren"></span>
<span ng-class="element.getIcon()" ng-if="!element.$$numberOfChildren"></span>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,6 @@ angular.module('mc.core.ui.catalogueElementTreeviewItem', ['mc.util.names', 'mc.

unless $scope.element.$$children.length == 0 and $scope.element.$$numberOfChildren > 0
$scope.element.$$collapsed = false
$scope.select($scope.element)
return

$scope.element.$$loadChildren()
Expand All @@ -160,6 +159,7 @@ angular.module('mc.core.ui.catalogueElementTreeviewItem', ['mc.util.names', 'mc.

# event broadcasters and listeners
$scope.select = (element) ->
$scope.collapseOrExpand()
$rootScope.$broadcast 'treeviewElementSelected', element, $scope.rootId

$scope.$on 'treeviewElementSelected', (event, element, id) ->
Expand Down

0 comments on commit 6873f11

Please sign in to comment.