[open-ils-commits] r9118 -
branches/dojo-admin/Open-ILS/web/conify/js/conify/fieldmapper
svn at svn.open-ils.org
svn at svn.open-ils.org
Mon Mar 24 00:17:51 EDT 2008
Author: miker
Date: 2008-03-23 23:42:53 -0400 (Sun, 23 Mar 2008)
New Revision: 9118
Added:
branches/dojo-admin/Open-ILS/web/conify/js/conify/fieldmapper/addFromStoreItem.js
Log:
dojo data api items to fieldmapper objects
Added: branches/dojo-admin/Open-ILS/web/conify/js/conify/fieldmapper/addFromStoreItem.js
===================================================================
--- branches/dojo-admin/Open-ILS/web/conify/js/conify/fieldmapper/addFromStoreItem.js (rev 0)
+++ branches/dojo-admin/Open-ILS/web/conify/js/conify/fieldmapper/addFromStoreItem.js 2008-03-24 03:42:53 UTC (rev 9118)
@@ -0,0 +1,14 @@
+
+function _fromStoreItem (data) {
+ this.fromHash(data);
+
+ var _fields = fmclasses[this.classname];
+ for ( var i=0; i < _fields.length; i++) {
+ if (dojo.isArray( this[_fields[i]]() ))
+ this[_fields[i]]( this[_fields[i]]()[0] );
+ }
+ return this;
+}
+
+for (var i in fmclasses) window[i].prototype.fromStoreItem = _fromStoreItem;
+
More information about the open-ils-commits
mailing list