Bug 29397: Add function documentation

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
This commit is contained in:
Tomás Cohen Arazi 2021-11-03 14:46:53 -03:00 committed by Fridolin Somers
parent 499c7a0a8d
commit 437e6b1267

View file

@ -58,8 +58,15 @@ function kohaSelect2Transport(params, success, failure) {
$request.fail(failure);
}
/* wrapper that nests paging information into the results object for use with koha REST apis */
(function($) {
/**
* Create a new Select2 instance that uses the Koha RESTful API response headers to
* read pagination information
* @param {Object} config Please see the Select2 documentation for further details
* @return {Object} The Select2 instance
*/
$.fn.kohaSelect = function(config) {
if (config.hasOwnProperty('ajax')) {
config.ajax.transport = function(params, success, failure) {