From 34fbba5c1b73387701e10dd4799f3579fe230c04 Mon Sep 17 00:00:00 2001 From: erickson Date: Mon, 15 Nov 2010 20:26:22 +0000 Subject: [PATCH] return AutoIDL to its original state of loading the while IDL if no classes are selected. This will ease the process of moving to /IDL2js; other minor cleanup git-svn-id: svn://svn.open-ils.org/ILS/trunk@18747 dcc99617-32d9-48b4-a31d-7c20da2025e4 --- Open-ILS/web/js/dojo/fieldmapper/Fieldmapper.js | 22 ++++++++++------------ Open-ILS/web/js/dojo/fieldmapper/IDL.js | 4 +--- 2 files changed, 11 insertions(+), 15 deletions(-) diff --git a/Open-ILS/web/js/dojo/fieldmapper/Fieldmapper.js b/Open-ILS/web/js/dojo/fieldmapper/Fieldmapper.js index 786ae4240..c537b42f4 100644 --- a/Open-ILS/web/js/dojo/fieldmapper/Fieldmapper.js +++ b/Open-ILS/web/js/dojo/fieldmapper/Fieldmapper.js @@ -127,17 +127,15 @@ if(!dojo._hasResource["fieldmapper.Fieldmapper"]){ if (fieldmapper.IDL && fieldmapper.IDL.loaded) fieldmapper[cl].Identifier = fieldmapper.IDL.fmclasses[cl].pkey; - //if (dojo.filter(['aou','aout','pgt'], function(x){return x == cl}).length == 0) { - fieldmapper[cl].prototype.fromStoreItem = _fromStoreItem; - fieldmapper[cl].toStoreData = _toStoreData; - fieldmapper[cl].toStoreItem = _toStoreItem; - fieldmapper[cl].prototype.toStoreItem = function ( args ) { return _toStoreItem(this, args) }; - fieldmapper[cl].initStoreData = _initStoreData; - fieldmapper[cl].prototype.toHash = _toHash; - fieldmapper[cl].toHash = _toHash; - fieldmapper[cl].prototype.fromHash = _fromHash; - fieldmapper[cl].fromHash = _fromHash; - //} + fieldmapper[cl].prototype.fromStoreItem = _fromStoreItem; + fieldmapper[cl].toStoreData = _toStoreData; + fieldmapper[cl].toStoreItem = _toStoreItem; + fieldmapper[cl].prototype.toStoreItem = function ( args ) { return _toStoreItem(this, args) }; + fieldmapper[cl].initStoreData = _initStoreData; + fieldmapper[cl].prototype.toHash = _toHash; + fieldmapper[cl].toHash = _toHash; + fieldmapper[cl].prototype.fromHash = _fromHash; + fieldmapper[cl].fromHash = _fromHash; }; fieldmapper._request = function ( meth, staff, params ) { @@ -318,7 +316,7 @@ if(!dojo._hasResource["fieldmapper.Fieldmapper"]){ - /** ! Begin code that executes on page parse */ + /** ! Begin code that executes on page load */ if (!window.fmclasses) dojo.require("fieldmapper.fmall", true); for( var cl in fmclasses ) { diff --git a/Open-ILS/web/js/dojo/fieldmapper/IDL.js b/Open-ILS/web/js/dojo/fieldmapper/IDL.js index 97c9a1345..3fa316275 100644 --- a/Open-ILS/web/js/dojo/fieldmapper/IDL.js +++ b/Open-ILS/web/js/dojo/fieldmapper/IDL.js @@ -35,7 +35,7 @@ if(!dojo._hasResource["fieldmapper.IDL"]) { if(!fieldmapper.IDL.fmclasses || (classlist && classlist.length)) { var idl_url = this._URL_PATH; - if (classlist.length > 1 || classlist[0] != '*') { + if (classlist.length && (classlist.length > 1 || classlist[0] != '*')) { idl_url += '?'; for (var i = 0; i < classlist.length; i++) { @@ -50,8 +50,6 @@ if(!dojo._hasResource["fieldmapper.IDL"]) { if( !idl_url.match(/\?$/) ) { // make sure we have classes that need loading - console.log("Fetching classes from server at " + idl_url + ':' + classlist); - var self = this; dojo.xhrGet({ url : idl_url, -- 2.11.0