[open-ils-commits] r10455 - trunk/Open-ILS/web/opac/common/js
svn at svn.open-ils.org
svn at svn.open-ils.org
Tue Aug 26 15:43:25 EDT 2008
Author: erickson
Date: 2008-08-26 15:43:21 -0400 (Tue, 26 Aug 2008)
New Revision: 10455
Modified:
trunk/Open-ILS/web/opac/common/js/opac_utils.js
Log:
gave org selecter builder the option to display shortname instead of name, good for staff client
Modified: trunk/Open-ILS/web/opac/common/js/opac_utils.js
===================================================================
--- trunk/Open-ILS/web/opac/common/js/opac_utils.js 2008-08-26 19:42:50 UTC (rev 10454)
+++ trunk/Open-ILS/web/opac/common/js/opac_utils.js 2008-08-26 19:43:21 UTC (rev 10455)
@@ -987,20 +987,22 @@
}
-function buildOrgSel(selector, org, offset) {
+function buildOrgSel(selector, org, offset, namecol) {
+ if(!namecol) namecol = 'name';
insertSelectorVal( selector, -1,
- org.name(), org.id(), null, findOrgDepth(org) - offset );
+ org[namecol](), org.id(), null, findOrgDepth(org) - offset );
for( var c in org.children() )
- buildOrgSel( selector, org.children()[c], offset);
+ buildOrgSel( selector, org.children()[c], offset, namecol);
}
-function buildMergedOrgSel(selector, org_list, offset) {
+function buildMergedOrgSel(selector, org_list, offset, namecol) {
+ if(!namecol) namecol = 'name';
for(var i = 0; i < org_list.length; i++) {
var org = findOrgUnit(org_list[i]);
insertSelectorVal( selector, -1,
- org.name(), org.id(), null, findOrgDepth(org) - offset );
+ org[namecol](), org.id(), null, findOrgDepth(org) - offset );
for( var c in org.children() )
- buildOrgSel( selector, org.children()[c], offset);
+ buildOrgSel( selector, org.children()[c], offset, namecol);
}
}
More information about the open-ils-commits
mailing list