<commit_before>'use strict';

app.component("eeaFormViewmode", {
	bindings: {
		scp: '='
	},
	controller: [function() {
		var parent = this;
		this.$onInit = function() {
				$(function() {
					var ctimeout = ($('eea-form-testing').length) ? 3000 : 10;
 
					setTimeout( function() {
						$("form.eeaform").each(function(){
							$(this).find('.formitem :input').each(function(index, item){
								var valToEnter = $(item).val();
								if (!valToEnter ||  (item.type == "checkbox" && !$(item).prop("checked")))
									return;
								
								$(item).attr("readonly" , true);
								$(item).hide();

								var tb = $("<button class=\"formitemedit\"><i class=\"fa fa-pencil-square-o\"></i></button>");
								tb.inp =  $(this);
								tb.click(function(event) {
									event.preventDefault();
									$(item).show();
									$(item).attr("readonly" , false);
									$(this).hide();
									$(item).next(".formitemval").hide();
								});

								$(this).before(tb);
								
								 if (item.type === "select-one") {
									valToEnter = $(this).find(":selected").text();
								} 
																
								$(this).after("<span class=\"formitemval\">" + valToEnter + "</span>");
							});
						});
					}, ctimeout);
				});
		};
	}]
});<commit_msg>Eslinting src/Client<commit_after>'use strict';

app.component("eeaFormViewmode", {
	bindings: {
		scp: '='
	},
	controller: [function() {
		this.$onInit = function() {
			$(function() {
				var ctimeout = ($('eea-form-testing').length) ? 3000 : 10;

				setTimeout( function() {
					$("form.eeaform").each(function(){
						$(this).find('.formitem :input').each(function(index, item){
							var valToEnter = $(item).val();
							if (!valToEnter ||  (item.type == "checkbox" && !$(item).prop("checked")))
								return;
							
							$(item).attr("readonly" , true);
							$(item).hide();

							var tb = $("<button class=\"formitemedit\"><i class=\"fa fa-pencil-square-o\"></i></button>");
							tb.inp =  $(this);
							tb.click(function(event) {
								event.preventDefault();
								$(item).show();
								$(item).attr("readonly" , false);
								$(this).hide();
								$(item).next(".formitemval").hide();
							});

							$(this).before(tb);
							
							if (item.type === "select-one") {
								valToEnter = $(this).find(":selected").text();
							} 
															
							$(this).after("<span class=\"formitemval\">" + valToEnter + "</span>");
						});
					});
				}, ctimeout);
			});
		};
	}]
});
{'fraction_non_alphanumeric': 0.23273453093812374, 'fraction_numerical': 0.004790419161676647, 'mean_word_length': 2.2545454545454544, 'pattern_counts': {'":': 2, '<': 15, '<?xml version=': 0, '>': 15, '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': '6033500', 'n_tokens_mistral': 1211, 'n_tokens_neox': 796, 'n_words': 122}