<commit_before>Directory.View = function(){}

Directory.View.prototype = {
	functionCollection: {
		1: function(){
			alert('yo waddup')
		},

		2: function(data) {
			this.clearDom();
			var currentFolder = data.master
			this.appendCurrentFolder(currentFolder)
			data.branches.forEach(function(folder){
				$('#directory-template').append("<li><img class='folder-icon' src='images/folder.png'><span class='folder-text'>" + folder + "</span></li>")
			});
		},

		clearDom: function(){
			$('#directory-template li').hide();
		},
		appendCurrentFolder: function(data){
			$('.current-folder').text(data)
		}
	},

}


Directory.Controller = function(view){
	this.view = view;
}

Directory.Controller.prototype = {
	init: function() {
		this.bindListeners();
	},
	bindListeners: function() {
		$(document).on('changeLevel', function(event, data){
			this.data = data;
		}.bind(this));

		$(document).on('success', function(){
			this.checkLevel(this.data)
		}.bind(this));
	},

	checkLevel: function(data) {
		var id = data.id
		// debugger
		this.view.functionCollection[id](data);
		// this.view.functionCollection[id]();
		// var createFunction = "this.view.animate" + id
		// var animateThis = eval(createFunction).bind(this.view);
		// if(typeof(animateThis) === "function"){
			// animateThis(data)
		// }
	}

}<commit_msg>deleted comments<commit_after>Directory.View = function(){}

Directory.View.prototype = {
	functionCollection: {
		1: function(){
			alert('yo waddup')
		},

		2: function(data) {
			this.clearDom();
			var currentFolder = data.master
			this.appendCurrentFolder(currentFolder)
			data.branches.forEach(function(folder){
				$('#directory-template').append("<li><img class='folder-icon' src='images/folder.png'><span class='folder-text'>" + folder + "</span></li>")
			});
		},

		clearDom: function(){
			$('#directory-template li').hide();
		},
		appendCurrentFolder: function(data){
			$('.current-folder').text(data)
		}
	},

}


Directory.Controller = function(view){
	this.view = view;
}

Directory.Controller.prototype = {
	init: function() {
		this.bindListeners();
	},
	bindListeners: function() {
		$(document).on('changeLevel', function(event, data){
			this.data = data;
		}.bind(this));

		$(document).on('success', function(){
			this.checkLevel(this.data)
		}.bind(this));
	},

	checkLevel: function(data) {
		var id = data.id
		this.view.functionCollection[id](data);		
	}

}
{'fraction_non_alphanumeric': 0.19421487603305784, 'fraction_numerical': 0.001652892561983471, 'mean_word_length': 4.184154175588865, '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': '108399', 'n_tokens_mistral': 883, 'n_tokens_neox': 792, 'n_words': 123}