Lines 1029-1036
function _dt_save_restore_state(table_settings, external_filter_nodes={}){
Link Here
|
1029 |
* @param {Object} default_filters Add a set of default search filters to apply at table initialisation |
1029 |
* @param {Object} default_filters Add a set of default search filters to apply at table initialisation |
1030 |
* @return {Object} The dataTables instance |
1030 |
* @return {Object} The dataTables instance |
1031 |
*/ |
1031 |
*/ |
1032 |
$.fn.kohaTable = function(options, table_settings, add_filters, default_filters, filters_options, external_filter_nodes) { |
1032 |
$.fn.kohaTable = function(options={}, table_settings, add_filters, default_filters, filters_options, external_filter_nodes) { |
1033 |
var settings = null; |
|
|
1034 |
|
1033 |
|
1035 |
// Early return if the node does not exist |
1034 |
// Early return if the node does not exist |
1036 |
if (!this.length) return; |
1035 |
if (!this.length) return; |
Lines 1055-1071
function _dt_save_restore_state(table_settings, external_filter_nodes={}){
Link Here
|
1055 |
options.processing = true; |
1054 |
options.processing = true; |
1056 |
options.pagingType = "full_numbers"; |
1055 |
options.pagingType = "full_numbers"; |
1057 |
} |
1056 |
} |
1058 |
|
|
|
1059 |
settings = $.extend(true, {}, dataTablesDefaults, { |
1060 |
"paging": true, |
1061 |
'searching': true, |
1062 |
'language': { |
1063 |
'emptyTable': (options.emptyTable) ? options.emptyTable : __("No data available in table") |
1064 |
}, |
1065 |
}, options); |
1066 |
|
1067 |
} |
1057 |
} |
1068 |
|
1058 |
|
|
|
1059 |
var settings = $.extend(true, {}, dataTablesDefaults, { |
1060 |
"paging": true, |
1061 |
'searching': true, |
1062 |
'language': { |
1063 |
'emptyTable': (options.emptyTable) ? options.emptyTable : __("No data available in table") |
1064 |
}, |
1065 |
}, options); |
1066 |
|
1069 |
settings["buttons"] = _dt_buttons({settings, table_settings}); |
1067 |
settings["buttons"] = _dt_buttons({settings, table_settings}); |
1070 |
|
1068 |
|
1071 |
if ( add_filters ) { |
1069 |
if ( add_filters ) { |