<commit_before>'use strict';

angular.module('angularApp.sortableApp', [
  'ngRoute',
  'xeditable',
  'ui.sortable',
  'ui.bootstrap.tpls',
  'ui.bootstrap',
  'ngStorage'
])

.config(['$routeProvider', function($routeProvider) {
  $routeProvider.when('/sortableApp', {
    templateUrl: 'sortableApp/sortableApp.html',
    controller: 'sortableAppCtrl'
  });
}])

.controller(
  'sortableAppCtrl',[
  '$scope', '$http', '$modal', '$localStorage',
  function($scope, $http, $modal, $localStorage) {

    $scope.docs = [];

    // $scope.accessLocalStorage = $localStorage.docs;

    // if ($scope.accessLocalStorage == "") {
      $http.get('sortableApp/sortableDays.json').success(function(data) {
         $scope.docs = data;
         $localStorage.docs = $scope.docs;
      });
    // }
    // else {
    //   $scope.docs = $scope.accessLocalStorage;
    // }

    $scope.sortableOptions = {
      placeholder: "app",
      connectWith: ".apps-container"
    };

    $scope.addTask = function () {
      var modalInstance = $modal.open({
        templateUrl: '/sortable-list/app/sortableApp/add-task.html',
        controller: 'addTaskCtrl',
        resolve: {
          docs: function () {
            return $scope.docs;
          }
        }
      });
    };

    $scope.dropzoneFields = [];

    $scope.draggable = {<commit_msg>adding list to localstorage<commit_after>'use strict';

angular.module('angularApp.sortableApp', [
  'ngRoute',
  'xeditable',
  'ui.sortable',
  'ui.bootstrap.tpls',
  'ui.bootstrap',
  'ngStorage'
])

.config(['$routeProvider', function($routeProvider) {
  $routeProvider.when('/sortableApp', {
    templateUrl: 'sortableApp/sortableApp.html',
    controller: 'sortableAppCtrl'
  });
}])

.controller(
  'sortableAppCtrl',[
  '$scope', '$http', '$modal', '$localStorage',
  function($scope, $http, $modal, $localStorage) {

    $scope.docs = [];

    $scope.accessLocalStorage = $localStorage.docs;

    if (!$scope.accessLocalStorage) {
      $http.get('sortableApp/sortableDays.json').success(function(data) {
         $scope.docs = data;
         $localStorage.docs = $scope.docs;
      });
    }
    else {
      $scope.docs = $scope.accessLocalStorage;
    }

    $scope.sortableOptions = {
      placeholder: "app",
      connectWith: ".apps-container"
    };

    $scope.addTask = function () {
      var modalInstance = $modal.open({
        templateUrl: '/sortable-list/app/sortableApp/add-task.html',
        controller: 'addTaskCtrl',
        resolve: {
          docs: function () {
            return $scope.docs;
          }
        }
      });
    };

    $scope.dropzoneFields = [];

    $scope.draggable = {
{'fraction_non_alphanumeric': 0.17249154453213078, 'fraction_numerical': 0.0, 'mean_word_length': 2.6972222222222224, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '1659741', 'n_tokens_mistral': 871, 'n_tokens_neox': 855, 'n_words': 123}