Bugzilla – Attachment 129540 Details for
Bug 29896
Sync the functionality of the datatables api wrapper on the OPAC with the Staff Client equivilent
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 29896: Update datatables wrapper in the OPAC
Bug-29896-Update-datatables-wrapper-in-the-OPAC.patch (text/plain), 2.17 KB, created by
Martin Renvoize (ashimema)
on 2022-01-17 15:46:56 UTC
(
hide
)
Description:
Bug 29896: Update datatables wrapper in the OPAC
Filename:
MIME Type:
Creator:
Martin Renvoize (ashimema)
Created:
2022-01-17 15:46:56 UTC
Size:
2.17 KB
patch
obsolete
>From ac509fba473b3a7d9640bc2bb346ab6b479288a8 Mon Sep 17 00:00:00 2001 >From: Martin Renvoize <martin.renvoize@ptfs-europe.com> >Date: Mon, 17 Jan 2022 15:45:33 +0000 >Subject: [PATCH] Bug 29896: Update datatables wrapper in the OPAC > >This patch updates the datatables api wrapper from 'api' to 'kohaTable' >to match the function of the same intention with the name in the staff >client. >--- > koha-tmpl/opac-tmpl/bootstrap/js/datatables.js | 14 ++++++++++++-- > 1 file changed, 12 insertions(+), 2 deletions(-) > >diff --git a/koha-tmpl/opac-tmpl/bootstrap/js/datatables.js b/koha-tmpl/opac-tmpl/bootstrap/js/datatables.js >index 5d3a543942..6fce10c885 100644 >--- a/koha-tmpl/opac-tmpl/bootstrap/js/datatables.js >+++ b/koha-tmpl/opac-tmpl/bootstrap/js/datatables.js >@@ -144,7 +144,17 @@ jQuery.extend( jQuery.fn.dataTableExt.oSort, { > > (function($) { > >- $.fn.api = function(options, columns_settings, add_filters) { >+ /** >+ * Create a new dataTables instance that uses the Koha RESTful API's as a data source >+ * @param {Object} options Please see the dataTables documentation for further details >+ * We extend the options set with the `criteria` key which allows >+ * the developer to select the match type to be applied during searches >+ * Valid keys are: `contains`, `starts_with`, `ends_with` and `exact` >+ * @param {Object} column_settings The arrayref as returned by TableSettings.GetColums function available >+ * from the columns_settings template toolkit include >+ * @return {Object} The dataTables instance >+ */ >+ $.fn.kohaTable = function(options, columns_settings) { > var settings = null; > if(options) { > if(!options.criteria || ['contains', 'starts_with', 'ends_with', 'exact'].indexOf(options.criteria.toLowerCase()) === -1) options.criteria = 'contains'; >@@ -270,7 +280,7 @@ jQuery.extend( jQuery.fn.dataTableExt.oSort, { > > return newnode.text().replace( /\n/g, ' ' ).trim(); > } >- }; >+ } > > var export_buttons = [ > { >-- >2.20.1
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 29896
: 129540