From 1f630f2189842cec8949596edd3c2fada4a9c8fc Mon Sep 17 00:00:00 2001
From: Remington Steed <rjs7@calvin.edu>
Date: Thu, 8 Feb 2018 08:28:53 -0500
Subject: [PATCH] LP#1730752 Fix minor bug with move-to-last

If you click "Make last visible" on the column that is already the last
visible, it bumps it down one position when it should not move. This
commit adjusts the logic so that columns that are before or already in
the last-visible slot (thus, '<' or '=') will end up in the last-visible
slot, and columns only go after the last-visible slot if they are
already after it.

Signed-off-by: Remington Steed <rjs7@calvin.edu>
Signed-off-by: Bill Erickson <berickxx@gmail.com>
---
 Open-ILS/web/js/ui/default/staff/services/grid.js | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/Open-ILS/web/js/ui/default/staff/services/grid.js b/Open-ILS/web/js/ui/default/staff/services/grid.js
index 6b70e4bedb..266a972971 100644
--- a/Open-ILS/web/js/ui/default/staff/services/grid.js
+++ b/Open-ILS/web/js/ui/default/staff/services/grid.js
@@ -788,7 +788,7 @@ angular.module('egGridMod',
                     // Otherwise, put it into the slot directly following 
                     // the last visible column.
                     targetIdx = 
-                        srcIdx < lastVisible ? lastVisible : lastVisible + 1;
+                        srcIdx <= lastVisible ? lastVisible : lastVisible + 1;
                 }
 
                 // Splice column out of old position, insert at new position.
-- 
2.11.0