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 ) { |