$scope.comment = function(row) {
var commentModal = $uibModal.open({
animation: false,
templateUrl: 'app/views/checklist/cl.comment.modal.html',
controller: 'clCommentModalController',
backdrop: 'static',
size: 'lg',
resolve: {
entityTO: function() {
return row.entity;
},
entityType: function() {
return $rootScope.shareConstants.CHECKLIST;
}
}
});
commentModal.result.then(function(result) {
if (result == 'refresh') {
$scope.init();
}
});
};
$scope.close = function() { //delete all comments if($scope.gridOptions.data.length==0&&$scope.isEmpty[0]!=0){ $uibModalInstance.close('refresh'); } if ($scope.isEmpty[0] == 0&&$scope.gridOptions.data.length!=0){ $uibModalInstance.close('refresh'); }else{ $uibModalInstance.close(); } };