Browse Source

fixed minor bug in evergreen target and changed label in eds articles target

2.x-ebsco
Paul Pound 8 years ago
parent
commit
b6bb6dd0f0
  1. 2
      targets/eds/js/eds_results_article.js
  2. 4
      targets/evergreen/js/evergreen_results.js
  3. 1
      targets/evergreen/roblib_search_evergreen.module

2
targets/eds/js/eds_results_article.js

@ -41,7 +41,7 @@ Drupal.behaviors.roblib_search_eds_articles = {
}) })
} }
if (typeof val.PLink !== 'undefined' && typeof val.PDF !== 'undefined' && val.PDF == 'pdflink'){ if (typeof val.PLink !== 'undefined' && typeof val.PDF !== 'undefined' && val.PDF == 'pdflink'){
items.push('<div class="eds-db eds-pdf-link"><a href="'+val.PLink+'&scope=site">Full Text</a></div>'); items.push('<div class="eds-db eds-pdf-link"><a href="'+val.PLink+'&scope=site">PDF Full Text</a></div>');
} }
if (typeof val.PLink !== 'undefined' && typeof val.HTML !== 'undefined' && val.HTML == '1'){ if (typeof val.PLink !== 'undefined' && typeof val.HTML !== 'undefined' && val.HTML == '1'){
items.push('<div class="eds-db eds-pdf-link"><a href="'+val.PLink+'&scope=site">HTML Full Text</a></div>'); items.push('<div class="eds-db eds-pdf-link"><a href="'+val.PLink+'&scope=site">HTML Full Text</a></div>');

4
targets/evergreen/js/evergreen_results.js

@ -7,9 +7,9 @@ Drupal.behaviors.roblib_search_evergreen = {
try { try {
numberOfDocs = data.numberOfRecords; numberOfDocs = data.numberOfRecords;
} catch (err) { } catch (err) {
// do nothing leave docLength at 0 numberOfDocs = 0;
} }
if(numberOfDocs < 1){ if(numberOfDocs === undefined || numberOfDocs < 1){
jQuery('#' + 'roblib-search-content-evergreen').empty().append('No Results'); jQuery('#' + 'roblib-search-content-evergreen').empty().append('No Results');
jQuery('.pane-roblib-search-evergreen-roblib-search-evergreen-results').hide(); jQuery('.pane-roblib-search-evergreen-roblib-search-evergreen-results').hide();
} else { } else {

1
targets/evergreen/roblib_search_evergreen.module

@ -167,6 +167,7 @@ function roblib_search_evergreen_get_results($query) {
$url = variable_get('roblib_search_evergreen_url', 'http://137.149.200.52'); $url = variable_get('roblib_search_evergreen_url', 'http://137.149.200.52');
$url_suffix = variable_get('roblib_search_evergreen_search_suffix', '/opac/extras/sru?version=1.1&operation=searchRetrieve&query='); $url_suffix = variable_get('roblib_search_evergreen_search_suffix', '/opac/extras/sru?version=1.1&operation=searchRetrieve&query=');
$number_of_records = variable_get('roblib_search_evergreen_num_results', '5'); $number_of_records = variable_get('roblib_search_evergreen_num_results', '5');
$query = trim($query);
$query = str_replace(' ', '%20AND%20',$query); //hack until the library decides if we want phrase or individual words $query = str_replace(' ', '%20AND%20',$query); //hack until the library decides if we want phrase or individual words
$query .= '%20AND%20%22prince%20edward%20island%22'; $query .= '%20AND%20%22prince%20edward%20island%22';
$search_url = $url . $url_suffix . $query . '&maximumRecords=' . $number_of_records; $search_url = $url . $url_suffix . $query . '&maximumRecords=' . $number_of_records;

Loading…
Cancel
Save