From d26ece239b3e0b703b44bc0f6b23711d4daf9fb4 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 Signed-off-by: Dan Wells --- 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 f023b6d..b3d4288 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 6c7709f..aeb4573 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:"" -- 1.7.2.5