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

(-)a/koha-tmpl/intranet-tmpl/prog/js/datatables.js (-11 / +9 lines)
Lines 1011-1018 function _dt_save_restore_state(table_settings, external_filter_nodes={}){ Link Here
1011
    * @param  {Object}  default_filters              Add a set of default search filters to apply at table initialisation
1011
    * @param  {Object}  default_filters              Add a set of default search filters to apply at table initialisation
1012
    * @return {Object}                               The dataTables instance
1012
    * @return {Object}                               The dataTables instance
1013
    */
1013
    */
1014
    $.fn.kohaTable = function(options, table_settings, add_filters, default_filters, filters_options, external_filter_nodes) {
1014
    $.fn.kohaTable = function(options={}, table_settings, add_filters, default_filters, filters_options, external_filter_nodes) {
1015
        var settings = null;
1016
1015
1017
        // Early return if the node does not exist
1016
        // Early return if the node does not exist
1018
        if (!this.length) return;
1017
        if (!this.length) return;
Lines 1037-1053 function _dt_save_restore_state(table_settings, external_filter_nodes={}){ Link Here
1037
                options.processing = true;
1036
                options.processing = true;
1038
                options.pagingType = "full_numbers";
1037
                options.pagingType = "full_numbers";
1039
            }
1038
            }
1040
1041
            settings = $.extend(true, {}, dataTablesDefaults, {
1042
                        "paging": true,
1043
                        'searching': true,
1044
                        'language': {
1045
                            'emptyTable': (options.emptyTable) ? options.emptyTable : __("No data available in table")
1046
                        },
1047
                    }, options);
1048
1049
        }
1039
        }
1050
1040
1041
        var settings = $.extend(true, {}, dataTablesDefaults, {
1042
                    "paging": true,
1043
                    'searching': true,
1044
                    'language': {
1045
                        'emptyTable': (options.emptyTable) ? options.emptyTable : __("No data available in table")
1046
                    },
1047
                }, options);
1048
1051
        settings["buttons"] = _dt_buttons({settings, table_settings});
1049
        settings["buttons"] = _dt_buttons({settings, table_settings});
1052
1050
1053
        if ( add_filters ) {
1051
        if ( add_filters ) {
(-)a/koha-tmpl/opac-tmpl/bootstrap/js/datatables.js (-12 / +9 lines)
Lines 275-282 function _dt_visibility(table_settings, table_dt){ Link Here
275
    *                                                available from the columns_settings template toolkit include
275
    *                                                available from the columns_settings template toolkit include
276
    * @return {Object}                               The dataTables instance
276
    * @return {Object}                               The dataTables instance
277
    */
277
    */
278
    $.fn.kohaTable = function(options, table_settings){
278
    $.fn.kohaTable = function(options={}, table_settings=undefined){
279
        var settings = null;
280
279
281
        // Early return if the node does not exist
280
        // Early return if the node does not exist
282
        if (!this.length) return;
281
        if (!this.length) return;
Lines 290-306 function _dt_visibility(table_settings, table_dt){ Link Here
290
                    dataTablesDefaults.initComplete(settings, json)
289
                    dataTablesDefaults.initComplete(settings, json)
291
                };
290
                };
292
            }
291
            }
293
294
            settings = $.extend(true, {}, dataTablesDefaults, {
295
                        "paging": true,
296
                        'searching': true,
297
                        'language': {
298
                            'emptyTable': (options.emptyTable) ? options.emptyTable : __("No data available in table")
299
                        },
300
                    }, options);
301
302
        }
292
        }
303
293
294
        var settings = $.extend(true, {}, dataTablesDefaults, {
295
                    "paging": true,
296
                    'searching': true,
297
                    'language': {
298
                        'emptyTable': (options.emptyTable) ? options.emptyTable : __("No data available in table")
299
                    },
300
                }, options);
301
304
        settings["buttons"] = _dt_buttons({settings, table_settings});
302
        settings["buttons"] = _dt_buttons({settings, table_settings});
305
303
306
        if ( table_settings ) {
304
        if ( table_settings ) {
307
- 

Return to bug 38255