From 68263ff80625e2050ced67fa7fe50725908e85d2 Mon Sep 17 00:00:00 2001 From: Brady Wetherington Date: Thu, 16 Jul 2020 15:33:38 -0700 Subject: [PATCH] Changed selectlist results to be 'items' for internal consistency --- app/Http/Transformers/SelectlistTransformer.php | 2 +- resources/assets/js/snipeit.js | 6 +++--- resources/assets/js/snipeit_modals.js | 6 +++--- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/app/Http/Transformers/SelectlistTransformer.php b/app/Http/Transformers/SelectlistTransformer.php index 6377f871b2..f3fd8c3cea 100644 --- a/app/Http/Transformers/SelectlistTransformer.php +++ b/app/Http/Transformers/SelectlistTransformer.php @@ -33,7 +33,7 @@ class SelectlistTransformer } $results = [ - 'results' => $items_array, + 'items' => $items_array, 'pagination' => [ 'more' => ($select_items->currentPage() >= $select_items->lastPage()) ? false : true, diff --git a/resources/assets/js/snipeit.js b/resources/assets/js/snipeit.js index 5f649ab271..5110384297 100755 --- a/resources/assets/js/snipeit.js +++ b/resources/assets/js/snipeit.js @@ -212,19 +212,19 @@ $(document).ready(function () { }; return data; }, - /* processResults: function (data, params) { + processResults: function (data, params) { params.page = params.page || 1; var answer = { results: data.items, pagination: { - more: "true" //(params.page < data.page_count) + more: data.pagination.more } }; return answer; - }, */ + }, cache: true }, escapeMarkup: function (markup) { return markup; }, // let our custom formatter work diff --git a/resources/assets/js/snipeit_modals.js b/resources/assets/js/snipeit_modals.js index 6438543c04..4399a578d4 100644 --- a/resources/assets/js/snipeit_modals.js +++ b/resources/assets/js/snipeit_modals.js @@ -69,19 +69,19 @@ $(function () { }; return data; }, - /* processResults: function (data, params) { + processResults: function (data, params) { params.page = params.page || 1; var answer = { results: data.items, pagination: { - more: "true" //(params.page < data.page_count) + more: data.pagination.more } }; return answer; - }, */ + }, cache: true }, escapeMarkup: function (markup) { return markup; }, // let our custom formatter work