[open-ils-commits] r16273 - trunk/Open-ILS/web/js/dojo/fieldmapper (miker)

svn at svn.open-ils.org svn at svn.open-ils.org
Mon Apr 19 11:48:03 EDT 2010


Author: miker
Date: 2010-04-19 11:48:00 -0400 (Mon, 19 Apr 2010)
New Revision: 16273

Modified:
   trunk/Open-ILS/web/js/dojo/fieldmapper/IDL.js
Log:
IE just asked my why it would want to go and support the XML spec ... uh ...

Modified: trunk/Open-ILS/web/js/dojo/fieldmapper/IDL.js
===================================================================
--- trunk/Open-ILS/web/js/dojo/fieldmapper/IDL.js	2010-04-19 14:52:35 UTC (rev 16272)
+++ trunk/Open-ILS/web/js/dojo/fieldmapper/IDL.js	2010-04-19 15:48:00 UTC (rev 16273)
@@ -48,7 +48,6 @@
                     }
                 });
             }
-
             dojo.require('fieldmapper.Fieldmapper'); 
 
             if (classlist && classlist.length)
@@ -72,13 +71,13 @@
                     fields  : fieldData.list,
                     field_map : fieldData.map,
                     name    : node.getAttribute('id'),
-                    //table   : node.getAttributeNS(this.NS_PERSIST, 'tablename'),
-                    //core    : node.getAttributeNS(this.NS_REPORTS, 'core'),
-                    label   : node.getAttributeNS(this.NS_REPORTS, 'label'),
-                    restrict_primary   : node.getAttributeNS(this.NS_PERSIST, 'restrict_primary'),
-                    virtual : (node.getAttributeNS(this.NS_PERSIST, 'virtual') == 'true'),
-                    pkey    : fields.getAttributeNS(this.NS_PERSIST, 'primary'),
-                    pkey_sequence : fields.getAttributeNS(this.NS_PERSIST, 'sequence')
+                    //table   : fieldmapper._getAttributeNS(node,this.NS_PERSIST, 'tablename'),
+                    //core    : fieldmapper._getAttributeNS(node,this.NS_REPORTS, 'core'),
+                    label   : fieldmapper._getAttributeNS(node,this.NS_REPORTS, 'label'),
+                    restrict_primary   : fieldmapper._getAttributeNS(node,this.NS_PERSIST, 'restrict_primary'),
+                    virtual : (fieldmapper._getAttributeNS(node,this.NS_PERSIST, 'virtual') == 'true'),
+                    pkey    : fieldmapper._getAttributeNS(fields,this.NS_PERSIST, 'primary'),
+                    pkey_sequence : fieldmapper._getAttributeNS(fields,this.NS_PERSIST, 'sequence')
                 };
 
                 var permacrud = node.getElementsByTagName('permacrud')[0];
@@ -138,13 +137,13 @@
                 var obj = {
                     field : field,
                     name	: name,
-                    label : field.getAttributeNS(this.NS_REPORTS,'label'),
-                    datatype : field.getAttributeNS(this.NS_REPORTS,'datatype'),
-                    primitive : field.getAttributeNS(this.NS_PERSIST,'primitive'),
-                    selector : field.getAttributeNS(this.NS_REPORTS,'selector'),
+                    label : fieldmapper._getAttributeNS(field,this.NS_REPORTS,'label'),
+                    datatype : fieldmapper._getAttributeNS(field,this.NS_REPORTS,'datatype'),
+                    primitive : fieldmapper._getAttributeNS(field,this.NS_PERSIST,'primitive'),
+                    selector : fieldmapper._getAttributeNS(field,this.NS_REPORTS,'selector'),
                     array_position : position++,
                     type	: 'field',
-                    virtual : (fields[i].getAttributeNS(this.NS_PERSIST, 'virtual') == 'true') 
+                    virtual : (fieldmapper._getAttributeNS(fields[i],this.NS_PERSIST, 'virtual') == 'true') 
                 };
 
                 obj.label = obj.label || obj.name;
@@ -189,6 +188,11 @@
 
     });
 
+    fieldmapper._getAttributeNS = function (node,ns,attr) {
+        if (node.getAttributeNS) return node.getAttributeNS(ns,attr);
+        return node.getAttribute(attr);
+    };
+
     window.fmclasses = {};
     fieldmapper.IDL.load = function (list) { if (!list) list = []; return new fieldmapper.IDL(list); };
     fieldmapper.IDL.loaded = false;



More information about the open-ils-commits mailing list