[open-ils-commits] r18699 - trunk/Open-ILS/xsl (erickson)
svn at svn.open-ils.org
svn at svn.open-ils.org
Thu Nov 11 10:31:26 EST 2010
Author: erickson
Date: 2010-11-11 10:31:24 -0500 (Thu, 11 Nov 2010)
New Revision: 18699
Modified:
trunk/Open-ILS/xsl/fm_IDL2js.xsl
Log:
repaired field name iteration thinko. reduce calls to Array.length, mainly for poor ol' IE's sake.
Modified: trunk/Open-ILS/xsl/fm_IDL2js.xsl
===================================================================
--- trunk/Open-ILS/xsl/fm_IDL2js.xsl 2010-11-11 14:46:03 UTC (rev 18698)
+++ trunk/Open-ILS/xsl/fm_IDL2js.xsl 2010-11-11 15:31:24 UTC (rev 18699)
@@ -18,7 +18,8 @@
var _preload_fieldmapper_IDL = {<xsl:apply-templates select="idl:IDL"/>};
for (var c in _preload_fieldmapper_IDL) {
var x = _preload_fieldmapper_IDL[c]; x.field_map = {};
- for (var n in ['isnew','ischanged','isdeleted']) x.fields[n] = {name:n,type:'field',virtual:true,array_position:x.fields.length};
+ var p = x.fields.length;
+ for (var n in {isnew:1,ischanged:1,isdeleted:1}) x.fields[p] = {name:n,type:'field',virtual:true,array_position:p++};
for (var f in x.fields) x.field_map[x.fields[f].name] = x.fields[f];
}
</xsl:template>
More information about the open-ils-commits
mailing list