From 07bf5f285a4fdbb309cad49e6b98af36ab3927bc Mon Sep 17 00:00:00 2001 From: Mike Rylander Date: Tue, 11 Nov 2014 13:25:25 -0500 Subject: [PATCH] Sort by class, and keep columns from one class together Signed-off-by: Mike Rylander Signed-off-by: Kathy Lussier --- Open-ILS/src/templates/staff/share/t_autogrid.tt2 | 2 +- Open-ILS/web/js/ui/default/staff/services/grid.js | 26 +++++++++++------------ 2 files changed, 14 insertions(+), 14 deletions(-) diff --git a/Open-ILS/src/templates/staff/share/t_autogrid.tt2 b/Open-ILS/src/templates/staff/share/t_autogrid.tt2 index 12299c5d77..36cb85fb2b 100644 --- a/Open-ILS/src/templates/staff/share/t_autogrid.tt2 +++ b/Open-ILS/src/templates/staff/share/t_autogrid.tt2 @@ -159,7 +159,7 @@
  • - + b.idlclass ? 1 : -1; + } + if (a.path && b.path) { + return a.path < b.path ? -1 : 1; + return a.path > b.path ? 1 : -1; + } + return a.label < b.label ? -1 : 1; } ); @@ -1144,19 +1153,10 @@ angular.module('egGridMod', if (!column.label) { column.label = idl_info.idl_field.label || column.name; - /* - // append class label to column label to better differentiate - // columns in the selector. - // Disabled for now, since it results in columns w/ really - // long names, making the grid unappealing when any of - // these colmns are selected. - // TODO: consider nesting the colum picker by class? - if (fromExpand) { - var label = - idl_info.idl_class.label || idl_info.idl_class.name; - column.label = label + '::' + column.label; - } - */ + } + + if (fromExpand && idl_info.idl_class) { + column.idlclass = idl_info.idl_class.label || idl_info.idl_class.name; } }, -- 2.11.0