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

(-)a/koha-tmpl/intranet-tmpl/prog/js/datatables.js (-3 / +10 lines)
Lines 538-550 jQuery.fn.dataTable.ext.errMode = function(settings, note, message) { Link Here
538
                            },
538
                            },
539
                            'dataFilter': function(data, type) {
539
                            'dataFilter': function(data, type) {
540
                                var json = {data: JSON.parse(data)};
540
                                var json = {data: JSON.parse(data)};
541
                                if(total = this._xhr.getResponseHeader('x-total-count')) {
541
                                if (total = this._xhr.getResponseHeader('x-total-count')) {
542
                                    json.recordsTotal = total;
542
                                    json.recordsTotal = total;
543
                                    json.recordsFiltered = total;
543
                                    json.recordsFiltered = total;
544
                                }
544
                                }
545
                                if(total = this._xhr.getResponseHeader('x-base-total-count')) {
545
                                if (total = this._xhr.getResponseHeader('x-base-total-count')) {
546
                                    json.recordsTotal = total;
546
                                    json.recordsTotal = total;
547
                                }
547
                                }
548
                                if (draw = this._xhr.getResponseHeader('x-koha-request-id')) {
549
                                    json.draw = draw;
550
                                }
551
548
                                return JSON.stringify(json);
552
                                return JSON.stringify(json);
549
                            },
553
                            },
550
                            'data': function( data, settings ) {
554
                            'data': function( data, settings ) {
Lines 623-628 jQuery.fn.dataTable.ext.errMode = function(settings, note, message) { Link Here
623
627
624
                                dataSet._match = options.criteria;
628
                                dataSet._match = options.criteria;
625
629
630
                                if ( data["draw"] !== undefined ) {
631
                                    settings.ajax.headers = { 'x-koha-request-id': data.draw }
632
                                }
633
626
                                if(options.columns) {
634
                                if(options.columns) {
627
                                    var order = data.order;
635
                                    var order = data.order;
628
                                    var orderArray = new Array();
636
                                    var orderArray = new Array();
629
- 

Return to bug 30394