From d6ca402728023321cac23fed45beee4c48cf1122 Mon Sep 17 00:00:00 2001 From: miker Date: Mon, 19 Apr 2010 15:48:00 +0000 Subject: [PATCH] IE just asked my why it would want to go and support the XML spec ... uh ... git-svn-id: svn://svn.open-ils.org/ILS/trunk@16273 dcc99617-32d9-48b4-a31d-7c20da2025e4 --- Open-ILS/web/js/dojo/fieldmapper/IDL.js | 30 +++++++++++++++++------------- 1 file changed, 17 insertions(+), 13 deletions(-) diff --git a/Open-ILS/web/js/dojo/fieldmapper/IDL.js b/Open-ILS/web/js/dojo/fieldmapper/IDL.js index e37973483d..b87e572672 100644 --- a/Open-ILS/web/js/dojo/fieldmapper/IDL.js +++ b/Open-ILS/web/js/dojo/fieldmapper/IDL.js @@ -48,7 +48,6 @@ if(!dojo._hasResource["fieldmapper.IDL"]) { } }); } - dojo.require('fieldmapper.Fieldmapper'); if (classlist && classlist.length) @@ -72,13 +71,13 @@ if(!dojo._hasResource["fieldmapper.IDL"]) { 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 @@ if(!dojo._hasResource["fieldmapper.IDL"]) { 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 @@ if(!dojo._hasResource["fieldmapper.IDL"]) { }); + 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; -- 2.11.0