Lines 562-575
function _dt_default_ajax (params){
Link Here
|
562 |
} |
562 |
} |
563 |
|
563 |
|
564 |
let built_value; |
564 |
let built_value; |
565 |
if ( col.datatype !== undefined ) { |
565 |
let type = col.type; |
566 |
if ( col.datatype == 'date' ) { |
566 |
if ( type === 'date' ) { |
567 |
let rfc3339 = $date_to_rfc3339(value); |
567 |
let rfc3339 = $date_to_rfc3339(value); |
568 |
if ( rfc3339 != 'Invalid Date' ) { |
568 |
if ( rfc3339 != 'Invalid Date' ) { |
569 |
built_value = rfc3339; |
569 |
built_value = rfc3339; |
570 |
} |
|
|
571 |
} |
570 |
} |
572 |
else if (col.datatype == 'related-object') { |
571 |
} |
|
|
572 |
|
573 |
if ( col.datatype !== undefined ) { |
574 |
if (col.datatype == 'related-object') { |
573 |
let query_term = value; |
575 |
let query_term = value; |
574 |
|
576 |
|
575 |
if (criteria != 'exact') { |
577 |
if (criteria != 'exact') { |
Lines 926-940
function _dt_add_filters(table_node, table_dt, filters_options = {}) {
Link Here
|
926 |
|
928 |
|
927 |
/** |
929 |
/** |
928 |
* Create a new dataTables instance that uses the Koha RESTful API's as a data source |
930 |
* Create a new dataTables instance that uses the Koha RESTful API's as a data source |
929 |
* @param {Object} options Please see the dataTables documentation for further details |
931 |
* @param {Object} options Please see the dataTables settings documentation for further |
930 |
* We extend the options set with the `criteria` key which allows |
932 |
* details |
931 |
* the developer to select the match type to be applied during searches |
933 |
* @param {string} [options.criteria=contains] A koha specific extension to the dataTables settings block that |
932 |
* Valid keys are: `contains`, `starts_with`, `ends_with` and `exact` |
934 |
* allows setting the 'comparison operator' used in searches |
933 |
* @param {Object} table_settings The arrayref as returned by TableSettings.GetTableSettings function available |
935 |
* Supports `contains`, `starts_with`, `ends_with` and `exact` match |
934 |
* from the columns_settings template toolkit include |
936 |
* @param {string} [options.columns.*.type Data type the field is stored in so we may impose some additional |
935 |
* @param {Boolean} add_filters Add a filters row as the top row of the table |
937 |
* manipulation to search strings. Supported types are currenlty 'date' |
936 |
* @param {Object} default_filters Add a set of default search filters to apply at table initialisation |
938 |
* @param {Object} table_settings The arrayref as returned by TableSettings.GetTableSettings function |
937 |
* @return {Object} The dataTables instance |
939 |
* available from the columns_settings template toolkit include |
|
|
940 |
* @param {Boolean} add_filters Add a filters row as the top row of the table |
941 |
* @param {Object} default_filters Add a set of default search filters to apply at table initialisation |
942 |
* @return {Object} The dataTables instance |
938 |
*/ |
943 |
*/ |
939 |
$.fn.kohaTable = function(options, table_settings, add_filters, default_filters) { |
944 |
$.fn.kohaTable = function(options, table_settings, add_filters, default_filters) { |
940 |
var settings = null; |
945 |
var settings = null; |
941 |
- |
|
|