<commit_before>angular.module('palaso.ui.dc.multioptionlist', [])
  // Palaso UI Optionlist
  .directive('dcMultioptionlist', [function() {
		return {
			restrict : 'E',
			templateUrl : '/angular-app/languageforge/lexicon/directive/dc-multioptionlist.html',
			scope : {
				config : "=",
				model : "=",
				control: "=",
                items: "="
			},
			controller: ['$scope', function($scope) {
				$scope.getDisplayName = function(value) {
                    var displayName = value;
                    for (var i=0; i< $scope.items.length; i++) {
                        if ($scope.items[i].key == value) {
                            displayName = $scope.items[i].value;
                            break;
                        }
                    }
					return displayName;
				};
				
				$scope.addValue = function() {
					if (angular.isDefined($scope.newValue)) {
						$scope.model.values.push($scope.newValue);
					}
				};

			}],
			link : function(scope, element, attrs, controller) {
			}
		};
  }])
  ;<commit_msg>fix accessing item when undefined, reformat to style guides<commit_after>'use strict';

angular.module('palaso.ui.dc.multioptionlist', [])

// Palaso UI Optionlist
.directive('dcMultioptionlist', [function() {
  return {
    restrict: 'E',
    templateUrl: '/angular-app/languageforge/lexicon/directive/dc-multioptionlist.html',
    scope: {
      config: "=",
      model: "=",
      control: "=",
      items: "="
    },
    controller: ['$scope', function($scope) {
      $scope.getDisplayName = function getDisplayName(value) {
        var displayName = value;
        if (angular.isDefined($scope.items)) {
          for (var i = 0; i < $scope.items.length; i++) {
            if ($scope.items[i].key == value) {
              displayName = $scope.items[i].value;
              break;
            }
          }
        }
        return displayName;
      };

      $scope.addValue = function addValue() {
        if (angular.isDefined($scope.newValue)) {
          $scope.model.values.push($scope.newValue);
        }
      };

    }],
    link: function(scope, element, attrs, controller) {
    }
  };
}]);
{'fraction_non_alphanumeric': 0.1553803339517625, 'fraction_numerical': 0.0009276437847866419, 'mean_word_length': 1.9467213114754098, 'pattern_counts': {'":': 0, '<': 5, '<?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': '982894', 'n_tokens_mistral': 727, 'n_tokens_neox': 655, 'n_words': 111}