[open-ils-commits] r13847 - trunk/Open-ILS/web/js/dojo/openils/widget (erickson)

svn at svn.open-ils.org svn at svn.open-ils.org
Mon Aug 17 12:12:52 EDT 2009


Author: erickson
Date: 2009-08-17 12:12:49 -0400 (Mon, 17 Aug 2009)
New Revision: 13847

Modified:
   trunk/Open-ILS/web/js/dojo/openils/widget/AutoFieldWidget.js
   trunk/Open-ILS/web/js/dojo/openils/widget/AutoGrid.js
Log:
added optional list of fields whose linked display value should not be fetched

Modified: trunk/Open-ILS/web/js/dojo/openils/widget/AutoFieldWidget.js
===================================================================
--- trunk/Open-ILS/web/js/dojo/openils/widget/AutoFieldWidget.js	2009-08-17 16:12:06 UTC (rev 13846)
+++ trunk/Open-ILS/web/js/dojo/openils/widget/AutoFieldWidget.js	2009-08-17 16:12:49 UTC (rev 13847)
@@ -33,6 +33,7 @@
             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(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;

Modified: trunk/Open-ILS/web/js/dojo/openils/widget/AutoGrid.js
===================================================================
--- trunk/Open-ILS/web/js/dojo/openils/widget/AutoGrid.js	2009-08-17 16:12:06 UTC (rev 13846)
+++ trunk/Open-ILS/web/js/dojo/openils/widget/AutoGrid.js	2009-08-17 16:12:49 UTC (rev 13847)
@@ -26,6 +26,7 @@
             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 @@
             fmClass: this.grid.fmClass,
             fmField: this.field,
             widgetValue : val,
-            readOnly : true
+            readOnly : true,
+            suppressLinkedFields : this.grid.suppressLinkedFields
         });
 
         var _this = this;



More information about the open-ils-commits mailing list