{"size": 952, "ext": "js", "max_stars_repo_path": "frontend/app/js/paperwork/notes/notes_all.controller.js", "max_stars_repo_name": "Type-of-Writter/paperwork", "max_stars_repo_stars_event_min_datetime": "2017-02-11T21:49:59.000Z", "max_stars_repo_stars_event_max_datetime": "2017-02-11T21:49:59.000Z", "max_issues_repo_path": "frontend/app/js/paperwork/notes/notes_all.controller.js", "max_issues_repo_name": "mheppner/paperwork", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "frontend/app/js/paperwork/notes/notes_all.controller.js", "max_forks_repo_name": "mheppner/paperwork", "max_forks_repo_forks_event_min_datetime": "2020-07-30T08:03:26.000Z", "max_forks_repo_forks_event_max_datetime": "2020-07-30T08:03:26.000Z"}
{"max_stars_count": 1, "max_issues_count": null, "max_forks_count": 1, "avg_line_length": 38.08, "max_line_length": 115, "alphanum_fraction": 0.6586134454}
angular.module('paperworkNotes').controller('NotesAllController',
  function($scope, $rootScope, $location, $routeParams, NotesService) {
    if(typeof $routeParams == "undefined" || $routeParams == {} || typeof $routeParams.notebookId == "undefined") {
      return;

       // fixme
       // $rootScope.notebookSelectedId = 0;
     } else {
       $rootScope.notebookSelectedId = ($routeParams.notebookId);
     }
     NotesService.getNotesInNotebook($rootScope.getNotebookSelectedId(), function() {
       // $rootScope.setNoteSelectedId($rootScope.getNotebookSelectedId(), $rootScope.notes[0].id);
       if($rootScope.notes.length > 0) {
         $location.path("/n/" + $scope.notebookSelectedId + "/" + $rootScope.notes[0].id);
       }
     });

    $rootScope.editMultipleNotes = false;
    $rootScope.navbarMainMenu = true;
    $rootScope.navbarSearchForm = true;
    $rootScope.expandedNoteLayout = false;

    $rootScope.note = null;
  });
