<commit_before>'use strict';

angular.module('mage').directive('propertyView', function ($http, $compile) {

  var getTemplateUrl = function(field) {
      var type = field.type;
      var templateUrl = '';

      switch(type) {
        case 'textfield':
          templateUrl = 'js/app/partials/property/textfield.html';
          break;
        case 'email':
          templateUrl = 'js/app/partials/property/email.html';
          break;
        case 'textarea':
          templateUrl = 'js/app/partials/property/textarea.html';
          break;
        case 'checkbox':
          templateUrl = 'js/app/partials/property/checkbox.html';
          break;
        case 'date':
          templateUrl = 'js/app/partials/property/date.html';
          break;
        case 'geometry':
          templateUrl = 'js/app/partials/property/geometry.html';
          break;
        case 'dropdown':
          templateUrl = 'js/app/partials/property/dropdown.html';
          break;
        case 'hidden':
          templateUrl = 'js/app/partials/property/hidden.html';
          break;
        case 'p***REMOVED***word':
          templateUrl = 'js/app/partials/property/p***REMOVED***word.html';
          break;
        case 'radio':
          templateUrl = 'js/app/partials/property/radio.html';
          break;
      }

      return templateUrl;
  }

  return {
    template: '<div></div>',
    restrict: 'E',
    scope: {
      field:'='
    },
    link: function(scope, element) {
      // GET template content from path
      var templateUrl = getTemplateUrl(scope.field);
      $http.get(templateUrl).success(function(data) {
        element.html(data);
        $compile(element.contents())(scope);
      });
    }
  };
});
<commit_msg> Merge branch 'develop' into 'master'<commit_after>'use strict';

angular.module('mage').directive('propertyView', function ($http, $compile) {

  return {
    template: '<div ng-include="templateUrl"></div>',
    restrict: 'E',
    scope: {
      field:'='
    },
    link: function(scope, element, attrs) {
       scope.$watch("field", function(field) {
         switch(field.type) {
           case 'textfield':
             scope.templateUrl = 'js/app/partials/property/textfield.html';
             break;
           case 'email':
             scope.templateUrl = 'js/app/partials/property/email.html';
             break;
           case 'textarea':
             scope.templateUrl = 'js/app/partials/property/textarea.html';
             break;
           case 'checkbox':
             scope.templateUrl = 'js/app/partials/property/checkbox.html';
             break;
           case 'date':
             scope.templateUrl = 'js/app/partials/property/date.html';
             break;
           case 'geometry':
             scope.templateUrl = 'js/app/partials/property/geometry.html';
             break;
           case 'dropdown':
             scope.templateUrl = 'js/app/partials/property/dropdown.html';
             break;
           case 'hidden':
             scope.templateUrl = 'js/app/partials/property/hidden.html';
             break;
           case 'p***REMOVED***word':
             scope.templateUrl = 'js/app/partials/property/p***REMOVED***word.html';
             break;
           case 'radio':
             scope.templateUrl = 'js/app/partials/property/radio.html';
             break;
         }
       });
     }
  };
});

{'fraction_non_alphanumeric': 0.14138134592680046, 'fraction_numerical': 0.0, 'mean_word_length': 1.8818027210884354, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, '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': '7481241', 'n_tokens_mistral': 966, 'n_tokens_neox': 959, 'n_words': 164}