From b03d815475934e55d226aa2f88e40cad191f7150 Mon Sep 17 00:00:00 2001 From: erickson Date: Mon, 17 Aug 2009 16:12:49 +0000 Subject: [PATCH] added optional list of fields whose linked display value should not be fetched git-svn-id: svn://svn.open-ils.org/ILS/trunk@13847 dcc99617-32d9-48b4-a31d-7c20da2025e4 --- Open-ILS/web/js/dojo/openils/widget/AutoFieldWidget.js | 5 +++++ Open-ILS/web/js/dojo/openils/widget/AutoGrid.js | 4 +++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/Open-ILS/web/js/dojo/openils/widget/AutoFieldWidget.js b/Open-ILS/web/js/dojo/openils/widget/AutoFieldWidget.js index 569b37ec5..0b4a24213 100644 --- a/Open-ILS/web/js/dojo/openils/widget/AutoFieldWidget.js +++ b/Open-ILS/web/js/dojo/openils/widget/AutoFieldWidget.js @@ -33,6 +33,7 @@ if(!dojo._hasResource['openils.widget.AutoFieldWidget']) { if(this.fmObject) this.fmClass = this.fmObject.classname; this.fmIDL = fieldmapper.IDL.fmclasses[this.fmClass]; + this.suppressLinkedFields = args.suppressLinkedFields || []; if(!this.idlField) { this.fmIDL = fieldmapper.IDL.fmclasses[this.fmClass]; @@ -200,6 +201,10 @@ if(!dojo._hasResource['openils.widget.AutoFieldWidget']) { if(this.idlField.datatype == 'org_unit') return false; // we already handle org_units, no need to re-fetch + // user opted to bypass fetching this linked data + if(this.suppressLinkedFields.indexOf(this.idlField.name) > -1) + return false; + var linkInfo = this._getLinkSelector(); if(!(linkInfo && linkInfo.vfield && linkInfo.vfield.selector)) return false; diff --git a/Open-ILS/web/js/dojo/openils/widget/AutoGrid.js b/Open-ILS/web/js/dojo/openils/widget/AutoGrid.js index f903d7ac6..f57f36a42 100644 --- a/Open-ILS/web/js/dojo/openils/widget/AutoGrid.js +++ b/Open-ILS/web/js/dojo/openils/widget/AutoGrid.js @@ -26,6 +26,7 @@ if(!dojo._hasResource['openils.widget.AutoGrid']) { displayLimit : 15, displayOffset : 0, showPaginator : false, + suppressLinkedFields : null, // list of fields whose linked display data should not be fetched from the server /* by default, don't show auto-generated (sequence) fields */ showSequenceFields : false, @@ -538,7 +539,8 @@ if(!dojo._hasResource['openils.widget.AutoGrid']) { fmClass: this.grid.fmClass, fmField: this.field, widgetValue : val, - readOnly : true + readOnly : true, + suppressLinkedFields : this.grid.suppressLinkedFields }); var _this = this; -- 2.11.0