LP#1472787: fix expansion of wildcard eg-grid-field paths
authorGalen Charlton <gmc@esilibrary.com>
Wed, 8 Jul 2015 21:35:43 +0000 (21:35 +0000)
committerJason Stephenson <jstephenson@mvlc.org>
Wed, 19 Aug 2015 17:39:18 +0000 (13:39 -0400)
This fixes a bug where expansion of wildcard egGridField
paths didn't handle a plain "*" correctly.

To test:

[1] In the web staff client, bring up the list of a patron's
    current loans.  Add the grace period column to the grid,
    but note that the loans' grace period values are not
    actually displayed.
[2] Apply the patch.
[3] Refresh the browser and repeat step 1.  This time, the
    grace period values are displayed.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Signed-off-by: Jason Stephenson <jstephenson@mvlc.org>
Open-ILS/web/js/ui/default/staff/services/grid.js

index a3626e8..e2c1c52 100644 (file)
@@ -1162,7 +1162,7 @@ angular.module('egGridMod',
                         return;
 
                     var col = cols.cloneFromScope(colSpec);
-                    col.path = dotpath + '.' + field.name;
+                    col.path = (dotpath ? dotpath + '.' + field.name : field.name);
                     console.debug('egGrid: field: ' +field.name + '; parent field: ' + js2JSON(idl_field));
                     cols.add(col, false, true, 
                         {idl_parent : idl_field, idl_field : field, idl_class : class_obj});