[open-ils-commits] r12195 - trunk/Open-ILS/web/js/ui/default/actor/user (erickson)
svn at svn.open-ils.org
svn at svn.open-ils.org
Mon Feb 16 22:34:14 EST 2009
Author: erickson
Date: 2009-02-16 22:34:13 -0500 (Mon, 16 Feb 2009)
New Revision: 12195
Modified:
trunk/Open-ILS/web/js/ui/default/actor/user/register.js
Log:
stat cat entries plugged in
Modified: trunk/Open-ILS/web/js/ui/default/actor/user/register.js
===================================================================
--- trunk/Open-ILS/web/js/ui/default/actor/user/register.js 2009-02-17 02:30:46 UTC (rev 12194)
+++ trunk/Open-ILS/web/js/ui/default/actor/user/register.js 2009-02-17 03:34:13 UTC (rev 12195)
@@ -12,6 +12,7 @@
var fmClasses = ['au', 'ac', 'aua', 'actsc', 'asv', 'asvq', 'asva'];
var fieldDoc = {};
var statCats;
+var statCatTempate;
var surveys;
var staff;
@@ -51,16 +52,21 @@
fleshFMRow(row, fmcls);
}
+ statCatTemplate = tbody.removeChild(dojo.byId('stat-cat-row-0'));
+
for(var idx in statCats) {
var stat = statCats[idx];
- var row = dojo.byId('stat-cat-row-' + idx);
- if(!row) row = dojo.byId('stat-cat-row-0').cloneNode(true);
+ var row = statCatTemplate.cloneNode(true);
row.id = 'stat-cat-row-' + idx;
+ tbody.insertBefore(row, dojo.byId('survey-cat-divider'));
dojo.query('[name=name]', row)[0].innerHTML = stat.name();
var valtd = dojo.query('[name=widget]', row)[0];
var span = valtd.appendChild(document.createElement('span'));
- new dijit.form.ComboBox({}, span);
- tbody.insertBefore(row, dojo.byId('survey-cat-divider'));
+ var store = new dojo.data.ItemFileReadStore(
+ {data:fieldmapper.actsc.toStoreData(stat.entries())});
+ var comboBox = new dijit.form.ComboBox({store:store}, span);
+ comboBox.labelAttr = 'value';
+ comboBox.searchAttr = 'value';
}
}
More information about the open-ils-commits
mailing list