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

(-)a/koha-tmpl/opac-tmpl/bootstrap/en/includes/datatables.inc (-22 lines)
Lines 2-27 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
[% Asset.js("lib/jquery/plugins/dataTables.responsive.min.js") | $raw %]
4
[% Asset.js("lib/jquery/plugins/dataTables.responsive.min.js") | $raw %]
5
<script>
6
    var MSG_DT_FIRST = _("First");
7
    var MSG_DT_LAST = _("Last");
8
    var MSG_DT_NEXT = _("Next");
9
    var MSG_DT_PREVIOUS = _("Previous");
10
    var MSG_DT_EMPTY_TABLE = _("No data available in table");
11
    var MSG_DT_INFO = _("Showing _START_ to _END_ of _TOTAL_");
12
    var MSG_DT_INFO_EMPTY = _("No entries to show");
13
    var MSG_DT_INFO_FILTERED = _("(filtered from _MAX_ total entries)");
14
    var MSG_DT_LENGTH_MENU = _("Show _MENU_ entries");
15
    var MSG_DT_LOADING_RECORDS = _("Loading...");
16
    var MSG_DT_PROCESSING = _("Processing...");
17
    var MSG_DT_SEARCH = _("Search:");
18
    var MSG_DT_ZERO_RECORDS = _("No matching records found");
19
    var MSG_DT_COPY_TO_CLIPBOARD = _("Copy to clipboard");
20
    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.");
21
    var MSG_DT_COPIED_ROWS = _("Copied %d rows to clipboard");
22
    var MSG_DT_COPIED_ONE_ROW = _("Copied one row to clipboard");
23
    var MSG_CLEAR_FILTER = _("Clear filter");
24
    var MSG_DT_ALL = _("All");
25
    var CONFIG_EXCLUDE_ARTICLES_FROM_SORT = _("a an the");
26
</script>
27
[% Asset.js("js/datatables.js") | $raw %]
5
[% Asset.js("js/datatables.js") | $raw %]
(-)a/koha-tmpl/opac-tmpl/bootstrap/js/datatables.js (-21 / +20 lines)
Lines 8-33 Link Here
8
var dataTablesDefaults = {
8
var dataTablesDefaults = {
9
    "language": {
9
    "language": {
10
        "paginate": {
10
        "paginate": {
11
            "first"    : window.MSG_DT_FIRST || "First",
11
            "first"    : __("First"),
12
            "last"     : window.MSG_DT_LAST || "Last",
12
            "last"     : __("Last"),
13
            "next"     : window.MSG_DT_NEXT || "Next",
13
            "next"     : __("Next"),
14
            "previous" : window.MSG_DT_PREVIOUS || "Previous"
14
            "previous" : __("Previous")
15
        },
15
        },
16
        "emptyTable"       : window.MSG_DT_EMPTY_TABLE || "No data available in table",
16
        "emptyTable"       : __("No data available in table"),
17
        "info"             : window.MSG_DT_INFO || "Showing _START_ to _END_ of _TOTAL_ entries",
17
        "info"             : __("Showing _START_ to _END_ of _TOTAL_ entries"),
18
        "infoEmpty"        : window.MSG_DT_INFO_EMPTY || "No entries to show",
18
        "infoEmpty"        : __("No entries to show"),
19
        "infoFiltered"     : window.MSG_DT_INFO_FILTERED || "(filtered from _MAX_ total entries)",
19
        "infoFiltered"     : __("(filtered from _MAX_ total entries)"),
20
        "lengthMenu"       : window.MSG_DT_LENGTH_MENU || "Show _MENU_ entries",
20
        "lengthMenu"       : __("Show _MENU_ entries"),
21
        "loadingRecords"   : window.MSG_DT_LOADING_RECORDS || "Loading...",
21
        "loadingRecords"   : __("Loading..."),
22
        "processing"       : window.MSG_DT_PROCESSING || "Processing...",
22
        "processing"       : __("Processing..."),
23
        "search"           : window.MSG_DT_SEARCH || "Search:",
23
        "search"           : __("Search:"),
24
        "zeroRecords"      : window.MSG_DT_ZERO_RECORDS || "No matching records found",
24
        "zeroRecords"      : __("No matching records found"),
25
        buttons: {
25
        buttons: {
26
            "copyTitle"     : window.MSG_DT_COPY_TO_CLIPBOARD || "Copy to clipboard",
26
            "copyTitle"     : __("Copy to clipboard"),
27
            "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
            "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."),
28
            "copySuccess": {
28
            "copySuccess": {
29
                _: window.MSG_DT_COPIED_ROWS || "Copied %d rows to clipboard",
29
                _: __("Copied %d rows to clipboard"),
30
                1: window.MSG_DT_COPIED_ONE_ROW || "Copied one row to clipboard",
30
                1: __("Copied one row to clipboard"),
31
            },
31
            },
32
            "print": __("Print")
32
            "print": __("Print")
33
        }
33
        }
Lines 55-63 var dataTablesDefaults = { Link Here
55
$.fn.dataTable.ext.buttons.clearFilter = {
55
$.fn.dataTable.ext.buttons.clearFilter = {
56
    fade: 100,
56
    fade: 100,
57
    className: "dt_button_clear_filter",
57
    className: "dt_button_clear_filter",
58
    titleAttr: window.MSG_CLEAR_FILTER,
58
    titleAttr: __("Clear filter"),
59
    enabled: false,
59
    enabled: false,
60
    text: '<i class="fa fa-lg fa-times"></i> <span class="dt-button-text">' + window.MSG_CLEAR_FILTER + '</span>',
60
    text: '<i class="fa fa-lg fa-times"></i> <span class="dt-button-text">' + __("Clear filter") + '</span>',
61
    available: function ( dt ) {
61
    available: function ( dt ) {
62
        // The "clear filter" button is made available if this test returns true
62
        // The "clear filter" button is made available if this test returns true
63
        if( dt.settings()[0].aanFeatures.f ){ // aanFeatures.f is null if there is no search form
63
        if( dt.settings()[0].aanFeatures.f ){ // aanFeatures.f is null if there is no search form
Lines 85-91 $.fn.dataTable.ext.buttons.clearFilter = { Link Here
85
     * from a configuration file (in English, "a," "an," and "the")
85
     * from a configuration file (in English, "a," "an," and "the")
86
     */
86
     */
87
87
88
    var config_exclude_articles_from_sort = window.CONFIG_EXCLUDE_ARTICLES_FROM_SORT || "a an the";
88
    var config_exclude_articles_from_sort = __("a an the");
89
    if (config_exclude_articles_from_sort){
89
    if (config_exclude_articles_from_sort){
90
        var articles = config_exclude_articles_from_sort.split(" ");
90
        var articles = config_exclude_articles_from_sort.split(" ");
91
        var rpattern = "";
91
        var rpattern = "";
92
- 

Return to bug 33983