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:
parent
499c7a0a8d
commit
437e6b1267
1 changed files with 8 additions and 1 deletions
|
@ -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) {
|
||||
|
|
Loading…
Reference in a new issue