<commit_before>;( function() {
	
	"use strict";

	App.Views.Main = Backbone.View.extend({

		events: {},

		initialize: function() {

			this.$win = $( window );
			this.$win.on( "resize", this.onResize );
			this.onResize();
		},

		start: function() {
			//render everything for the first time
			this.render();
		},

		render: function() {
			
			var dispatcher = _.clone( Backbone.Events );
			this.dispatcher = dispatcher;

			if( App.Views.FormView ) {
				this.formView = new App.Views.FormView( { dispatcher: dispatcher } );
			} 
			if( App.Views.ChartView ) {
				this.chartVew = new App.Views.ChartView( { dispatcher: dispatcher } );
			}
			if( App.Views.ImportView ) { 
				this.importView = new App.Views.ImportView( {dispatcher: dispatcher } );
			}
			
			//variable select
			if( App.Views.UI.VariableSelects ) {
				var variableSelects = new App.Views.UI.VariableSelects();
				variableSelects.init();
			}

			//validate 
			var $validateForms = $( ".validate-form" );
			if( $validateForms.length ) {

				$validateForms.on( "submit", function( evt ) {
					var $form = $( evt.currentTarget ),
						valid = App.Utils.FormHelper.validate( $form );
					if( !valid ) {
						evt.preventDefault();
					}
				} );
			}

			//delete buttons
			$( ".delete-btn, .btn-danger" ).on( "click", function( evt ) {

				var confirm = window.confirm( "Are you sure?" );
				if( !confirm ) {
					evt.preventDefault();
				}

			});<commit_msg>fixed collision of two on submit callbacks in Import form<commit_after>;( function() {
	
	"use strict";

	App.Views.Main = Backbone.View.extend({

		events: {},

		initialize: function() {

			this.$win = $( window );
			this.$win.on( "resize", this.onResize );
			this.onResize();
		},

		start: function() {
			//render everything for the first time
			this.render();
		},

		render: function() {
			
			var dispatcher = _.clone( Backbone.Events );
			this.dispatcher = dispatcher;

			if( App.Views.FormView ) {
				this.formView = new App.Views.FormView( { dispatcher: dispatcher } );
			} 
			if( App.Views.ChartView ) {
				this.chartVew = new App.Views.ChartView( { dispatcher: dispatcher } );
			}
			if( App.Views.ImportView ) { 
				this.importView = new App.Views.ImportView( {dispatcher: dispatcher } );
			}
			
			//variable select
			if( App.Views.UI.VariableSelects ) {
				var variableSelects = new App.Views.UI.VariableSelects();
				variableSelects.init();
			}

			//validate 
			var $validateForms = $( ".validate-form" );
			if( $validateForms.length ) {

				$validateForms.on( "submit", function( evt ) {
					var $form = $( evt.currentTarget ),
						valid = App.Utils.FormHelper.validate( $form );
					if( !valid ) {
						evt.preventDefault();
						evt.stopImmediatePropagation();
					}
				} );
			}

			//delete buttons
			$( ".delete-btn, .btn-danger" ).on( "click", function( evt ) {

				var confirm = window.confirm( "Are you sure?" );
				if( !confirm ) {
					evt.preventDefault();
				}

			});
{'fraction_non_alphanumeric': 0.15951742627345844, 'fraction_numerical': 0.0, 'mean_word_length': 2.6313868613138687, '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': '4610291', 'n_tokens_mistral': 1216, 'n_tokens_neox': 972, 'n_words': 206}