<commit_before>
////////////////////////// switch_campaign_type - start 

function switch_campaign_type(ctype) {
  switch (ctype) {
    case "petition": 
      $("#crecipients").hide("slow");
      $("#campaign_recipients").removeAttr("required"); 
      break;
    case "mailing":
      $("#crecipients").show("slow");
      $("#crecipients").removeClass("hide");
      $("#campaign_recipients").attr("required", "required");
      break;
    default:
      $("#crecipients").hide('slow');
      break;
  }
}
////////////////////////// switch_campaign_type - start 

////////////////////////// jquery.DatePicker cutomizations - start

$.dpText = {
  TEXT_PREV_YEAR    : 'Año anterior',
  TEXT_PREV_MONTH   : 'Mes anterior',
  TEXT_NEXT_YEAR    : 'Próximo año',
  TEXT_NEXT_MONTH   : 'Próximo mes',
  TEXT_CLOSE      : 'Cerrar',
  TEXT_CHOOSE_DATE: '',
  HEADER_FORMAT   : 'mmmm yyyy'
}

////////////////////////// jquery.DatePicker cutomizations - end

////////////////////////// chart_draw: jqplot helper  - start

function chart_draw(items, chart_id, color, minimal_date){
  $.jqplot(chart_id, [items], {
    seriesDefaults: {
      fill: true,
      fillAndStroke: true,
      fillAlpha: 0.5,
      shadow: false
    },
    highlighter: {
      tooltipAxes: 'y',
    },
    grid: {
        backgroundColor: 'white',
        borderColor: 'white',
        drawGridlines: false,
      shadow: false
    },
    axes: {
      xaxis: {
        label:'Fecha (Día-Mes)',
        labelRenderer: $.jqplot.CanvasAxisLabelRenderer,
        renderer:$.jqplot.DateAxisRenderer,
        tickOptions:{formatString:'%d-%m'},
        tickInterval:'1 day',
        min: minimal_date
      },
      yaxis: {
        min: 0,
        tickInterval: 1,
        label:'Adhesiones a esta campaña',
        labelRenderer: $.jqplot.CanvasAxisLabelRenderer
      }
    },
    series: [{
      color: color,
      lineWidth:4
    }]
  }); 
}

////////////////////////// chart_draw: jqplot helper  - end

$(function() {

  // Al hacer click en unirse a una campaña, hacer el scroll
  // y poner foco en el campo nombre
  $("#join-this-campaign-link").click(function(event) {
    event.preventDefault();
    var fullUrl = this.href;
    var parts = fullUrl.split("#");<commit_msg>stats: bug en columna Y con tantos valores<commit_after>
////////////////////////// switch_campaign_type - start 

function switch_campaign_type(ctype) {
  switch (ctype) {
    case "petition": 
      $("#crecipients").hide("slow");
      $("#campaign_recipients").removeAttr("required"); 
      break;
    case "mailing":
      $("#crecipients").show("slow");
      $("#crecipients").removeClass("hide");
      $("#campaign_recipients").attr("required", "required");
      break;
    default:
      $("#crecipients").hide('slow');
      break;
  }
}
////////////////////////// switch_campaign_type - start 

////////////////////////// jquery.DatePicker cutomizations - start

$.dpText = {
  TEXT_PREV_YEAR    : 'Año anterior',
  TEXT_PREV_MONTH   : 'Mes anterior',
  TEXT_NEXT_YEAR    : 'Próximo año',
  TEXT_NEXT_MONTH   : 'Próximo mes',
  TEXT_CLOSE      : 'Cerrar',
  TEXT_CHOOSE_DATE: '',
  HEADER_FORMAT   : 'mmmm yyyy'
}

////////////////////////// jquery.DatePicker cutomizations - end

////////////////////////// chart_draw: jqplot helper  - start

function chart_draw(items, chart_id, color, minimal_date){
  // seleccionamos el valor del ultimo item para saber cual tiene 
  // que ser el tickInterval 
  var last_item = items[items.length-1][1];
  var tick_interval = Math.ceil(last_item / 4);
  $.jqplot(chart_id, [items], {
    seriesDefaults: {
      fill: true,
      fillAndStroke: true,
      fillAlpha: 0.5,
      shadow: false
    },
    highlighter: {
      tooltipAxes: 'y',
    },
    grid: {
        backgroundColor: 'white',
        borderColor: 'white',
        drawGridlines: false,
      shadow: false
    },
    axes: {
      xaxis: {
        label:'Fecha (Día-Mes)',
        labelRenderer: $.jqplot.CanvasAxisLabelRenderer,
        renderer:$.jqplot.DateAxisRenderer,
        tickOptions:{formatString:'%d-%m'},
        min: minimal_date
      },
      yaxis: {
        min: 0,
        tickInterval: tick_interval,
        tickOptions:{
          formatString:'%d'
        },
        label:'Mensajes enviados',
        labelRenderer: $.jqplot.CanvasAxisLabelRenderer
      }
    },
    series: [{
      color: color,
      lineWidth:4
    }]
  }); 
}

////////////////////////// chart_draw: jqplot helper  - end

$(function() {

  // Al hacer click en unirse a una campaña, hacer el scroll
  // y poner foco en el campo nombre
  $("#join-this-campaign-link").click(function(event) {
    event.preventDefault();
    var fullUrl = this.href;
    var parts = fullUrl.split("#");
{'fraction_non_alphanumeric': 0.19360941770023124, 'fraction_numerical': 0.0027328147992432207, 'mean_word_length': 2.0956408588158753, 'pattern_counts': {'":': 4, '<': 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': '109697', 'n_tokens_mistral': 1519, 'n_tokens_neox': 1470, 'n_words': 303}