<commit_before>define([	
	
	'inputFieldView',
	'dateFieldView',
	'dynamicAdvancedSelectBoxView',
	
], function(InputFieldView, DateFieldView, DynamicAdvancedSelectBoxView){

	'use strict';


	/******************************************
	* Advanced Filter Bar View
	*/
	var FieldContainerView = Backbone.View.extend({
		
		el         : '.fields-container',
		
		components : [],
		
		// The DOM events //
		events: {
		},


		/** View Initialization
		*/
		initialize: function(options){
			this.searchableFields = options.searchableFields
			
			this.render();
		},



		/** View Render
		*/
		render: function(){
			var self = this;
			
			// Retrieve the template //				
			self.components = [];
			
			_.each(self.searchableFields, function(field, i){

					//Add widget corresponding to field's type
					switch (field.type) {
						case 'text':
						break;

						case 'char':
							var inputFieldView = new InputFieldView({ field: field })
							$(self.el).append(inputFieldView.render().el);
							self.components.push(inputFieldView);
						break;

						case 'date':
						break;

						case 'datetime':
							var dateFieldView = new DateFieldView({ field: field })	
							$(self.el).append(dateFieldView.render().el);
							self.components.push(dateFieldView);
						break;

						case 'many2one':
							var dynamicAdvancedSelectBoxView = new DynamicAdvancedSelectBoxView({ field: field, url: field.url })					
							$(self.el).append(dynamicAdvancedSelectBoxView.render().el);								
							self.components.push(dynamicAdvancedSelectBoxView);
						break;

						case 'selection':
							var selectionModel  = Backbone.Model.extend({});
							var selectionCollection = Backbone.Collection.extend({
							    model: selectionModel,
							    initialize: function(){}
							});
							var statesCollection = new selectionCollection();
							statesCollection.reset(field.selection)
							var dynamicAdvancedSelectBoxView = new DynamicAdvancedSelectBoxView({ field: field, collection: statesCollection })					
							$(self.el).append(dynamicAdvancedSelectBoxView.render().el);
							self.components.push(dynamicAdvancedSelectBoxView);
						break;				
					}
			});
	});

	return FieldContainerView;

});<commit_msg>BUG fix after merge in form filters<commit_after>define([	
	
	'inputFieldView',
	'dateFieldView',
	'dynamicAdvancedSelectBoxView',
	
], function(InputFieldView, DateFieldView, DynamicAdvancedSelectBoxView){

	'use strict';


	/******************************************
	* Advanced Filter Bar View
	*/
	var FieldContainerView = Backbone.View.extend({
		
		el         : '.fields-container',
		
		components : [],
		
		// The DOM events //
		events: {
		},


		/** View Initialization
		*/
		initialize: function(options){
			this.searchableFields = options.searchableFields
			
			this.render();
		},



		/** View Render
		*/
		render: function(){
			var self = this;
			
			// Retrieve the template //				
			self.components = [];
			
			_.each(self.searchableFields, function(field, i){

					//Add widget corresponding to field's type
					switch (field.type) {
						case 'text':
						break;

						case 'char':
							var inputFieldView = new InputFieldView({ field: field })
							$(self.el).append(inputFieldView.render().el);
							self.components.push(inputFieldView);
						break;

						case 'date':
						break;

						case 'datetime':
							var dateFieldView = new DateFieldView({ field: field })	
							$(self.el).append(dateFieldView.render().el);
							self.components.push(dateFieldView);
						break;

						case 'many2one':
							var dynamicAdvancedSelectBoxView = new DynamicAdvancedSelectBoxView({ field: field, url: field.url })					
							$(self.el).append(dynamicAdvancedSelectBoxView.render().el);								
							self.components.push(dynamicAdvancedSelectBoxView);
						break;

						case 'selection':
							var selectionModel  = Backbone.Model.extend({});
							var selectionCollection = Backbone.Collection.extend({
							    model: selectionModel,
							    initialize: function(){}
							});
							var statesCollection = new selectionCollection();
							statesCollection.reset(field.selection)
							var dynamicAdvancedSelectBoxView = new DynamicAdvancedSelectBoxView({ field: field, collection: statesCollection })					
							$(self.el).append(dynamicAdvancedSelectBoxView.render().el);
							self.components.push(dynamicAdvancedSelectBoxView);
						break;				
					}
			});
		},


	});

	return FieldContainerView;

});
{'fraction_non_alphanumeric': 0.13744180891154956, 'fraction_numerical': 0.0004433606739082243, 'mean_word_length': 2.8432708688245314, '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': '6799234', 'n_tokens_mistral': 1771, 'n_tokens_neox': 1211, 'n_words': 252}