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

(-)a/koha-tmpl/intranet-tmpl/prog/js/datatables.js (-2 / +5 lines)
Lines 587-596 jQuery.fn.dataTable.ext.errMode = function(settings, note, message) { Link Here
587
                                        var part = {};
587
                                        var part = {};
588
                                        var attr = attributes[i];
588
                                        var attr = attributes[i];
589
                                        let criteria = options.criteria;
589
                                        let criteria = options.criteria;
590
                                        if ( value.match(/^\^(.*)\$$/) ) {
590
                                        if ( value !== null && value.match(/^\^(.*)\$$/) ) {
591
                                            value = value.replace(/^\^/, '').replace(/\$$/, '');
591
                                            value = value.replace(/^\^/, '').replace(/\$$/, '');
592
                                            criteria = "exact";
592
                                            criteria = "exact";
593
                                        }
593
                                        }
594
                                        if ( value === 'special:undefined' ) {
595
                                            value = null;
596
                                            criteria = "exact";
597
                                        }
594
                                        part[!attr.includes('.')?'me.'+attr:attr] = criteria === 'exact'
598
                                        part[!attr.includes('.')?'me.'+attr:attr] = criteria === 'exact'
595
                                            ? value
599
                                            ? value
596
                                            : {like: (['contains', 'ends_with'].indexOf(criteria) !== -1?'%':'') + value + (['contains', 'starts_with'].indexOf(criteria) !== -1?'%':'')};
600
                                            : {like: (['contains', 'ends_with'].indexOf(criteria) !== -1?'%':'') + value + (['contains', 'starts_with'].indexOf(criteria) !== -1?'%':'')};
597
- 

Return to bug 31028