[open-ils-commits] r12667 - trunk/Open-ILS/web/js/dojo/openils/widget (erickson)
svn at svn.open-ils.org
svn at svn.open-ils.org
Wed Mar 25 12:57:09 EDT 2009
Author: erickson
Date: 2009-03-25 12:57:04 -0400 (Wed, 25 Mar 2009)
New Revision: 12667
Modified:
trunk/Open-ILS/web/js/dojo/openils/widget/AutoGrid.js
Log:
when non-IDL fields are added to the grid and a field order is defined, plop the explicit columns onto the end
Modified: trunk/Open-ILS/web/js/dojo/openils/widget/AutoGrid.js
===================================================================
--- trunk/Open-ILS/web/js/dojo/openils/widget/AutoGrid.js 2009-03-25 13:55:37 UTC (rev 12666)
+++ trunk/Open-ILS/web/js/dojo/openils/widget/AutoGrid.js 2009-03-25 16:57:04 UTC (rev 12667)
@@ -72,7 +72,6 @@
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];
@@ -81,6 +80,18 @@
pushEntry(entry);
}
+ if(this.fieldOrder) {
+ /* append any explicit non-IDL grid fields to the end */
+ for(var e in existing) {
+ var entry = existing[e];
+ var field = fields.filter(
+ function(i){return (i.field == entry.field)})[0];
+ if(field) continue; // don't duplicate
+ pushEntry(entry);
+ }
+ }
+
+
return [{cells: [fields]}];
},
More information about the open-ils-commits
mailing list