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

(-)a/koha-tmpl/opac-tmpl/bootstrap/js/datatables.js (-3 / +12 lines)
Lines 144-150 jQuery.extend( jQuery.fn.dataTableExt.oSort, { Link Here
144
144
145
(function($) {
145
(function($) {
146
146
147
    $.fn.api = function(options, columns_settings, add_filters) {
147
    /**
148
    * Create a new dataTables instance that uses the Koha RESTful API's as a data source
149
    * @param  {Object}  options         Please see the dataTables documentation for further details
150
    *                                   We extend the options set with the `criteria` key which allows
151
    *                                   the developer to select the match type to be applied during searches
152
    *                                   Valid keys are: `contains`, `starts_with`, `ends_with` and `exact`
153
    * @param  {Object}  column_settings The arrayref as returned by TableSettings.GetColums function available
154
    *                                   from the columns_settings template toolkit include
155
    * @return {Object}                  The dataTables instance
156
    */
157
    $.fn.kohaTable = function(options, columns_settings) {
148
        var settings = null;
158
        var settings = null;
149
        if(options) {
159
        if(options) {
150
            if(!options.criteria || ['contains', 'starts_with', 'ends_with', 'exact'].indexOf(options.criteria.toLowerCase()) === -1) options.criteria = 'contains';
160
            if(!options.criteria || ['contains', 'starts_with', 'ends_with', 'exact'].indexOf(options.criteria.toLowerCase()) === -1) options.criteria = 'contains';
Lines 270-276 jQuery.extend( jQuery.fn.dataTableExt.oSort, { Link Here
270
280
271
                return newnode.text().replace( /\n/g, ' ' ).trim();
281
                return newnode.text().replace( /\n/g, ' ' ).trim();
272
            }
282
            }
273
        };
283
        }
274
284
275
        var export_buttons = [
285
        var export_buttons = [
276
            {
286
            {
277
- 

Return to bug 29896