From ddb448c75af33fa5e74683b5663e402c6292d142 Mon Sep 17 00:00:00 2001 From: Mike Rylander Date: Mon, 28 Sep 2015 12:41:13 -0400 Subject: [PATCH] webstaff: fix issue loading egGrid config Grid saveConfig can generate bad data (not sure how) but we will avoid duplicates in loadConfig Signed-off-by: Mike Rylander Signed-off-by: Galen Charlton --- Open-ILS/web/js/ui/default/staff/services/grid.js | 7 ++++++- 1 file changed, 6 insertions(+), 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 66a2bf3908..4e48f93972 100644 --- a/Open-ILS/web/js/ui/default/staff/services/grid.js +++ b/Open-ILS/web/js/ui/default/staff/services/grid.js @@ -450,7 +450,12 @@ angular.module('egGridMod', grid_col.sort = col.sort || 0; // all saved columns are assumed to be true grid_col.visible = true; - new_cols.push(grid_col); + if (new_cols + .filter(function (c) { + return c.name == grid_col.name; + }).length == 0 + ) + new_cols.push(grid_col); }); // columns which are not expressed within the saved -- 2.11.0