<commit_before>{% extends "site_base.html" %}

{% load staticfiles %}
{% load i18n %}

{% block head_title %}{% trans "Resource Type Facets" %}{% endblock %}

{% block extra_head %}

<link rel="stylesheet" href="{% static 'css/chosen.css' %}" />
<link rel="stylesheet" media="screen" href="{% static 'css/jquery.handsontable.full.css' %}">

{% endblock %}

{% block body_class %}patterns{% endblock %}

{% block body_base %}
    <div class="container">
        {% include "_messages.html" %}
	    <div>
		    <legend>{% trans "Resource Type Facets" %}</legend>

		    <p>Click on a heading to sort. Double-click on a cell to change.</p>

		    <div id="resourceFacetsTable" style="height: 600px; overflow: scroll;">
		    </div>

        </div>
    </div>
{% endblock %}

{% block extra_script %}
	<script src="http://code.jquery.com/ui/1.9.2/jquery-ui.js"></script>
	<script src="{% static 'js/chosen.jquery.js' %}"></script>
	<script src="{% static 'js/jquery.handsontable.full.js' %}"></script>
{% endblock %}

{% block extra_body %}
	{{ block.super }}
    <script type="text/javascript">

	$(document).ready(function(){
	
        var headings = [];
        var rows = [];
        var columns = [];

        {% for heading in headings %}
	        {% if forloop.first %}
	            headings.push("{{ heading }}");
	            columns.push({ readonly: true });
            {% else %}
		        headings.push("{{ heading.name|safe }}");
		        var sources = [""];
		        {% for fv in heading.values.all %}
		            sources.push("{{ fv.value|safe }}");
	            {% endfor %}
	            columns.push({ 
	                type: 'autocomplete',
                    source: sources,
                    strict: true
                });
	        {% endif %}
        {% endfor %}<commit_msg>fix resource facets table facet values length bug<commit_after>{% extends "site_base.html" %}

{% load staticfiles %}
{% load i18n %}

{% block head_title %}{% trans "Resource Type Facets" %}{% endblock %}

{% block extra_head %}

<link rel="stylesheet" href="{% static 'css/chosen.css' %}" />
<link rel="stylesheet" media="screen" href="{% static 'css/jquery.handsontable.full.css' %}">

{% endblock %}

{% block body_class %}patterns{% endblock %}

{% block body_base %}
    <div class="container">
        {% include "_messages.html" %}
	    <div>
		    <legend>{% trans "Resource Type Facets" %}</legend>

		    <p>Click on a heading to sort. Double-click on a cell to change.</p>

		    <div id="resourceFacetsTable" style="height: 600px; overflow: scroll;">
		    </div>

        </div>
    </div>
{% endblock %}

{% block extra_script %}
	<script src="http://code.jquery.com/ui/1.9.2/jquery-ui.js"></script>
	<script src="{% static 'js/chosen.jquery.js' %}"></script>
	<script src="{% static 'js/jquery.handsontable.full.js' %}"></script>
{% endblock %}

{% block extra_body %}
	{{ block.super }}
    <script type="text/javascript">

	$(document).ready(function(){
	
        var headings = [];
        var rows = [];
        var columns = [];

        {% for heading in headings %}
	        {% if forloop.first %}
	            headings.push("{{ heading }}");
	            columns.push({ readonly: true });
            {% else %}
		        headings.push("{{ heading.name|safe }}");
		        var sources = [""];
		        {% for fv in heading.values.all %}
		            sources.push("{{ fv.value|safe }}");
	            {% endfor %}
	            columns.push({ 
	                type: 'autocomplete',
                    source: sources,
                    strict: true,
                    options: {
                        items: sources.length
                      }
                });
	        {% endif %}
        {% endfor %}
{'fraction_non_alphanumeric': 0.18162393162393162, 'fraction_numerical': 0.004273504273504274, 'mean_word_length': 2.157672849915683, 'pattern_counts': {'":': 0, '<': 41, '<?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': '5934313', 'n_tokens_mistral': 1283, 'n_tokens_neox': 1087, 'n_words': 262}