From 55ddfe4e385ebdd5948798fd8570ac78aa23d9e5 Mon Sep 17 00:00:00 2001 From: miker Date: Mon, 8 Nov 2010 21:18:40 +0000 Subject: [PATCH] teach vivicateClass to set up dojoData APIs for classes loaded by fieldmapper.IDL.load() when appropriate git-svn-id: svn://svn.open-ils.org/ILS/trunk@18665 dcc99617-32d9-48b4-a31d-7c20da2025e4 --- Open-ILS/web/js/dojo/fieldmapper/Fieldmapper.js | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/Open-ILS/web/js/dojo/fieldmapper/Fieldmapper.js b/Open-ILS/web/js/dojo/fieldmapper/Fieldmapper.js index 5ef69d750f..6702518540 100644 --- a/Open-ILS/web/js/dojo/fieldmapper/Fieldmapper.js +++ b/Open-ILS/web/js/dojo/fieldmapper/Fieldmapper.js @@ -130,6 +130,16 @@ if(!dojo._hasResource["fieldmapper.Fieldmapper"]){ }); fieldmapper[cl] = window[cl]; // alias into place if (fieldmapper.IDL && fieldmapper.IDL.loaded) fieldmapper[cl].Identifier = fieldmapper.IDL.fmclasses[cl].pkey; + + if (dojo._hasResource['fieldmapper.dojoData'] && dojo.filter(['aou','aout','pgt'], function(x){return x == cl}).length == 0) { + fieldmapper[cl].prototype.fromStoreItem = _fromtoreItem; + 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; + } + }; if (!window.fmclasses) dojo.require("fieldmapper.fmall", true); -- 2.11.0