LP#1707063: Naive ng-class test for last-column-modified
[working/Evergreen.git] / Open-ILS / web / js / ui / default / staff / services / grid.js
index fc3a05b..15d61f2 100644 (file)
@@ -765,10 +765,16 @@ angular.module('egGridMod',
                     column.flex = 1;
             }
             $scope.modifyColumnFlex = function(col, val) {
-                $scope.lastModColumn = col.name;
+                $scope.lastModColumn = col;
                 grid.modifyColumnFlex(col, val);
             }
 
+            $scope.isLastModifiedColumn = function(col) {
+                if ($scope.lastModColumn)
+                    return $scope.lastModColumn === col;
+                return false;
+            }
+
             grid.modifyColumnPos = function(col, diff) {
                 var srcIdx, targetIdx;
                 angular.forEach(grid.columnsProvider.columns,
@@ -801,7 +807,7 @@ angular.module('egGridMod',
             }
 
             $scope.modifyColumnPos = function(col, diff) {
-                $scope.lastModColumn = col.name;
+                $scope.lastModColumn = col;
                 return grid.modifyColumnPos(col, diff);
             }