<commit_before>// Place your application-specific JavaScript functions and classes here
// This file is automatically included by javascript_include_tag :defaults

$(document).ready(function() {
	$('#sidebar-left ul li').hover(function() {
		$('#sidebar-left ul li.selected').addClass('selected-leave');
		$('#sidebar-left ul li.selected').removeClass('selected');
	}, function(){
		$('#sidebar-left ul li.selected-leave').addClass('selected');
	});
});


/* textbox class on request-page */

$(document).ready(function() {
	$('textarea').click(function() {
		$(this).addClass('active');
		$(this).val('');
	});	
});

$(document).ready(function() {
	$('input[type="radio"]').click(function() {
		$('label.active').removeClass('active');
		$(this).next().addClass('active');
	});	
});

$(document).ready(function() {
  $('#item_description').focus(function() {
    $(this).text('');
    $(this).addClass('value-added');
  });

  $('form#new_item').submit(function() {
    var itemDescriptionElement = $('#item_description');
    if (!itemDescriptionElement.hasClass('value-added')) {
      itemDescriptionElement.val(' ');
    }
    return true
  });
});

//dojo.registerModulePath("sen", "../../sen");          // DEVELOPMENT ENVIRONMENT
dojo.registerModulePath("sen", "../../release/sen");    // BUILD ENVIRONMENT
dojo.require("sen.app");

dojo.ready(function() {
	sen.app.init();	
});<commit_msg>On focusout, the default text for the item description is restored<commit_after>// Place your application-specific JavaScript functions and classes here
// This file is automatically included by javascript_include_tag :defaults

$(document).ready(function() {
	$('#sidebar-left ul li').hover(function() {
		$('#sidebar-left ul li.selected').addClass('selected-leave');
		$('#sidebar-left ul li.selected').removeClass('selected');
	}, function(){
		$('#sidebar-left ul li.selected-leave').addClass('selected');
	});
});


/* textbox class on request-page */

$(document).ready(function() {
	$('textarea').click(function() {
		$(this).addClass('active');
		$(this).val('');
	});	
});

$(document).ready(function() {
	$('input[type="radio"]').click(function() {
		$('label.active').removeClass('active');
		$(this).next().addClass('active');
	});	
});

$(document).ready(function() {
  $('#item_description').focus(function() {
    itemDescriptionDefaultText = $(this).val();
    $(this).val('');
    $(this).addClass('value-added');
  });

  $('#item_description').focusout(function() {
    var itemDescription = $(this).val();

    if (itemDescription == '') {
     $(this).val(itemDescriptionDefaultText);
     $(this).removeClass('value-added');
    }
  });

  $('form#new_item').submit(function() {
    var itemDescriptionElement = $('#item_description');
    if (!itemDescriptionElement.hasClass('value-added')) {
      itemDescriptionElement.val(' ');
    }
    return true
  });
});

//dojo.registerModulePath("sen", "../../sen");          // DEVELOPMENT ENVIRONMENT
dojo.registerModulePath("sen", "../../release/sen");    // BUILD ENVIRONMENT
dojo.require("sen.app");

dojo.ready(function() {
	sen.app.init();	
});
{'fraction_non_alphanumeric': 0.22578576010262988, 'fraction_numerical': 0.0, 'mean_word_length': 4.5597147950089125, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '5981145', 'n_tokens_mistral': 949, 'n_tokens_neox': 940, 'n_words': 154}