-hide info box when all items has been deleted
Change-Id: If5b06a6f87c91f3540d995fab3eb675c146636c8
Signed-off-by: michal.kovacik <mikovaci@cisco.com>
// $scope.preview();
yangList.currentDisplayIndex =
Math.max(Math.min(yangList.currentDisplayIndex, $scope.node.listData.length - 2), 1);
+ if ($scope.node.listData.length === 0) {
+ $scope.$broadcast('hideInfoBox');
+ }
}
// TODO :: do method description
function hideInfoBox(){
$scope.infoBox = false;
}
+
+ $scope.$on('hideInfoBox', function () {
+ hideInfoBox();
+ });
},
link: function (scope, element, attrs) {
scope.isActive = false;