View | Details | Raw Unified | Return to bug 35265
Collapse All | Expand All

(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/searchengine/elasticsearch/mappings.tt (-2 / +2 lines)
Lines 261-267 a.add, a.delete { Link Here
261
                    [% WRAPPER tab_panel tabname="mapping_${ index.index_name }" %]
261
                    [% WRAPPER tab_panel tabname="mapping_${ index.index_name }" %]
262
                        <table class="mappings" data-index_name="[% index.index_name | html %]" data-ordering="false" id="mapping_[% index.index_name | html %]_table">
262
                        <table class="mappings" data-index_name="[% index.index_name | html %]" data-ordering="false" id="mapping_[% index.index_name | html %]_table">
263
                            <thead>
263
                            <thead>
264
                                <tr class="nodrag nodrop">
264
                                <tr>
265
                                <th>Search field</th>
265
                                <th>Search field</th>
266
                                <th>Sortable</th>
266
                                <th>Sortable</th>
267
                                <th>Facetable</th>
267
                                <th>Facetable</th>
Lines 387-393 a.add, a.delete { Link Here
387
                                [% END %]
387
                                [% END %]
388
                            </tbody>
388
                            </tbody>
389
                            <tfoot>
389
                            <tfoot>
390
                                <tr class="nodrag nodrop">
390
                                <tr>
391
                                    <td>
391
                                    <td>
392
                                        <input data-id="mapping_index_name" type="hidden" value="[% index.index_name | html %]" />
392
                                        <input data-id="mapping_index_name" type="hidden" value="[% index.index_name | html %]" />
393
                                        <select data-id="mapping_search_field_name">
393
                                        <select data-id="mapping_search_field_name">
(-)a/koha-tmpl/intranet-tmpl/prog/js/elasticsearch-mappings.js (-10 lines)
Lines 7-13 function clean_line(line) { Link Here
7
7
8
function clone_line(line) {
8
function clone_line(line) {
9
    var new_line = $(line).clone();
9
    var new_line = $(line).clone();
10
    $(new_line).removeClass("nodrag nodrop");
11
    $(new_line).find('td:last-child>a').removeClass("add").addClass("delete").html( __("Delete") );
10
    $(new_line).find('td:last-child>a').removeClass("add").addClass("delete").html( __("Delete") );
12
    $(new_line).find('[data-id]').each(function () {
11
    $(new_line).find('[data-id]').each(function () {
13
        $(this).attr({ name: $(this).attr('data-id') }).removeAttr('data-id');
12
        $(this).attr({ name: $(this).attr('data-id') }).removeAttr('data-id');
Lines 58-67 $(document).ready(function () { Link Here
58
        }
57
        }
59
    });
58
    });
60
59
61
    $("table.mappings").tableDnD({
62
        onDragClass: "dragClass highlighted-row",
63
    });
64
65
    $('.add').click(function () {
60
    $('.add').click(function () {
66
        var table = $(this).closest('table');
61
        var table = $(this).closest('table');
67
        let table_id = table.attr('id');
62
        let table_id = table.attr('id');
Lines 81-90 $(document).ready(function () { Link Here
81
            } );
76
            } );
82
77
83
            clean_line(line);
78
            clean_line(line);
84
85
            $(table).tableDnD({
86
                onDragClass: "dragClass highlighted-row",
87
            });
88
        }
79
        }
89
    });
80
    });
90
    $("#facet_biblios > table").tableDnD({
81
    $("#facet_biblios > table").tableDnD({
91
- 

Return to bug 35265