<commit_before>{% if carriers %}
    <div id="wireless-carriers-table-wrapper" style="visibility: hidden">
        <table id="wireless-carriers-table" class="wp-list-table widefat fixed striped tags" style="width:100%;">
            <thead>
            <tr>
                <th scope="col" style="width: 30px">{{ 'ID'|trans }}</th>
                <th scope="col">{{ 'Name'|trans }}</th>
                <th scope="col" style="text-align: right">
                    <a href="javascript: showProducts('');" class="button {% if request.isMethod('post') and not request.get('carrier_id') %}button-primary active{% endif %}">
                        {{ 'View All'|trans }}
                    </a>
                </th>
            </tr>
            </thead>
            <tbody>
            {% for carrier in carriers %}
                <tr>
                    <td>{{ carrier.id }}</td>
                    <td><strong id="carrier-name-{{ carrier.id }}">{{ carrier.name }}</strong></td>
                    <td style="text-align: right">
                        <a id="carrier-select-{{ carrier.id }}" href="javascript: showProducts('{{ carrier.id }}');" class="button {% if request.get('carrier_id') == carrier.id %}button-primary active{% endif %}">
                            {{ 'View'|trans }}
                        </a>
                    </td>
                </tr>
            {% endfor %}
            </tbody>
        </table>
    </div>
{% endif %}

<script>
    jQuery(document).ready(function () {
        var table = jQuery('#wireless-carriers-table');
        table.DataTable({
            order: [[2, 'asc']]
        });
        //avoid a flicker when the table is loading
        jQuery('#wireless-carriers-table-wrapper').css('visibility', 'visible')
    });
    function showProducts($carrierId) {
        jQuery('#wireless-carriers-table').find('a.button').removeClass('button-primary active');
        jQuery('#carrier-select-' + $carrierId).addClass('button-primary active');
        jQuery('#col-right').show();
        jQuery('#wireless-products-loader').show();
        var productsWrapper = jQuery('#wireless-products-wrapper');
        productsWrapper.hide();
        productsWrapper.load('/wp-admin/admin-ajax.php?action=get_wireless_products&carrier_id=' + $carrierId, function () {
            jQuery('#wireless-products-loader').hide();
            productsWrapper.show(500);
        });
    }
</script>
<?php endif; ?><commit_msg>mark select all when is selected<commit_after>{% if carriers %}
    <div id="wireless-carriers-table-wrapper" style="visibility: hidden">
        <table id="wireless-carriers-table" class="wp-list-table widefat fixed striped tags" style="width:100%;">
            <thead>
            <tr>
                <th scope="col" style="width: 30px">{{ 'ID'|trans }}</th>
                <th scope="col">{{ 'Name'|trans }}</th>
                <th scope="col" style="text-align: right">
                    <a id="carrier-select-" href="javascript: showProducts('');" class="button {% if request.isMethod('post') and not request.get('carrier_id') %}button-primary active{% endif %}">
                        {{ 'View All'|trans }}
                    </a>
                </th>
            </tr>
            </thead>
            <tbody>
            {% for carrier in carriers %}
                <tr>
                    <td>{{ carrier.id }}</td>
                    <td><strong id="carrier-name-{{ carrier.id }}">{{ carrier.name }}</strong></td>
                    <td style="text-align: right">
                        <a id="carrier-select-{{ carrier.id }}" href="javascript: showProducts('{{ carrier.id }}');" class="button {% if request.get('carrier_id') == carrier.id %}button-primary active{% endif %}">
                            {{ 'View'|trans }}
                        </a>
                    </td>
                </tr>
            {% endfor %}
            </tbody>
        </table>
    </div>
{% endif %}

<script>
    jQuery(document).ready(function () {
        var table = jQuery('#wireless-carriers-table');
        table.DataTable({
            order: [[2, 'asc']]
        });
        //avoid a flicker when the table is loading
        jQuery('#wireless-carriers-table-wrapper').css('visibility', 'visible')
    });
    function showProducts($carrierId) {
        jQuery('#wireless-carriers-table').find('a.button').removeClass('button-primary active');
        jQuery('#carrier-select-' + $carrierId).addClass('button-primary active');
        jQuery('#col-right').show();
        jQuery('#wireless-products-loader').show();
        var productsWrapper = jQuery('#wireless-products-wrapper');
        productsWrapper.hide();
        productsWrapper.html('');
        productsWrapper.load('/wp-admin/admin-ajax.php?action=get_wireless_products&carrier_id=' + $carrierId, function () {
            jQuery('#wireless-products-loader').hide();
            productsWrapper.show(500);
        });
    }
</script>
<?php endif; ?>
{'fraction_non_alphanumeric': 0.17787114845938376, 'fraction_numerical': 0.003601440576230492, 'mean_word_length': 1.9738251041046997, 'pattern_counts': {'":': 0, '<': 69, '<?xml version=': 0, '>': 69, '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': '3828388', 'n_tokens_mistral': 1450, 'n_tokens_neox': 1325, 'n_words': 263}