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

svn at svn.open-ils.org svn at svn.open-ils.org
Sun May 10 21:11:00 EDT 2009


Author: erickson
Date: 2009-05-10 21:10:59 -0400 (Sun, 10 May 2009)
New Revision: 13117

Modified:
   trunk/Open-ILS/web/js/dojo/openils/widget/AutoGrid.js
Log:
if a sequence field is explicitly requested in the field order, honor it

Modified: trunk/Open-ILS/web/js/dojo/openils/widget/AutoGrid.js
===================================================================
--- trunk/Open-ILS/web/js/dojo/openils/widget/AutoGrid.js	2009-05-11 00:55:40 UTC (rev 13116)
+++ trunk/Open-ILS/web/js/dojo/openils/widget/AutoGrid.js	2009-05-11 01:10:59 UTC (rev 13117)
@@ -100,11 +100,16 @@
                     if(fields.filter(function(i){return (i.field == field.name)})[0]) 
                         continue;
 
-                    if(!this.showSequenceFields && field.name == this.fmIDL.pkey && this.fmIDL.pkey_sequence)
-                        continue; 
                     var entry = existing.filter(function(i){return (i.field == field.name)})[0];
-                    if(entry) entry.name = field.label;
-                    else entry = {field:field.name, name:field.label};
+                    if(entry) {
+                        entry.name = field.label;
+                    } else {
+                        // unless specifically requested, hide sequence fields
+                        if(!this.showSequenceFields && field.name == this.fmIDL.pkey && this.fmIDL.pkey_sequence)
+                            continue; 
+
+                        entry = {field:field.name, name:field.label};
+                    }
                     pushEntry(entry);
                 }
 



More information about the open-ils-commits mailing list