<commit_before>/*
* @Author: <NAME>
* @Date:   2017-03-27 16:26:49
* @Last Modified by:   <NAME>
* @Last Modified time: 2018-07-08 17:24:00
*/
var index = 1;
jQuery(document).ready(function()
{	
	$('.category-select').material_select();

	$(".category-select").change(function()
	{ 
		if (!$(this).val()) return;

		$(this).parents('.category-field').removeClass('error');

		// if only single option, removing all others options laready selected
		if ($(this).data('single-option'))
		{
			$(this).closest('.category-field').find('> .option-field:visible').each(function() { removeOptionField($(this)); });
		}
		
		var optionField = $('#option-field-' + $(this).val());
		optionField.stop(true,false).slideDown({ duration: 350, easing: "easeOutQuart", queue: false, complete: function() {$(this).css('height', '');}});
		optionField.attr('data-index', index);
		optionField.css('-webkit-box-ordinal-group', index);
		optionField.css('-moz-box-ordinal-group', index);
		optionField.css('-ms-flex-order', index);
		optionField.css('-webkit-order', index);
		optionField.css('order', index);

		checkForSelectLabel(optionField, 1);
		index++;
	});

	$('.option-field-delete').click(function()
	{
		removeOptionField($('#option-field-' + $(this).attr('data-id')));
	});

	function removeOptionField(optionFieldToRemove)
	{
		if (optionFieldToRemove.hasClass('inline')) 
			optionFieldToRemove.hide();<commit_msg>Element form open automatically mandatory sub select<commit_after>/*
* @Author: <NAME>
* @Date:   2017-03-27 16:26:49
* @Last Modified by:   <NAME>
* @Last Modified time: 2018-07-08 17:24:00
*/
var index = 1;
jQuery(document).ready(function()
{	
	$('.category-select').material_select();

	$(".category-select").change(function()
	{ 
		if (!$(this).val()) return;

		$(this).parents('.category-field').removeClass('error');

		// if only single option, removing all others options laready selected
		if ($(this).data('single-option'))
		{
			$(this).closest('.category-field').find('> .option-field:visible').each(function() { removeOptionField($(this)); });
		}
		
		var optionField = $('#option-field-' + $(this).val());
		optionField.stop(true,false).slideDown({ duration: 350, easing: "easeOutQuart", queue: false, complete: function() {$(this).css('height', '');}});
		optionField.attr('data-index', index);
		optionField.css('-webkit-box-ordinal-group', index);
		optionField.css('-moz-box-ordinal-group', index);
		optionField.css('-ms-flex-order', index);
		optionField.css('-webkit-order', index);
		optionField.css('order', index);

		checkForSelectLabel(optionField, 1);
		index++;

		// open automatically mandatory sub select
		var firstMandatorySubSelect = optionField.find('.category-field.mandatory .select-dropdown')[0];
		if (firstMandatorySubSelect) setTimeout(function() { firstMandatorySubSelect.click(); }, 350);
	});

	$('.option-field-delete').click(function()
	{
		removeOptionField($('#option-field-' + $(this).attr('data-id')));
	});

	function removeOptionField(optionFieldToRemove)
	{
		if (optionFieldToRemove.hasClass('inline')) 
			optionFieldToRemove.hide();
{'fraction_non_alphanumeric': 0.2076749435665914, 'fraction_numerical': 0.022573363431151242, 'mean_word_length': 5.216432865731463, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 9, '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': '4824793', 'n_tokens_mistral': 1125, 'n_tokens_neox': 994, 'n_words': 173}