<commit_before>var myWindow=null;


var OptionButton=function(){
    //this.routeList='_admin_concursocriterio_new';
    this.routeNew='_admin_concursocriterio_new';
    this.routeSave='_admin_concursocriterio_save';
    /*this.routeEdit='_admin_concurso_edit';
    this.routeUpdate='_admin_concurso_update';
    this.routeDelete='_admin_concurso_delete';
*/
    
}
OptionButton.prototype={
    New:function(){
    	var idConcurso=$("#idConcurso").val();
        this.Window=new BootstrapWindow({id:"winForm",title:"Nuevo Criterio"});
        this.Window.setWidth(700);
        this.Window.setHeight(300);
        var url=Routing.generate(this.routeNew,{id:idConcurso});
        this.Window.Load(url,"");
        this.Window.Show();
         var parent=this;
        this.Window.AddButton('btn-concurso-cancel',{
            label:'Cancelar',
            'class':'btn-default',
            fn:function(){
                parent.Window.Hide();
            }
            
        })
       
        this.Window.AddButton('btn-concurso-save',{
            label:'Grabar',
            'class':'btn-success',
            fn:function(){
                parent.Save();               
                parent.Window.Hide();
            }
        });
    },
    Save:function(){
            var parent=this;
            var url=Routing.generate(this.routeSave);
            params = $('#myform').serializeObject();
            params.idConcurso=$("#idConcurso").val();  
            
            $.ajax({
                    type:'POST',
                    url:url,
                    data:params,
                    dataType:"html",
                    success:function(datos){
                            //parent.Window.AddHTML(datos);
                            new OptionButton().Refresh();
                    },
                    error:function(objeto, quepaso, otroobj){

                    }
            });
        
    },
    Edit:function(id){
       /* this.IdEntity=id;
        this.Window=new BootstrapWindow({id:"winForm",title:"Editar Concurso"});
        this.Window.setWidth(1000);
        this.Window.setHeight(300);
        var url=Routing.generate(this.routeEdit,{id:id});
        this.Window.Load(url,"");
        this.Window.Show();
        var parent=this;
        this.Window.AddButton('btn-concurso-cancel',{
            label:'Cancelar',
            'class':'btn-default',
            fn:function(){
                parent.Window.Hide();
            }
            
        })
       
        this.Window.AddButton('btn-concurso-save',{
            label:'Grabar',
            'class':'btn-success',
            fn:function(){
                parent.Update();               
                parent.Window.Hide();
            }
        });
*/
    },
    Update:function(){
    	/*
            console.log("actualizando perfil con id:"+this.IdEntity);
            var parent=this;
            var url=Routing.generate(this.routeUpdate,{id:this.IdEntity});
            params = $('#myform').serializeObject();
            var nodes = $('#tree').tree('getChecked');
            var s = '';
            for(var i=0; i<nodes.length; i++){
                if (s != '') s += ',';
                s += nodes[i].id;
            }
            params.perfil=s;           
            $.ajax({
                    type:'POST',
                    url:url,
                    data:params,
                    dataType:"html",
                    success:function(datos){
                            
                            new OptionButton().Refresh();
                    },
                    error:function(objeto, quepaso, otroobj){

                    }
            });     */      
    },
    Delete:function(id){
    	/*
        this.IdEntity=id;
        if(confirm("Desea eliminar el perfil seleccionado?")){
             var url=Routing.generate(this.routeDelete,{id:this.IdEntity});
             $.ajax({
                    type:'DELETE',
                    url:url,
                    dataType:"html",
                    success:function(datos){
                            
                            new OptionButton().Refresh();
                    },
                    error:function(objeto, quepaso, otroobj){

                    }
            }); 
        }
        */
    },
    Refresh:function(){
    	/*
        var url=Routing.generate(this.routeList);
        new jAjax().Load(url,'main-body','get','','');
        */
    }
}



$(document).ready(function() {

	var fnOpciones=function(id){
		var options=""
		if (id){
	    	options+='<div style="width:100%">';
	    	options+='<a href="#" class="row-show" data-id="'+id+'" title="Ver Detalle"><i class="glyphicon glyphicon-search"> </i></a> ';
	        options+='<a href="#" class="row-edit" data-id="'+id+'" title="Editar"><i class="glyphicon glyphicon-pencil"> </i></a> ';<commit_msg>se incluyó criterios<commit_after>var myWindow=null;


var OptionButton=function(){
    this.routeList='_admin_concurso_criterio';
    this.routeNew='_admin_concursocriterio_new';
    this.routeSave='_admin_concursocriterio_save';
    /*this.routeEdit='_admin_concurso_edit';
    this.routeUpdate='_admin_concurso_update';
    this.routeDelete='_admin_concurso_delete';
*/
    
}
OptionButton.prototype={
    New:function(){
    	var idConcurso=$("#idConcurso").val();
        this.Window=new BootstrapWindow({id:"winForm",title:"Nuevo Criterio"});
        this.Window.setWidth(700);
        this.Window.setHeight(300);
        var url=Routing.generate(this.routeNew,{id:idConcurso});
        this.Window.Load(url,"");
        this.Window.Show();
         var parent=this;
        this.Window.AddButton('btn-concurso-cancel',{
            label:'Cancelar',
            'class':'btn-default',
            fn:function(){
                parent.Window.Hide();
            }
            
        })
       
        this.Window.AddButton('btn-concurso-save',{
            label:'Grabar',
            'class':'btn-success',
            fn:function(){
                parent.Save();               
                parent.Window.Hide();
            }
        });
    },
    Save:function(){
            var parent=this;
            var url=Routing.generate(this.routeSave);
            params = $('#myform').serializeObject();
            params.idConcurso=$("#idConcurso").val();  
            
            $.ajax({
                    type:'POST',
                    url:url,
                    data:params,
                    dataType:"html",
                    success:function(datos){
                            //parent.Window.AddHTML(datos);
                            new OptionButton().Refresh();
                    },
                    error:function(objeto, quepaso, otroobj){

                    }
            });
        
    },
    Edit:function(id){
       /* this.IdEntity=id;
        this.Window=new BootstrapWindow({id:"winForm",title:"Editar Concurso"});
        this.Window.setWidth(1000);
        this.Window.setHeight(300);
        var url=Routing.generate(this.routeEdit,{id:id});
        this.Window.Load(url,"");
        this.Window.Show();
        var parent=this;
        this.Window.AddButton('btn-concurso-cancel',{
            label:'Cancelar',
            'class':'btn-default',
            fn:function(){
                parent.Window.Hide();
            }
            
        })
       
        this.Window.AddButton('btn-concurso-save',{
            label:'Grabar',
            'class':'btn-success',
            fn:function(){
                parent.Update();               
                parent.Window.Hide();
            }
        });
*/
    },
    Update:function(){
    	/*
            console.log("actualizando perfil con id:"+this.IdEntity);
            var parent=this;
            var url=Routing.generate(this.routeUpdate,{id:this.IdEntity});
            params = $('#myform').serializeObject();
            var nodes = $('#tree').tree('getChecked');
            var s = '';
            for(var i=0; i<nodes.length; i++){
                if (s != '') s += ',';
                s += nodes[i].id;
            }
            params.perfil=s;           
            $.ajax({
                    type:'POST',
                    url:url,
                    data:params,
                    dataType:"html",
                    success:function(datos){
                            
                            new OptionButton().Refresh();
                    },
                    error:function(objeto, quepaso, otroobj){

                    }
            });     */      
    },
    Delete:function(id){
    	/*
        this.IdEntity=id;
        if(confirm("Desea eliminar el perfil seleccionado?")){
             var url=Routing.generate(this.routeDelete,{id:this.IdEntity});
             $.ajax({
                    type:'DELETE',
                    url:url,
                    dataType:"html",
                    success:function(datos){
                            
                            new OptionButton().Refresh();
                    },
                    error:function(objeto, quepaso, otroobj){

                    }
            }); 
        }
        */
    },
    Refresh:function(){
    	
        var url=Routing.generate(this.routeList,{id:$("#idConcurso").val()});
        new jAjax().Load(url,'main-body','get','','');
        
    }
}



$(document).ready(function() {

	var fnOpciones=function(id){
		var options=""
		if (id){
	    	options+='<div style="width:100%">';
	    	options+='<a href="#" class="row-show" data-id="'+id+'" title="Ver Detalle"><i class="glyphicon glyphicon-search"> </i></a> ';
	        options+='<a href="#" class="row-edit" data-id="'+id+'" title="Editar"><i class="glyphicon glyphicon-pencil"> </i></a> ';
{'fraction_non_alphanumeric': 0.15115329659114105, 'fraction_numerical': 0.00347009593794652, 'mean_word_length': 1.432720953326713, 'pattern_counts': {'":': 0, '<': 23, '<?xml version=': 0, '>': 21, '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': '4214260', 'n_tokens_mistral': 2799, 'n_tokens_neox': 2662, 'n_words': 336}