From: Mike Rylander Date: Tue, 11 Nov 2014 18:25:25 +0000 (-0500) Subject: LP#1402797 Sort by class, and keep columns from one class together X-Git-Tag: sprint4-merge-nov22~1680 X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=354ada2cf8af416d9634a09cc81922a5ca052f30;p=working%2FEvergreen.git LP#1402797 Sort by class, and keep columns from one class together Signed-off-by: Mike Rylander Signed-off-by: Kathy Lussier --- 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; } },