<commit_before>{* Objets > Contenants > Rechercher > *}
<!-- Liste des containers pour affichage -->
<script>
$(document).ready(function () {
	var gestion = "{$droits.gestion}";
	var dataOrder = [0, 'asc'];
	if (gestion == 1) {
		dataOrder = [1, 'asc'];
	}
	var table = $("#containerList").DataTable();
	table.order(dataOrder).draw();

	$(".checkContainerSelect").change( function() {
		$('.checkContainer').prop('checked', this.checked);
		var libelle="{t}Tout cocher{/t}";
		if (this.checked) {
			libelle = "{t}Tout décocher{/t}";
		}
		$("#lcheckContainer").text(libelle);
	});

	$("#containerSpinner").hide();
	$('#containercsvfile').on('keypress click',function() {
		$(this.form).find("input[name='module']").val("containerExportCSV");
		$(this.form).prop('target', '_self').submit();
	});
	$("#containerlabels").on('click keypress', function() {
		$(this.form).find("input[name='module']").val("containerPrintLabel");
		/*$("#containerSpinner").show();*/
		$(this.form).prop('target', '_blank').submit();
	});
	$("#containerdirect").on('keypress click', function() {
		$(this.form).find("input[name='module']").val("containerPrintDirect");
		$("#containerSpinner").show();
		$(this.form).prop('target', '_self').submit();
	});
	$("#containerExport").on("keypress click", function () {
		$(this.form).find("input[name='module']").val("containerExportGlobal");
	});
	$("#checkedButtonContainer").on ("keypress click", function(event) {
		var action = $("#checkedActionContainer").val();
		if (action.length > 0) {
			var conf = confirm("{t}Attention : l'opération est définitive. Est-ce bien ce que vous voulez faire ?{/t}");
			if ( conf  == true) {
				console.log (action);
				$(this.form).find("input[name='module']").val(action);
				$(this.form).prop('target', '_self').submit();
			} else {
				event.preventDefault();
			}
		} else {
			event.preventDefault();
		}
	});
	$("#checkedActionContainer").change(function () {
		var action = $(this).val();
		if (action == "containersLending") {
			$(".borrowing").show();
			$(".trashedgroup").hide();
			$(".entry").hide();
		} else if (action == "containersSetTrashed") {
			$(".borrowing").hide();
			$(".trashedgroup").show();
			$(".entry").hide();
		} else if (action == "containersEntry") {
			$(".borrowing").hide();
			$(".trashedgroup").hide();
			$(".entry").show();
		} else {
			$(".borrowing").hide();
			$(".trashedgroup").hide();
			$(".entry").hide();
		}
	});
	var tooltipContent ;
	/**
	 * Display the grid of a container
	 */
	var delay=1000, timer;
	$(".container").mouseenter( function () {
		var objet = $(this);
		timer = setTimeout(function () {
			var uid = objet.data("uid");
			if (! objet.is(':ui-tooltip') ) {
				if (uid > 0) {
					var url = "index.php";
					var data = { "module":"containerGetOccupation", "uid": uid };
					$.ajax ( { url:url, data: data})
					.done (function( d ) {
						if (d ) {
							d = JSON.parse(d);
							if (!d.error_code) {
								/* Create the grid */
								var lineNumber = parseInt(d.lineNumber);
								var columnNumber = parseInt(d.columnNumber);
								var lines = d.lines;
								var firstLine = d.firstLine;
								var firstColumn = d.firstColumn;
								var ln = 1;
								var incr = 1;
								var cl = 1;
								var clIncr = 1;
								if (firstLine != "T") {
									ln = lineNumber;
									incr = -1;
								}
								if (firstColumn != "L") {
									cl = columnNumber;
									clIncr = -1;
								}
								var content = '<table class="table table-bordered"><tr><th class="center">{t}Ligne/colonne{/t}</th>';
								for (var col = 1 ; col <= columnNumber; col ++) {
									content += '<th class="center">'+ cl + '</th>';
									cl = cl + clIncr;
								}
								content += '</tr>';
								var nb = 0;
								lines.forEach(function(line) {
									content += '<tr><td class="center"><b>'+ ln + '</b></td>';
                					ln = ln + incr;
									nb = 0;
									line.forEach(function (cell) {
										content += '<td class="center">';
										if (cell.length > 5) {
											content += cell.length + " {t}objets{/t}";
										} else {
											cell.forEach(function (item) {<commit_msg>:fix container: correction de l'affichage des containers au survol<commit_after>{* Objets > Contenants > Rechercher > *}
<!-- Liste des containers pour affichage -->
<script>
$(document).ready(function () {
	var gestion = "{$droits.gestion}";
	var dataOrder = [0, 'asc'];
	if (gestion == 1) {
		dataOrder = [1, 'asc'];
	}
	var table = $("#containerList").DataTable();
	table.order(dataOrder).draw();

	$(".checkContainerSelect").change( function() {
		$('.checkContainer').prop('checked', this.checked);
		var libelle="{t}Tout cocher{/t}";
		if (this.checked) {
			libelle = "{t}Tout décocher{/t}";
		}
		$("#lcheckContainer").text(libelle);
	});

	$("#containerSpinner").hide();
	$('#containercsvfile').on('keypress click',function() {
		$(this.form).find("input[name='module']").val("containerExportCSV");
		$(this.form).prop('target', '_self').submit();
	});
	$("#containerlabels").on('click keypress', function() {
		$(this.form).find("input[name='module']").val("containerPrintLabel");
		/*$("#containerSpinner").show();*/
		$(this.form).prop('target', '_blank').submit();
	});
	$("#containerdirect").on('keypress click', function() {
		$(this.form).find("input[name='module']").val("containerPrintDirect");
		$("#containerSpinner").show();
		$(this.form).prop('target', '_self').submit();
	});
	$("#containerExport").on("keypress click", function () {
		$(this.form).find("input[name='module']").val("containerExportGlobal");
	});
	$("#checkedButtonContainer").on ("keypress click", function(event) {
		var action = $("#checkedActionContainer").val();
		if (action.length > 0) {
			var conf = confirm("{t}Attention : l'opération est définitive. Est-ce bien ce que vous voulez faire ?{/t}");
			if ( conf  == true) {
				console.log (action);
				$(this.form).find("input[name='module']").val(action);
				$(this.form).prop('target', '_self').submit();
			} else {
				event.preventDefault();
			}
		} else {
			event.preventDefault();
		}
	});
	$("#checkedActionContainer").change(function () {
		var action = $(this).val();
		if (action == "containersLending") {
			$(".borrowing").show();
			$(".trashedgroup").hide();
			$(".entry").hide();
		} else if (action == "containersSetTrashed") {
			$(".borrowing").hide();
			$(".trashedgroup").show();
			$(".entry").hide();
		} else if (action == "containersEntry") {
			$(".borrowing").hide();
			$(".trashedgroup").hide();
			$(".entry").show();
		} else {
			$(".borrowing").hide();
			$(".trashedgroup").hide();
			$(".entry").hide();
		}
	});
	var tooltipContent ;
	/**
	 * Display the grid of a container
	 */
	var delay=1000, timer;
	$(".container").mouseenter( function () {
		var objet = $(this);
		timer = setTimeout(function () {
			var uid = objet.data("uid");
			if (! objet.is(':ui-tooltip') ) {
				if (uid > 0) {
					var url = "index.php";
					var data = { "module":"containerGetOccupation", "uid": uid };
					$.ajax ( { url:url, data: data})
					.done (function( d ) {
						if (d ) {
							d = JSON.parse(d);
							if (!d.error_code) {
								/* Create the grid */
								var lineNumber = parseInt(d.lineNumber);
								var columnNumber = parseInt(d.columnNumber);
								var lines = d.lines;
								var firstLine = d.firstLine;
								var firstColumn = d.firstColumn;
								var ln = 1;
								var incr = 1;
								var cl = 1;
								var clIncr = 1;
								if (firstLine != "T") {
									ln = lineNumber;
									incr = -1;
								}
								if (firstColumn != "L") {
									cl = columnNumber;
									clIncr = -1;
								}
								var content = '<table class="table table-bordered"><tr><th class="center">{t}Ligne/colonne{/t}</th>';
								for (var col = 1 ; col <= columnNumber; col ++) {
									content += '<th class="center">'+ cl + '</th>';
									cl = cl + clIncr;
								}
								content += '</tr>';
								var nb = 0;
								lines.forEach(function(line) {
									content += '<tr><td class="center"><b>'+ ln + '</b></td>';
                					ln = ln + incr;
									line.forEach(function (cell) {
										nb = 0;
										content += '<td class="center">';
										if (cell.length > 5) {
											content += cell.length + " {t}objets{/t}";
										} else {
											cell.forEach(function (item) {
{'fraction_non_alphanumeric': 0.22260600285850404, 'fraction_numerical': 0.004525964745116722, 'mean_word_length': 2.9720908230842005, 'pattern_counts': {'":': 4, '<': 35, '<?xml version=': 0, '>': 45, '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': '2644756', 'n_tokens_mistral': 3508, 'n_tokens_neox': 2736, 'n_words': 550}