Skip to content

Commit

Permalink
Exclude 'All Whatevers' from fmts, ityps, and icat1s in saved search …
Browse files Browse the repository at this point in the history
…retrieval
  • Loading branch information
jgreben committed Jan 23, 2017
1 parent ed1b132 commit 07e78e5
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
3 changes: 3 additions & 0 deletions app/assets/javascripts/shelf_selection_reports.js
Original file line number Diff line number Diff line change
Expand Up @@ -83,15 +83,18 @@ $(document).ready(function() {
$.each($(html_opts).find('fmtsstring').text().split(','), function(i,e){
$("#shelf_selection_report_format_array option[value='" + e +
"']").prop('selected', true);
$("#shelf_selection_report_format_array option[value='All Fromats']").prop('selected', false);
});
$.each($(html_opts).find('itypesstring').text().split(','), function(i,e){
$("#shelf_selection_report_itype_array option[value='" + e +
"']").prop('selected', true);
$("#shelf_selection_report_itype_array option[value='All Item Types']").prop('selected', false);
});
$('#shelf_selection_report_icat1_array' +
'option[value="All Item Category 1s"]').prop('selected', false);
$.each($(html_opts).find('icat1sstring').text().split(','), function(i,e){
$("#shelf_selection_report_icat1_array option[value='" + e + "']").prop('selected', true);
$("#shelf_selection_report_icat1_array option[value='All Item Category1s']").prop('selected', false);
});
$('#shelf_selection_report_lang').val($(html_opts).find('lang').text());
$('#shelf_selection_report_min_yr').val($(html_opts).find('minyr').text());
Expand Down
6 changes: 3 additions & 3 deletions app/models/shelf_sel_search.rb
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ def self.build_search_params(shelf_sel_rpt)
call_range: "#{shelf_sel_rpt.call_alpha}#{shelf_sel_rpt.call_lo}-#{shelf_sel_rpt.call_hi}",
lib: shelf_sel_rpt.lib,
locs: shelf_sel_rpt.loc_array.join(',')[1..-1],
fmts: shelf_sel_rpt.format_array.join(',')[2..-1],
itypes: shelf_sel_rpt.itype_array.join(',')[2..-1],
fmts: shelf_sel_rpt.format_array.join(',')[1..-1],
itypes: shelf_sel_rpt.itype_array.join(',')[1..-1],
min_yr: shelf_sel_rpt.min_yr,
max_yr: shelf_sel_rpt.max_yr,
min_circ: shelf_sel_rpt.min_circ,
Expand All @@ -37,7 +37,7 @@ def self.build_search_params(shelf_sel_rpt)
na_i_e_multvol: shelf_sel_rpt.multvol.to_i,
na_i_e_multcop: shelf_sel_rpt.multcop.to_i,
lang: shelf_sel_rpt.lang,
icat1s: shelf_sel_rpt.icat1_array.join(',')[2..-1] }
icat1s: shelf_sel_rpt.icat1_array.join(',')[1..-1] }
end
# rubocop:enable Metrics/MethodLength,Metrics/AbcSize

Expand Down

0 comments on commit 07e78e5

Please sign in to comment.