[open-ils-commits] r18748 - branches/rel_2_0/Open-ILS/web/js/dojo/fieldmapper (erickson)
svn at svn.open-ils.org
svn at svn.open-ils.org
Mon Nov 15 15:26:49 EST 2010
Author: erickson
Date: 2010-11-15 15:26:44 -0500 (Mon, 15 Nov 2010)
New Revision: 18748
Modified:
branches/rel_2_0/Open-ILS/web/js/dojo/fieldmapper/Fieldmapper.js
branches/rel_2_0/Open-ILS/web/js/dojo/fieldmapper/IDL.js
Log:
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
Modified: branches/rel_2_0/Open-ILS/web/js/dojo/fieldmapper/Fieldmapper.js
===================================================================
--- branches/rel_2_0/Open-ILS/web/js/dojo/fieldmapper/Fieldmapper.js 2010-11-15 20:26:22 UTC (rev 18747)
+++ branches/rel_2_0/Open-ILS/web/js/dojo/fieldmapper/Fieldmapper.js 2010-11-15 20:26:44 UTC (rev 18748)
@@ -127,17 +127,15 @@
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 @@
- /** ! 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 ) {
Modified: branches/rel_2_0/Open-ILS/web/js/dojo/fieldmapper/IDL.js
===================================================================
--- branches/rel_2_0/Open-ILS/web/js/dojo/fieldmapper/IDL.js 2010-11-15 20:26:22 UTC (rev 18747)
+++ branches/rel_2_0/Open-ILS/web/js/dojo/fieldmapper/IDL.js 2010-11-15 20:26:44 UTC (rev 18748)
@@ -35,7 +35,7 @@
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( !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,
More information about the open-ils-commits
mailing list