From bd39236d1f11e082e267cf79eb3a5c268e51b67c Mon Sep 17 00:00:00 2001 From: Adam Bowling Date: Fri, 6 Aug 2021 14:33:01 -0400 Subject: [PATCH] Updates sorting to display records in the order they were submitted to the page. Signed-off-by: Adam Bowling --- Open-ILS/web/js/ui/default/staff/cat/printlabels/app.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Open-ILS/web/js/ui/default/staff/cat/printlabels/app.js b/Open-ILS/web/js/ui/default/staff/cat/printlabels/app.js index 6c57b7867c..e8803e0c65 100644 --- a/Open-ILS/web/js/ui/default/staff/cat/printlabels/app.js +++ b/Open-ILS/web/js/ui/default/staff/cat/printlabels/app.js @@ -290,6 +290,7 @@ function ($scope, $q, $window, $routeParams, $location, $timeout, egCore, egNet, $q.all(promises2).then(function () { // today, staff, current_location, etc. + $scope.preview_scope.copies.sort((a, b) => (data.copies.indexOf(a.id) > data.copies.indexOf(b.id)) ? 1 : ((data.copies.indexOf(b.id) > data.copies.indexOf(a.id)) ? -1 : 0)); egCore.print.fleshPrintScope($scope.preview_scope); $scope.template_changed(); // load the default $scope.rebuild_cn_set(); @@ -927,4 +928,4 @@ function getPrintLabelOutputClass(index, settings) { function getPrintLabelStyle(index, settings) { return index > 0 && (index % settings.page.label.set.size === 0) ? settings.page.label.gap.size : ""; -} \ No newline at end of file +} -- 2.11.0