<commit_before>$("#event-creator-initiate").click(function(){
	document.getElementById("event-creator-initiate").style.display = "none";
	$("#event-creator").append( "<input type='text' name='date' id='newDate' placeholder='DD/MM' maxlength='5' autocomplete='off' >");
	document.getElementById("newDate").focus();
	
	$("#event-creator").append( "<button id='reject'>X</button>");
	$("#event-creator").append( "<button id='confirm'>Y</button>");
});

$("#reject").click(function(){
	alert("lol");
	// $('#newDate').remove();
// 	$('#reject').remove();
// 	$('#confirm').remove();
// 	document.getElementById("event-creator-initiate").style.display = "block";
});

$("#confirm").click(function(){
	var temp = addEvent(this, "event-window");

	$.ajax({
		type: 'POST',
		url: 'db/dbAjax.php',
		data: 'action=addSitting&date=' + temp,
		success: function(data){
			// If you want, alert whatever your PHP script outputs
		}
	});
});


            	
function addEvent (el, cls) {
    while ((el = el.parentElement) && !el.classList.contains(cls));
    el.style.display = "none";
    return el.id;
}<commit_msg>Update add event<commit_after>$("#event-creator-initiate").click(function(){
	document.getElementById("event-creator-initiate").style.display = "none";
	$("#event-creator").append( "<input type='text' name='date' id='newDate' placeholder='DD/MM' maxlength='5' autocomplete='off' >");
	document.getElementById("newDate").focus();
	
	$("#event-creator").append( "<button id='reject'>X</button>");
	$("#event-creator").append( "<button id='confirm'>Y</button>");
	
	$("#reject").click(function(){
		$('#newDate').remove();
		$('#reject').remove();
		$('#confirm').remove();
		document.getElementById("event-creator-initiate").style.display = "block";
	});

	$("#confirm").click(function(){

		$.ajax({
			type: 'POST',
			url: 'db/dbAjax.php',
			data: 'action=addSitting&date=' + temp,
			success: function(data){
				// If you want, alert whatever your PHP script outputs
			}
		});
	});
});
{'fraction_non_alphanumeric': 0.24549098196392785, 'fraction_numerical': 0.001002004008016032, 'mean_word_length': 5.16358024691358, 'pattern_counts': {'":': 0, '<': 13, '<?xml version=': 0, '>': 13, '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': '3984971', 'n_tokens_mistral': 673, 'n_tokens_neox': 649, 'n_words': 107}