repaired field name iteration thinko. reduce calls to Array.length, mainly for poor...
authorerickson <erickson@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Thu, 11 Nov 2010 15:31:24 +0000 (15:31 +0000)
committererickson <erickson@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Thu, 11 Nov 2010 15:31:24 +0000 (15:31 +0000)
git-svn-id: svn://svn.open-ils.org/ILS/trunk@18699 dcc99617-32d9-48b4-a31d-7c20da2025e4

Open-ILS/xsl/fm_IDL2js.xsl

index ea2ff8e..ee3e9c5 100644 (file)
@@ -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>