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

(-)a/koha-tmpl/intranet-tmpl/prog/en/includes/datatables.inc (-24 lines)
Lines 2-29 Link Here
2
[% USE Asset %]
2
[% USE Asset %]
3
[% INCLUDE 'format_price.inc' %]
3
[% INCLUDE 'format_price.inc' %]
4
[% Asset.js("lib/datatables/datatables.min.js") | $raw %]
4
[% Asset.js("lib/datatables/datatables.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_ALL = _("All");
20
    var CONFIG_EXCLUDE_ARTICLES_FROM_SORT = _("a an the");
21
    var MSG_DT_COPY_TITLE = _("Copy to clipboard");
22
    var MSG_DT_COPY_KEYS = _("Press ctrl or ⌘ + C to copy the table data<br>to your system clipboard.<br><br>To cancel, click this message or press escape.");
23
    var MSG_DT_COPY_SUCCESS_ONE = _("Copied one row to clipboard");
24
    var MSG_DT_COPY_SUCCESS_X = _("Copied %d rows to clipboard");
25
    var MSG_CLEAR_FILTER = _("Clear filter");
26
    var MSG_ACTIVATE_FILTERS = _("Activate filters");
27
    var MSG_DEACTIVATE_FILTERS = _("Deactivate filters");
28
</script>
29
[% Asset.js("js/datatables.js") | $raw %]
5
[% Asset.js("js/datatables.js") | $raw %]
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt (-1 lines)
Lines 1031-1037 Link Here
1031
        var ClaimReturnedLostValue = "[% Koha.Preference('ClaimReturnedLostValue') | html %]";
1031
        var ClaimReturnedLostValue = "[% Koha.Preference('ClaimReturnedLostValue') | html %]";
1032
        var ClaimReturnedChargeFee = "[% Koha.Preference('ClaimReturnedChargeFee') | html %]";
1032
        var ClaimReturnedChargeFee = "[% Koha.Preference('ClaimReturnedChargeFee') | html %]";
1033
        var ClaimReturnedWarningThreshold = "[% Koha.Preference('ClaimReturnedWarningThreshold') | html %]";
1033
        var ClaimReturnedWarningThreshold = "[% Koha.Preference('ClaimReturnedWarningThreshold') | html %]";
1034
        var MSG_DT_LOADING_RECORDS = _("Loading... you may continue scanning.");
1035
        var interface = "[% interface | html %]";
1034
        var interface = "[% interface | html %]";
1036
        var theme = "[% theme | html %]";
1035
        var theme = "[% theme | html %]";
1037
        var borrowernumber = "[% patron.borrowernumber | html %]";
1036
        var borrowernumber = "[% patron.borrowernumber | html %]";
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/quotes.tt (-17 / +1 lines)
Lines 90-112 Link Here
90
                                        { "sWidth": "75%" },
90
                                        { "sWidth": "75%" },
91
                                        { "sWidth": "11%" },
91
                                        { "sWidth": "11%" },
92
                                      ],
92
                                      ],
93
               "oLanguage"          : {
93
               "oLanguage": dataTablesDefaults.oLanguage,
94
                                        "oPaginate": {
95
                                                       "sFirst": MSG_DT_FIRST,
96
                                                       "sLast": MSG_DT_LAST,
97
                                                       "sNext": MSG_DT_NEXT,
98
                                                       "sPrevious": MSG_DT_PREVIOUS,
99
                                                     },
100
                                        "sEmptyTable": MSG_DT_EMPTY_TABLE,
101
                                        "sInfo": MSG_DT_INFO,
102
                                        "sInfoEmpty": MSG_DT_INFO_EMPTY,
103
                                        "sInfoFiltered": MSG_DT_INFO_FILTERED,
104
                                        "sLengthMenu": MSG_DT_LENGTH_MENU,
105
                                        "sLoadingRecords": MSG_DT_LOADING_RECORDS,
106
                                        "sProcessing": MSG_DT_PROCESSING,
107
                                        "sSearch": MSG_DT_SEARCH,
108
                                        "sZeroRecords": MSG_DT_ZERO_RECORDS,
109
                                      },
110
               "fnPreDrawCallback": function(oSettings) {
94
               "fnPreDrawCallback": function(oSettings) {
111
                    return true;
95
                    return true;
112
                },
96
                },
(-)a/koha-tmpl/intranet-tmpl/prog/js/checkouts.js (-2 / +3 lines)
Lines 233-242 $(document).ready(function() { Link Here
233
        $('#issues-table').show();
233
        $('#issues-table').show();
234
        $('#issues-table-actions').show();
234
        $('#issues-table-actions').show();
235
235
236
        var msg_loading = __('Loading... you may continue scanning.');
236
        issuesTable = KohaTable("issues-table", {
237
        issuesTable = KohaTable("issues-table", {
237
            "oLanguage": {
238
            "oLanguage": {
238
                "sEmptyTable" : MSG_DT_LOADING_RECORDS,
239
                "sEmptyTable" : msg_loading,
239
                "sProcessing": MSG_DT_LOADING_RECORDS,
240
                "sProcessing": msg_loading,
240
            },
241
            },
241
            "bAutoWidth": false,
242
            "bAutoWidth": false,
242
            "dom": 'B<"clearfix">rt',
243
            "dom": 'B<"clearfix">rt',
(-)a/koha-tmpl/intranet-tmpl/prog/js/datatables.js (-23 / +23 lines)
Lines 1-6 Link Here
1
// These default options are for translation but can be used
1
// These default options are for translation but can be used
2
// for any other datatables settings
2
// for any other datatables settings
3
// MSG_DT_* variables comes from datatables.inc
4
// To use it, write:
3
// To use it, write:
5
//  $("#table_id").dataTable($.extend(true, {}, dataTableDefaults, {
4
//  $("#table_id").dataTable($.extend(true, {}, dataTableDefaults, {
6
//      // other settings
5
//      // other settings
Lines 8-33 Link Here
8
var dataTablesDefaults = {
7
var dataTablesDefaults = {
9
    "oLanguage": {
8
    "oLanguage": {
10
        "oPaginate": {
9
        "oPaginate": {
11
            "sFirst"    : window.MSG_DT_FIRST || "First",
10
            "sFirst"    : __('First'),
12
            "sLast"     : window.MSG_DT_LAST || "Last",
11
            "sLast"     : __('Last'),
13
            "sNext"     : window.MSG_DT_NEXT || "Next",
12
            "sNext"     : __('Next'),
14
            "sPrevious" : window.MSG_DT_PREVIOUS || "Previous"
13
            "sPrevious" : __('Previous'),
15
        },
14
        },
16
        "sEmptyTable"       : window.MSG_DT_EMPTY_TABLE || "No data available in table",
15
        "sEmptyTable"       : __('No data available in table'),
17
        "sInfo"             : window.MSG_DT_INFO || "Showing _START_ to _END_ of _TOTAL_ entries",
16
        "sInfo"             : __('Showing _START_ to _END_ of _TOTAL_ entries'),
18
        "sInfoEmpty"        : window.MSG_DT_INFO_EMPTY || "No entries to show",
17
        "sInfoEmpty"        : __('No entries to show'),
19
        "sInfoFiltered"     : window.MSG_DT_INFO_FILTERED || "(filtered from _MAX_ total entries)",
18
        "sInfoFiltered"     : __('(filtered from _MAX_ total entries)'),
20
        "sLengthMenu"       : window.MSG_DT_LENGTH_MENU || "Show _MENU_ entries",
19
        "sLengthMenu"       : __('Show _MENU_ entries'),
21
        "sLoadingRecords"   : window.MSG_DT_LOADING_RECORDS || "Loading...",
20
        "sLoadingRecords"   : __('Loading...'),
22
        "sProcessing"       : window.MSG_DT_PROCESSING || "Processing...",
21
        "sProcessing"       : __('Processing...'),
23
        "sSearch"           : window.MSG_DT_SEARCH || "Search:",
22
        "sSearch"           : __('Search:'),
24
        "sZeroRecords"      : window.MSG_DT_ZERO_RECORDS || "No matching records found",
23
        "sZeroRecords"      : __('No matching records found'),
25
        buttons: {
24
        buttons: {
26
            "copyTitle"     : window.MSG_DT_COPY_TITLE || "Copy to clipboard",
25
            "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.",
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.'),
28
            "copySuccess": {
27
            "copySuccess": {
29
                _: window.MSG_DT_COPY_SUCCESS_X || "Copied %d rows to clipboard",
28
                _: __('Copied %d rows to clipboard'),
30
                1: window.MSG_DT_COPY_SUCCESS_ONE || "Copied one row to clipboard"
29
                1: __('Copied one row to clipboard'),
31
            }
30
            }
32
        }
31
        }
33
    },
32
    },
Lines 35-43 var dataTablesDefaults = { Link Here
35
    "buttons": [{
34
    "buttons": [{
36
        fade: 100,
35
        fade: 100,
37
        className: "dt_button_clear_filter",
36
        className: "dt_button_clear_filter",
38
        titleAttr: MSG_CLEAR_FILTER,
37
        titleAttr: __('Clear filter'),
39
        enabled: false,
38
        enabled: false,
40
        text: '<i class="fa fa-lg fa-remove"></i> <span class="dt-button-text">' + MSG_CLEAR_FILTER + '</span>',
39
        text: '<i class="fa fa-lg fa-remove"></i> <span class="dt-button-text">' + __('Clear filter') + '</span>',
41
        available: function ( dt ) {
40
        available: function ( dt ) {
42
            // 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
43
            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 49-55 var dataTablesDefaults = { Link Here
49
            node.addClass("disabled");
48
            node.addClass("disabled");
50
        }
49
        }
51
    }],
50
    }],
52
    "aLengthMenu": [[10, 20, 50, 100, -1], [10, 20, 50, 100, window.MSG_DT_ALL || "All"]],
51
    "aLengthMenu": [[10, 20, 50, 100, -1], [10, 20, 50, 100, __('All')]],
53
    "iDisplayLength": 20,
52
    "iDisplayLength": 20,
54
    initComplete: function( settings) {
53
    initComplete: function( settings) {
55
        var tableId = settings.nTable.id
54
        var tableId = settings.nTable.id
Lines 356-363 jQuery.extend( jQuery.fn.dataTableExt.oSort, { Link Here
356
     * from a configuration file (in English, "a," "an," and "the")
355
     * from a configuration file (in English, "a," "an," and "the")
357
     */
356
     */
358
357
359
    if(CONFIG_EXCLUDE_ARTICLES_FROM_SORT){
358
    var config_exclude_articles_from_sort = __('a an the');
360
        var articles = CONFIG_EXCLUDE_ARTICLES_FROM_SORT.split(" ");
359
    if (config_exclude_articles_from_sort){
360
        var articles = config_exclude_articles_from_sort.split(" ");
361
        var rpattern = "";
361
        var rpattern = "";
362
        for(i=0;i<articles.length;i++){
362
        for(i=0;i<articles.length;i++){
363
            rpattern += "^" + articles[i] + " ";
363
            rpattern += "^" + articles[i] + " ";
(-)a/koha-tmpl/intranet-tmpl/prog/js/letter.js (-2 / +2 lines)
Lines 1-7 Link Here
1
/* Variables defined in letter.tt: */
1
/* Variables defined in letter.tt: */
2
/* global _ module add_form copy_form no_op_set MSG_EMPTY_TITLE_AND_CONTENT MSG_EMPTY_TEMPLATES code MSG_CODE_EXISTS MSG_CODE_EXISTS_FOR_LIBRARY MSG_DT_LOADING_RECORDS MSG_NO_NOTICE_FOUND interface theme KohaTable columns_settings */
2
/* global _ module add_form copy_form no_op_set MSG_EMPTY_TITLE_AND_CONTENT MSG_EMPTY_TEMPLATES code MSG_CODE_EXISTS MSG_CODE_EXISTS_FOR_LIBRARY MSG_NO_NOTICE_FOUND interface theme KohaTable columns_settings */
3
3
4
var modal_loading = "<div id=\"loading\"><img src=\"" + interface + "/" + theme + "/img/spinner-small.gif\" alt=\"\" /> "+ MSG_DT_LOADING_RECORDS +"</div>";
4
var modal_loading = "<div id=\"loading\"><img src=\"" + interface + "/" + theme + "/img/spinner-small.gif\" alt=\"\" /> "+ __('Loading...') +"</div>";
5
5
6
var editing = 0;
6
var editing = 0;
7
if( add_form == 1 && code !== '' ){
7
if( add_form == 1 && code !== '' ){
(-)a/koha-tmpl/intranet-tmpl/prog/js/table_filters.js (-3 / +2 lines)
Lines 23-29 function activate_filters(id) { Link Here
23
    }
23
    }
24
24
25
    $('#' + id + '_activate_filters')
25
    $('#' + id + '_activate_filters')
26
        .html('<i class="fa fa-filter"></i> ' + MSG_DEACTIVATE_FILTERS )
26
        .html('<i class="fa fa-filter"></i> ' + __('Deactivate filters') )
27
        .unbind('click')
27
        .unbind('click')
28
        .click(function() {
28
        .click(function() {
29
            deactivate_filters(id);
29
            deactivate_filters(id);
Lines 41-47 function deactivate_filters(id) { Link Here
41
    filters_row.hide();
41
    filters_row.hide();
42
42
43
    $('#' + id + '_activate_filters')
43
    $('#' + id + '_activate_filters')
44
        .html('<i class="fa fa-filter"></i> ' + MSG_ACTIVATE_FILTERS )
44
        .html('<i class="fa fa-filter"></i> ' + __('Activate filters') )
45
        .unbind('click')
45
        .unbind('click')
46
        .click(function() {
46
        .click(function() {
47
            activate_filters(id);
47
            activate_filters(id);
48
- 

Return to bug 24662