[open-ils-commits] r16559 - trunk/Open-ILS/web/js/dojo/fieldmapper (miker)
svn at svn.open-ils.org
svn at svn.open-ils.org
Wed Jun 2 13:42:44 EDT 2010
Author: miker
Date: 2010-06-02 13:42:40 -0400 (Wed, 02 Jun 2010)
New Revision: 16559
Modified:
trunk/Open-ILS/web/js/dojo/fieldmapper/IDL.js
Log:
use dojo.query instead of getElementsByTagName ... IE--
Modified: trunk/Open-ILS/web/js/dojo/fieldmapper/IDL.js
===================================================================
--- trunk/Open-ILS/web/js/dojo/fieldmapper/IDL.js 2010-06-02 17:17:50 UTC (rev 16558)
+++ trunk/Open-ILS/web/js/dojo/fieldmapper/IDL.js 2010-06-02 17:42:40 UTC (rev 16559)
@@ -55,14 +55,14 @@
},
_parse : function(xmlNode) {
- var classes = xmlNode.getElementsByTagName('class');
+ var classes = dojo.query('class',xmlNode);
if (!fieldmapper.IDL || !fieldmapper.IDL.fmclasses)
fieldmapper.IDL.fmclasses = {};
for(var i = 0; i < classes.length; i++) {
var node = classes[i];
var id = node.getAttribute('id');
- var fields = node.getElementsByTagName('fields')[0];
+ var fields = dojo.query('fields',node)[0];
window.fmclasses[id] = [];
var fieldData = this._parseFields(node, id);
@@ -84,13 +84,13 @@
var valid = fieldmapper._getAttributeNS(node,this.NS_OBJ, 'validate');
if (valid) obj.validate = new RegExp( valid.replace(/\\/g, '\\\\') );
- var permacrud = node.getElementsByTagName('permacrud')[0];
+ var permacrud = dojo.query('permacrud',node)[0];
if(permacrud) {
var actions = ['create', 'retrieve', 'update', 'delete'];
obj.permacrud = {};
for(var idx in actions) {
var action = actions[idx];
- var pnode = permacrud.getElementsByTagName(action)[0];
+ var pnode = dojo.query(action,permacrud)[0];
if(pnode) {
var permString = pnode.getAttribute('permission');
var permList = null;
@@ -122,11 +122,11 @@
var data = [];
var map = {};
- var fields = node.getElementsByTagName('fields')[0];
- fields = fields.getElementsByTagName('field');
+ var fields = dojo.query('fields',node)[0];
+ fields = dojo.query('field',fields);
- var links = node.getElementsByTagName('links')[0];
- if( links ) links = links.getElementsByTagName('link');
+ var links = dojo.query('links',node)[0];
+ if( links ) links = dojo.query('link',links);
else links = [];
More information about the open-ils-commits
mailing list