<commit_before>var commentservices = angular.module('crmEngine.commentservices',[]);

commentservices.factory('Comment', function($http) {

  var Comment = function(data) {
    angular.extend(this, data);
  }



  Comment.list = function($scope,params){
      console.log('in comments.list');
      console.log(params);

      $scope.isLoading = true;
      gapi.client.crmengine.comments.listv2(params).execute(function(resp) {
              if(!resp.code){
                console.log(resp);
                 $scope.comments = resp.items;



                  if ($scope.currentPagecomment>1){
                      console.log('Should show PREV');
                    $scope.paginationcomment.prev = true;
                  }else{
                      $scope.paginationcomment.prev= false;
                   }
                 if (resp.nextPageToken){
                   var nextPage = $scope.currentPagecomment + 1;
                    // Store the nextPageToken
                   $scope.pagescomment[nextPage] = resp.nextPageToken;
                   $scope.paginationcomment.next = true;

                   }else{
                  $scope.paginationcomment.next = false;
                 }
                 //Loaded succefully
                 $scope.isLoading = false;


                 // Call the method $apply to make the update on the scope

                 $scope.hilightComment();
                 $scope.$apply();
                 //$scope.hilightComment();
              }else {
                 alert("Error, response is: " + angular.toJson(resp));
              }
      });
  };

  Comment.get = function($scope,id) {
          gapi.client.crmengine.comments.get(id).execute(function(resp) {
            if(!resp.code){
               $scope.comment = resp;

               // $scope.isContentLoaded = true;
               // $scope.listTopics(resp);
               // $scope.listTasks();
               // $scope.listEvents();
               // Call the method $apply to make the update on the scope
                $scope.$apply();

            }else {
               alert("Error, response is: " + angular.toJson(resp));
            }
            console.log('gapi #end_execute');
          });
  };

Comment.insert = function($scope,params){
      $scope.isLoading = true;

      gapi.client.crmengine.comments.insertv2(params).execute(function(resp) {
          console.log(params);
          console.log(resp);
         if(!resp.code){
          // TME_02_11_13 when a note is inserted reload topics
          //$scope.listTopics();
          $scope.isLoading = false;
          $scope.$apply();
           $scope.ListComments();






         }else{
          console.log(resp.code);
         }
      });
  };


return Comment;
});<commit_msg> make isloading to false on comment services<commit_after>var commentservices = angular.module('crmEngine.commentservices',[]);

commentservices.factory('Comment', function($http) {

  var Comment = function(data) {
    angular.extend(this, data);
  }



  Comment.list = function($scope,params){
      console.log('in comments.list');
      console.log(params);

      $scope.isLoading = true;
      gapi.client.crmengine.comments.listv2(params).execute(function(resp) {
              if(!resp.code){
                console.log(resp);
                 $scope.comments = resp.items;



                  if ($scope.currentPagecomment>1){
                      console.log('Should show PREV');
                    $scope.paginationcomment.prev = true;
                  }else{
                      $scope.paginationcomment.prev= false;
                   }
                 if (resp.nextPageToken){
                   var nextPage = $scope.currentPagecomment + 1;
                    // Store the nextPageToken
                   $scope.pagescomment[nextPage] = resp.nextPageToken;
                   $scope.paginationcomment.next = true;

                   }else{
                  $scope.paginationcomment.next = false;
                 }
                 //Loaded succefully
                 $scope.isLoading = false;


                 // Call the method $apply to make the update on the scope

                 $scope.hilightComment();
                 $scope.$apply();
                 //$scope.hilightComment();
              }else {
                 alert("Error, response is: " + angular.toJson(resp));
              }
      });
  $scope.isLoading=false;
  };

  Comment.get = function($scope,id) {
          gapi.client.crmengine.comments.get(id).execute(function(resp) {
            if(!resp.code){
               $scope.comment = resp;

               // $scope.isContentLoaded = true;
               // $scope.listTopics(resp);
               // $scope.listTasks();
               // $scope.listEvents();
               // Call the method $apply to make the update on the scope
                $scope.$apply();

            }else {
               alert("Error, response is: " + angular.toJson(resp));
            }
            console.log('gapi #end_execute');
          });
  };

Comment.insert = function($scope,params){
      $scope.isLoading = true;

      gapi.client.crmengine.comments.insertv2(params).execute(function(resp) {
          console.log(params);
          console.log(resp);
         if(!resp.code){
          // TME_02_11_13 when a note is inserted reload topics
          //$scope.listTopics();
          $scope.isLoading = false;
          $scope.$apply();
           $scope.ListComments();






         }else{
          console.log(resp.code);
         }
      });
      $scope.isLoading=false;
  };


return Comment;
});
{'fraction_non_alphanumeric': 0.12457852706299911, 'fraction_numerical': 0.00354924578527063, 'mean_word_length': 1.502664298401421, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4255805', 'n_tokens_mistral': 1534, 'n_tokens_neox': 1447, 'n_words': 261}