[open-ils-commits] r11778 - trunk/Open-ILS/web/js/dojo/fieldmapper
svn at svn.open-ils.org
svn at svn.open-ils.org
Fri Jan 9 09:22:08 EST 2009
Author: miker
Date: 2009-01-09 09:22:07 -0500 (Fri, 09 Jan 2009)
New Revision: 11778
Modified:
trunk/Open-ILS/web/js/dojo/fieldmapper/IDL.js
Log:
adding back-support for fmclasses
Modified: trunk/Open-ILS/web/js/dojo/fieldmapper/IDL.js
===================================================================
--- trunk/Open-ILS/web/js/dojo/fieldmapper/IDL.js 2009-01-09 14:00:17 UTC (rev 11777)
+++ trunk/Open-ILS/web/js/dojo/fieldmapper/IDL.js 2009-01-09 14:22:07 UTC (rev 11778)
@@ -40,9 +40,10 @@
var node = classes[i];
var id = node.getAttribute('id');
var fields = node.getElementsByTagName('fields')[0];
+ window.fmclasses[id] = [];
var obj = {
- fields : this._parseFields(node),
+ fields : this._parseFields(node, id),
name : node.getAttribute('id'),
//table : node.getAttributeNS(this.NS_PERSIST, 'tablename'),
//core : node.getAttributeNS(this.NS_REPORTS, 'core'),
@@ -87,7 +88,7 @@
},
/* parses the links and fields portion of the IDL */
- _parseFields : function(node) {
+ _parseFields : function(node, classname) {
var data = [];
var fields = node.getElementsByTagName('fields')[0];
@@ -99,10 +100,9 @@
for(var i = 0; i < fields.length; i++) {
-
var field = fields[i];
var name = field.getAttribute('name');
-
+
var obj = {
field : field,
name : name,
@@ -114,8 +114,12 @@
type : 'field',
virtual : (fields[i].getAttributeNS(this.NS_PERSIST, 'virtual') == 'true')
};
+
obj.label = obj.label || obj.name;
obj.datatype = obj.datatype || 'text';
+
+ if (obj.array_position > 2)
+ window.fmclasses[classname].push(obj.name);
var link = null;
for(var l = 0; l < links.length; l++) {
@@ -150,6 +154,7 @@
});
+ window.fmclasses = {};
fieldmapper.IDL.load = function (callback, force) { return new fieldmapper.IDL(callback, force); };
fieldmapper.IDL.loaded = false;
More information about the open-ils-commits
mailing list