[open-ils-commits] r19777 - branches/rel_2_1/Open-ILS/web/opac/skin/default/js (miker)
svn at svn.open-ils.org
svn at svn.open-ils.org
Wed Mar 16 13:43:27 EDT 2011
Author: miker
Date: 2011-03-16 13:43:23 -0400 (Wed, 16 Mar 2011)
New Revision: 19777
Modified:
branches/rel_2_1/Open-ILS/web/opac/skin/default/js/holds.js
Log:
Addresses LP bug #736167, correctly populate hold format list for Advanced Options
Modified: branches/rel_2_1/Open-ILS/web/opac/skin/default/js/holds.js
===================================================================
--- branches/rel_2_1/Open-ILS/web/opac/skin/default/js/holds.js 2011-03-16 17:43:06 UTC (rev 19776)
+++ branches/rel_2_1/Open-ILS/web/opac/skin/default/js/holds.js 2011-03-16 17:43:23 UTC (rev 19777)
@@ -640,14 +640,7 @@
var rec = holdArgs.record;
var mrec = holdArgs.metarecord;
- for( var i = 0; i < desc.length; i++ ) {
- var d = desc[i];
- if( type == 'T' && d.item_lang() != lang ) continue;
- formats.push( _t_f_2_format(d.item_type(), d.item_form()));
- }
- formats = uniquify(formats);
-
if( type == 'T') {
for( var i = 0; i < desc.length; i++ ) {
@@ -659,14 +652,27 @@
break;
}
}
+
+ for( var i = 0; i < desc.length; i++ ) {
+ var d = desc[i];
+ if( type == 'T' && d.item_lang() != lang ) continue;
+ formats.push( _t_f_2_format(d.item_type(), d.item_form()));
+ }
+
} else if( type =='M') {
// All available formats are selected by default in MR holds
- for( var i = 0; i < formats.length; i++ ) {
- sformats.push(formats[i]);
- }
+ for( var i = 0; i < desc.length; i++ ) {
+ var d = desc[i];
+ var _tmp_f = _t_f_2_format(d.item_type(), d.item_form());
+ formats.push( _tmp_f );
+ sformats.push( _tmp_f );
+ }
}
+ formats = uniquify(formats);
+ sformats = uniquify(sformats);
+
return {
lang : lang,
avail_formats : formats,
More information about the open-ils-commits
mailing list