From: Remington Steed Date: Thu, 8 Feb 2018 13:28:53 +0000 (-0500) Subject: LP#1730752 Fix minor bug with move-to-last X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=1f630f2189842cec8949596edd3c2fada4a9c8fc;p=evergreen%2Fmasslnc.git 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 Signed-off-by: Bill Erickson --- 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.