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)
committerMike Rylander <mrylander@gmail.com>
Tue, 18 Aug 2015 15:33:02 +0000 (11:33 -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: Mike Rylander <mrylander@gmail.com>
Open-ILS/web/js/ui/default/staff/services/grid.js

index ccb9b40..27ebb98 100644 (file)
@@ -1116,7 +1116,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});