From bc0370eb4476a2e8f841ce1ada8309c29abeb62e Mon Sep 17 00:00:00 2001 From: Bill Erickson Date: Fri, 8 Mar 2019 12:30:26 -0500 Subject: [PATCH] LP1819179 IDL2js includes 'map' attribute data Patch from Mike Rylander to teach the IDL2js generator to include 'map' attributes, which allow JS clients to step through mapped, linked fields, particuarly useful for auto-fleshing these fields. Signed-off-by: Bill Erickson --- Open-ILS/src/eg2/src/app/core/pcrud.service.ts | 7 +++++-- Open-ILS/xsl/fm_IDL2js.xsl | 2 +- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/Open-ILS/src/eg2/src/app/core/pcrud.service.ts b/Open-ILS/src/eg2/src/app/core/pcrud.service.ts index f023b6d2f5..b3d4288a53 100644 --- a/Open-ILS/src/eg2/src/app/core/pcrud.service.ts +++ b/Open-ILS/src/eg2/src/app/core/pcrud.service.ts @@ -104,8 +104,11 @@ export class PcrudContext { } this.idl.classes[fmClass].fields - .filter(f => f.datatype === 'link' && !f.virtual) - .forEach(field => { + .filter(f => + f.datatype === 'link' && ( + f.reltype === 'has_a' || f.reltype === 'might_have' + ) + ).forEach(field => { const selector = this.idl.getLinkSelector(fmClass, field.name); if (!selector) { return; } diff --git a/Open-ILS/xsl/fm_IDL2js.xsl b/Open-ILS/xsl/fm_IDL2js.xsl index 6c7709f811..aeb4573f48 100644 --- a/Open-ILS/xsl/fm_IDL2js.xsl +++ b/Open-ILS/xsl/fm_IDL2js.xsl @@ -58,7 +58,7 @@ for (var c in _preload_fieldmapper_IDL) { type:"link",, -key:"","class":"",reltype:"" +map:"",key:"","class":"",reltype:"" -- 2.11.0