<commit_before>:javascript

  var table_dom_id = "#{table_id}";
  var action_path = "#{path_pattern}";

  $("#" + table_dom_id).on('click-row.bs.table', function (e, row, $element) {
    var id = $element.attr('id');
    //alert(id);
    if (id.length > 0) {
      var url = action_path.replace("xxx", $element.attr('id'));
      //alert(url);
      document.location.href = url;
    }
  }).on('all.bs.table', function(evt, name, args) {
    $('.fixed-table-container').css('min-height', '300px')
    transam.make_same_height('.header-part');
  });

  $(window).load(function() {
    transam.make_same_height('.header-part');
  });

  $(window).resize(function() {
    $("#" + table_dom_id).bootstrapTable('resetView');
  });

  function boolean_formatter(value) {
    if (value) {
      return '<i class="fa fa-check"></i>';
    } else {
      return '';
    }
  };

  function integer_formatter(value) {
    if (value) {
      return format("###,##0.", value);
    } else {
      return value;
    }
  };

  function currency_formatter(value) {
    if (value) {
      return '$' + integer_formatter(value);
    } else {
      return value;
    }
  };

  function percentage_formatter(value) {
    if (value) {
      return format("##0.00", value) + "%";
    } else {
      return value;
    }
  };

  function date_formatter(value) {
    if (value) {
      var date = new Date(value);
      return date.getMonth() + 1 + "/" + date.getDate() + "/" + date.getFullYear();
    } else {
      return value;
    }
  };

  function tagged_formatter(value) {
    if (value == '1') {
      return '<i class="fa fa-star"></i>';
    } else {
      return '<i class="fa fa-star-o"></i>';
    }
  };

  function tasks_formatter(value) {
    if (value > 0) {
      return '<i class="fa fa-flag"></i>';
    }
    return "";
  };

  function documents_formatter(value) {
    if (value > 0) {
      return '<i class="fa fa-file-o"></i>';
    }
    return "";
  };

  function comments_formatter(value) {
    if (value > 0) {
      return '<i class="fa fa-comments"></i>';
    }
    return "";
  };

  function images_formatter(value) {
    if (value > 0) {
      return '<i class="fa fa-image"></i>';
    }
    return "";
  };
<commit_msg>Fix issue with currency renderer where 0 values were not getting $ printed<commit_after>:javascript

  var table_dom_id = "#{table_id}";
  var action_path = "#{path_pattern}";

  $("#" + table_dom_id).on('click-row.bs.table', function (e, row, $element) {
    var id = $element.attr('id');
    //alert(id);
    if (id.length > 0) {
      var url = action_path.replace("xxx", $element.attr('id'));
      //alert(url);
      document.location.href = url;
    }
  }).on('all.bs.table', function(evt, name, args) {
    $('.fixed-table-container').css('min-height', '300px')
    transam.make_same_height('.header-part');
  });

  $(window).load(function() {
    transam.make_same_height('.header-part');
  });

  $(window).resize(function() {
    $("#" + table_dom_id).bootstrapTable('resetView');
  });

  function boolean_formatter(value) {
    if (value) {
      return '<i class="fa fa-check"></i>';
    } else {
      return '';
    }
  };

  function integer_formatter(value) {
    if (value == null) {
      return value;
    } else {
      return format("###,##0.", value);
    }
  };

  function currency_formatter(value) {
    if (value == null) {
      return value;
    } else {
      return '$' + integer_formatter(value);
    }
  };

  function percentage_formatter(value) {
    if (value == null) {
      return value;
    } else {
      return format("##0.00", value) + "%";
    }
  };

  function date_formatter(value) {
    if (value == null) {
      return value;
    } else {
      var date = new Date(value);
      return date.getMonth() + 1 + "/" + date.getDate() + "/" + date.getFullYear();
    }
  };

  function tagged_formatter(value) {
    if (value == '1') {
      return '<i class="fa fa-star"></i>';
    } else {
      return '<i class="fa fa-star-o"></i>';
    }
  };

  function tasks_formatter(value) {
    if (value > 0) {
      return '<i class="fa fa-flag"></i>';
    }
    return "";
  };

  function documents_formatter(value) {
    if (value > 0) {
      return '<i class="fa fa-file-o"></i>';
    }
    return "";
  };

  function comments_formatter(value) {
    if (value > 0) {
      return '<i class="fa fa-comments"></i>';
    }
    return "";
  };

  function images_formatter(value) {
    if (value > 0) {
      return '<i class="fa fa-image"></i>';
    }
    return "";
  };

{'fraction_non_alphanumeric': 0.19533142479630036, 'fraction_numerical': 0.006386258533362696, 'mean_word_length': 2.507335907335907, 'pattern_counts': {'":': 0, '<': 31, '<?xml version=': 0, '>': 41, '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': '5924432', 'n_tokens_mistral': 1589, 'n_tokens_neox': 1523, 'n_words': 307}