From: erickson Date: Mon, 17 Aug 2009 16:12:49 +0000 (+0000) Subject: added optional list of fields whose linked display value should not be fetched X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=b03d815475934e55d226aa2f88e40cad191f7150;p=contrib%2FConifer.git 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 --- diff --git a/Open-ILS/web/js/dojo/openils/widget/AutoFieldWidget.js b/Open-ILS/web/js/dojo/openils/widget/AutoFieldWidget.js index 569b37ec5f..0b4a24213e 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 f903d7ac6e..f57f36a42f 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;