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

(-)a/koha-tmpl/opac-tmpl/bootstrap/en/includes/datatables.inc (-2 / +6 lines)
Lines 2-8 Link Here
2
[% USE Asset %]
2
[% USE Asset %]
3
[% Asset.js("lib/jquery/plugins/jquery.dataTables.min.js") | $raw %]
3
[% Asset.js("lib/jquery/plugins/jquery.dataTables.min.js") | $raw %]
4
<script>
4
<script>
5
//<![CDATA[
6
    var MSG_DT_FIRST = _("First");
5
    var MSG_DT_FIRST = _("First");
7
    var MSG_DT_LAST = _("Last");
6
    var MSG_DT_LAST = _("Last");
8
    var MSG_DT_NEXT = _("Next");
7
    var MSG_DT_NEXT = _("Next");
Lines 16-22 Link Here
16
    var MSG_DT_PROCESSING = _("Processing...");
15
    var MSG_DT_PROCESSING = _("Processing...");
17
    var MSG_DT_SEARCH = _("Search:");
16
    var MSG_DT_SEARCH = _("Search:");
18
    var MSG_DT_ZERO_RECORDS = _("No matching records found");
17
    var MSG_DT_ZERO_RECORDS = _("No matching records found");
18
    var MSG_DT_COPY_TO_CLIPBOARD = _("Copy to clipboard");
19
    var MSG_DT_COPY_KEYS = _("Press <i>ctrl</i> or <i>⌘</i> + <i>C</i> to copy the table data<br>to your system clipboard.<br><br>To cancel, click this message or press escape.");
20
    var MSG_DT_COPIED_ROWS = _("Copied %d rows to clipboard");
21
    var MSG_DT_COPIED_ONE_ROW = _("Copied one row to clipboard");
22
    var MSG_CLEAR_FILTER = _("Clear filter");
23
    var MSG_DT_ALL = _("All");
19
    var CONFIG_EXCLUDE_ARTICLES_FROM_SORT = _("a an the");
24
    var CONFIG_EXCLUDE_ARTICLES_FROM_SORT = _("a an the");
20
//]]>
21
</script>
25
</script>
22
[% Asset.js("js/datatables.js") | $raw %]
26
[% Asset.js("js/datatables.js") | $raw %]
(-)a/koha-tmpl/opac-tmpl/bootstrap/js/datatables.js (-25 / +24 lines)
Lines 5-42 Link Here
5
//      // other settings
5
//      // other settings
6
//  } ) );
6
//  } ) );
7
var dataTablesDefaults = {
7
var dataTablesDefaults = {
8
    "oLanguage": {
8
    "language": {
9
        "oPaginate": {
9
        "paginate": {
10
            "sFirst"    : __('First'),
10
            "first"    : window.MSG_DT_FIRST || "First",
11
            "sLast"     : __('Last'),
11
            "last"     : window.MSG_DT_LAST || "Last",
12
            "sNext"     : __('Next'),
12
            "next"     : window.MSG_DT_NEXT || "Next",
13
            "sPrevious" : __('Previous'),
13
            "previous" : window.MSG_DT_PREVIOUS || "Previous"
14
        },
14
        },
15
        "sEmptyTable"       : __('No data available in table'),
15
        "emptyTable"       : window.MSG_DT_EMPTY_TABLE || "No data available in table",
16
        "sInfo"             : __('Showing _START_ to _END_ of _TOTAL_ entries'),
16
        "info"             : window.MSG_DT_INFO || "Showing _START_ to _END_ of _TOTAL_ entries",
17
        "sInfoEmpty"        : __('No entries to show'),
17
        "infoEmpty"        : window.MSG_DT_INFO_EMPTY || "No entries to show",
18
        "sInfoFiltered"     : __('(filtered from _MAX_ total entries)'),
18
        "infoFiltered"     : window.MSG_DT_INFO_FILTERED || "(filtered from _MAX_ total entries)",
19
        "sLengthMenu"       : __('Show _MENU_ entries'),
19
        "lengthMenu"       : window.MSG_DT_LENGTH_MENU || "Show _MENU_ entries",
20
        "sLoadingRecords"   : __('Loading...'),
20
        "loadingRecords"   : window.MSG_DT_LOADING_RECORDS || "Loading...",
21
        "sProcessing"       : __('Processing...'),
21
        "processing"       : window.MSG_DT_PROCESSING || "Processing...",
22
        "sSearch"           : __('Search:'),
22
        "search"           : window.MSG_DT_SEARCH || "Search:",
23
        "sZeroRecords"      : __('No matching records found'),
23
        "zeroRecords"      : window.MSG_DT_ZERO_RECORDS || "No matching records found",
24
        buttons: {
24
        buttons: {
25
            "copyTitle"     : __('Copy to clipboard'),
25
            "copyTitle"     : window.MSG_DT_COPY_TO_CLIPBOARD || "Copy to clipboard",
26
            "copyKeys"      : __('Press <i>ctrl</i> or <i>⌘</i> + <i>C</i> to copy the table data<br>to your system clipboard.<br><br>To cancel, click this message or press escape.'),
26
            "copyKeys"      : window.MSG_DT_COPY_KEYS || "Press <i>ctrl</i> or <i>⌘</i> + <i>C</i> to copy the table data<br>to your system clipboard.<br><br>To cancel, click this message or press escape.",
27
            "copySuccess": {
27
            "copySuccess": {
28
                _: __('Copied %d rows to clipboard'),
28
                _: window.MSG_DT_COPIED_ROWS || "Copied %d rows to clipboard",
29
                1: __('Copied one row to clipboard'),
29
                1: window.MSG_DT_COPIED_ONE_ROW || "Copied one row to clipboard",
30
            }
30
            }
31
        }
31
        }
32
    },
32
    },
33
    "dom": '<"top pager"<"table_entries"ilp><"table_controls"fB>>tr<"bottom pager"ip>',
33
    "dom": 't',
34
    "buttons": [{
34
    "buttons": [{
35
        fade: 100,
35
        fade: 100,
36
        className: "dt_button_clear_filter",
36
        className: "dt_button_clear_filter",
37
        titleAttr: __('Clear filter'),
37
        titleAttr: window.MSG_CLEAR_FILTER,
38
        enabled: false,
38
        enabled: false,
39
        text: '<i class="fa fa-lg fa-remove"></i> <span class="dt-button-text">' + __('Clear filter') + '</span>',
39
        text: '<i class="fa fa-lg fa-remove"></i> <span class="dt-button-text">' + window.MSG_CLEAR_FILTER + '</span>',
40
        available: function ( dt ) {
40
        available: function ( dt ) {
41
            // The "clear filter" button is made available if this test returns true
41
            // The "clear filter" button is made available if this test returns true
42
            if( dt.settings()[0].aanFeatures.f ){ // aanFeatures.f is null if there is no search form
42
            if( dt.settings()[0].aanFeatures.f ){ // aanFeatures.f is null if there is no search form
Lines 48-54 var dataTablesDefaults = { Link Here
48
            node.addClass("disabled");
48
            node.addClass("disabled");
49
        }
49
        }
50
    }],
50
    }],
51
    "aLengthMenu": [[10, 20, 50, 100, -1], [10, 20, 50, 100, __('All')]],
51
    "aLengthMenu": [[10, 20, 50, 100, -1], [10, 20, 50, 100, window.MSG_DT_ALL || "All" ]],
52
    "iDisplayLength": 20,
52
    "iDisplayLength": 20,
53
    initComplete: function( settings) {
53
    initComplete: function( settings) {
54
        var tableId = settings.nTable.id
54
        var tableId = settings.nTable.id
Lines 355-361 jQuery.extend( jQuery.fn.dataTableExt.oSort, { Link Here
355
     * from a configuration file (in English, "a," "an," and "the")
355
     * from a configuration file (in English, "a," "an," and "the")
356
     */
356
     */
357
357
358
    var config_exclude_articles_from_sort = __('a an the');
358
    var config_exclude_articles_from_sort = window.CONFIG_EXCLUDE_ARTICLES_FROM_SORT || "a an the";
359
    if (config_exclude_articles_from_sort){
359
    if (config_exclude_articles_from_sort){
360
        var articles = config_exclude_articles_from_sort.split(" ");
360
        var articles = config_exclude_articles_from_sort.split(" ");
361
        var rpattern = "";
361
        var rpattern = "";
362
- 

Return to bug 25909