<commit_before><style type="text/css">
	.selected {
		border: 3px solid black;
	}

	#tag-detail-panel {
		display: none;
	}

</style>

<script>
$(document).ready( function() {
	var detailPnl = $("#tag-detail-panel");
	var tagID = 0;

	// Handeling color buttons
	$('.colorpicker').click(function()
	{
		$("#color").val($(this).attr("class").split(' ')[1]);
		$(this).removeClass("selected");
		$(this).addClass("selected");
	});

	// Handeling tag buttons
	$('.tag').click(function()
	{
		// Gathering informations
		tagID = this.id.replace('tag', '');
		$.ajax({
		  url: "<%= APP_PATH %>/tag/info/?id=" + tagID
		})
		  .success(function(response) {
		  	// Displaying all checked item with this tag
		  	$('#items_table').html("");
		  	$('#tag-detail').html("");
			response = $.parseJSON(response);
			// Title
			$('#tag-detail').html("<span class='label "+response[0].color+"'>" + response[0].tag + "</span>"); 
			// Table of items
			$.each(response, function(i, item) {
				$('<tr>').html("<td>" + item.code + "</td><td>" + item.name + "</td><td>" + item.description + "</td><td><div class='code'></div></td>").appendTo('#items_table');
				$('.code').barcode(item.code, "code39", {barHeight: 30}); 
				
			});	

			// Export Link
			$('#exportToCSV').attr("href", "<%= APP_PATH %>/tag/csv/?id=" + tagID);
			// Pdf Link
			$('#editSheet').attr("href", "<%= APP_PATH %>/tag/pdf/?id=" + tagID);
		}) 	
	 	detailPnl.show();
	});

	// Handeling 'delete' button
	// @TODO : put a better confirm box than a gray awfull javascript one :)
	$('.deleteTag').click(function()
	{<commit_msg>displaying barcode on list by tag<commit_after><style type="text/css">
	.selected {
		border: 3px solid black;
	}

	#tag-detail-panel {
		display: none;
	}

</style>

<script>
$(document).ready( function() {
	var detailPnl = $("#tag-detail-panel");
	var tagID = 0;

	// Handeling color buttons
	$('.colorpicker').click(function()
	{
		$("#color").val($(this).attr("class").split(' ')[1]);
		$(this).removeClass("selected");
		$(this).addClass("selected");
	});

	// Handeling pdf generation button
	$('#editSheet').click(function()
	{
		alert(detailPnl.html());
	});

	// Handeling tag buttons
	$('.tag').click(function()
	{
		// Gathering informations
		tagID = this.id.replace('tag', '');
		$.ajax({
		  url: "<%= APP_PATH %>/tag/info/?id=" + tagID
		})
		  .success(function(response) {
		  	// Displaying all checked item with this tag
		  	$('#items_table').html("");
		  	$('#tag-detail').html("");
			response = $.parseJSON(response);
			// Title
			$('#tag-detail').html("<span class='label "+response[0].color+"'>" + response[0].tag + "</span>"); 
			// Table of items
			$.each(response, function(i, item) {
				$('<tr>').html("<td>" + item.code + "</td><td>" + item.name + "</td><td>" + item.description + "</td><td><div id='code" + item.code+"'></div></td>").appendTo('#items_table');
				$('#code' + item.code).barcode(item.code, "code39", {barHeight: 30}); 
			});	

			// Export Link
			$('#exportToCSV').attr("href", "<%= APP_PATH %>/tag/csv/?id=" + tagID);
			// Pdf Link
			//$('#editSheet').attr("href", "<%= APP_PATH %>/tag/pdf/?id=" + tagID);
		}) 	
	 	detailPnl.show();
	});

	// Handeling 'delete' button
	// @TODO : put a better confirm box than a gray awfull javascript one :)
	$('.deleteTag').click(function()
	{
{'fraction_non_alphanumeric': 0.25262841694202465, 'fraction_numerical': 0.0054070291378792434, 'mean_word_length': 3.5994475138121547, 'pattern_counts': {'":': 0, '<': 41, '<?xml version=': 0, '>': 41, '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': '4068111', 'n_tokens_mistral': 1294, 'n_tokens_neox': 1163, 'n_words': 225}