<commit_before>steal( 'jquery/controller',
       'jquery/view/ejs',
	   'jquery/dom/form_params',
	   'jquery/controller/view',
	   'jquery/lang/observe')
	.then('jquery/ui',function($){
$.Controller('Dakuan.Controllers.Detail',
{
	init : function(){

		var self = this;

		$.route.delegate('detail', 'set', this.callback('onRouteDetailSet'));
	},

	onRouteDetailSet: function(ev, newVal){

		if(newVal){
			this.show(newVal, true);
		}
	},

	show : function(section, animate){

		this.element.children().remove();

		this.element.html(this.view('home/' + section));

		switch(section){

			case 'about':
				$('#twitterContainer').dakuan_twitter();

				break;

			case 'git':

				$('#repoContainer').dakuan_github();

				break;

			default:

				//this.element.html(this.view('home/' + section));
		}

		if(animate == true){

			this.element.show('scale', this.callback('onShowComplete'));
		}
		else{

			this.element.show();

			this.onShowComplete();
		}
	},

	onShowComplete: function(){

		$.route.attr('animate', false);

		this.element.filter('.scrollContainer').tinyscrollbar();
	},

	hide: function(){

		this.element.fadeOut(500, function(){

			$.route.removeAttr('detail');

			$.route.removeAttr('animate');

			$(document).trigger('detailHidden');
		});
	},

	'{document} hideDetail' : function(el, ev){

		this.hide();
	},

	'{document} requestDetail': function(el, ev, args){

		steal.dev.log('devils detail');

		this.show(args, $.route.attr('animate'));
	},
	
	'.jobCell click': function(el){

		$('.expanded').slideUp(500, function(){
			$('.expanded').removeClass('expanded');	
		});
		
		$('.jobContent', el).slideToggle(500, function(){
			$('.jobContent', el).addClass('expanded');
		});
	}
})
})<commit_msg>fixed job cell bug<commit_after>steal( 'jquery/controller',
       'jquery/view/ejs',
	   'jquery/dom/form_params',
	   'jquery/controller/view',
	   'jquery/lang/observe')
	.then('jquery/ui',function($){
$.Controller('Dakuan.Controllers.Detail',
{
	init : function(){

		var self = this;

		$.route.delegate('detail', 'set', this.callback('onRouteDetailSet'));
	},

	onRouteDetailSet: function(ev, newVal){

		if(newVal){
			this.show(newVal, true);
		}
	},

	show : function(section, animate){

		this.element.children().remove();

		this.element.html(this.view('home/' + section));

		switch(section){

			case 'about':
				$('#twitterContainer').dakuan_twitter();

				break;

			case 'git':

				$('#repoContainer').dakuan_github();

				break;

			default:

				//this.element.html(this.view('home/' + section));
		}

		if(animate == true){

			this.element.show('scale', this.callback('onShowComplete'));
		}
		else{

			this.element.show();

			this.onShowComplete();
		}
	},

	onShowComplete: function(){

		$.route.attr('animate', false);

		this.element.filter('.scrollContainer').tinyscrollbar();
	},

	hide: function(){

		this.element.fadeOut(500, function(){

			$.route.removeAttr('detail');

			$.route.removeAttr('animate');

			$(document).trigger('detailHidden');
		});
	},

	'{document} hideDetail' : function(el, ev){

		this.hide();
	},

	'{document} requestDetail': function(el, ev, args){

		steal.dev.log('devils detail');

		this.show(args, $.route.attr('animate'));
	},
	
	'.jobCell click': function(el){

		if(el.children('.expanded').length > 0){
			$('.expanded', el).slideUp(500, function(){
				$('.expanded').removeClass('expanded');	
			});
		}
		else{
			
			$('.expanded').slideUp(500, function(){
				$('.expanded').removeClass('expanded');	
			});
			
			$('.jobContent', el).slideToggle(500, function(){
				$('.jobContent', el).addClass('expanded');
			});	
		}
	}
})
})
{'fraction_non_alphanumeric': 0.2160680010967919, 'fraction_numerical': 0.006032355360570332, 'mean_word_length': 3.8190224570673714, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 4, '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': '3939295', 'n_tokens_mistral': 1459, 'n_tokens_neox': 1218, 'n_words': 178}