Browse Source

fix for eds book bento and catalog urls also removed hardcoded eds profiles in javascript used in testing

2.x-ebsco
Paul Pound 7 years ago
parent
commit
ffa29e80ce
  1. 4
      targets/eds/js/eds_results.js
  2. 4
      targets/eds/js/eds_results_article.js
  3. 1
      targets/eds/roblib_search_eds.module
  4. 2
      targets/eds/theme/theme.inc

4
targets/eds/js/eds_results.js

@ -1,7 +1,7 @@
Drupal.behaviors.roblib_search_eds = {
attach: function (context, settings) {
$url = settings.roblib_search_eds.search_url;
profile = 'eds'; //settings.roblib_search_eds.eds_profile;
profile = settings.roblib_search_eds.eds_profile;
jQuery.getJSON($url, function (data) {
var items = [];
var numberOfDocs = 0;
@ -56,8 +56,6 @@ Drupal.behaviors.roblib_search_eds = {
if (anNumber[0] && anNumber[0] == 'upei') {
catalogUrl = '<a href="http://islandpines.roblib.upei.ca/eg/opac/record/' + anNumber[1] +
'">View in UPEI Catalogue</a>';
}
if (catalogUrl) {
items.push('<div class="eds-catalog-link">' + catalogUrl + '</div>');
}
}

4
targets/eds/js/eds_results_article.js

@ -1,7 +1,7 @@
Drupal.behaviors.roblib_search_eds_articles = {
attach: function (context, settings) {
$url = settings.roblib_search_eds_articles.search_url;
profile = 'eds'; //settings.roblib_search_eds.eds_profile;
articles_profile = settings.roblib_search_eds_articles.eds_profile;
jQuery.getJSON($url, function (data) {
var items = [];
var numberOfDocs = 0;
@ -71,7 +71,7 @@ Drupal.behaviors.roblib_search_eds_articles = {
queries.push(query.query);
})
var query_str = data.queries[0].query;
var href_str = 'http://search.ebscohost.com/login.aspx?direct=true&site=ehost-live&scope=site&type=1&custid=uprince&groupid=main&profid=' + profile + '&mode=bool&lang=en&bquery=';
var href_str = 'http://search.ebscohost.com/login.aspx?direct=true&site=ehost-live&scope=site&type=1&custid=uprince&groupid=main&profid=' + articles_profile + '&mode=bool&lang=en&bquery=';
jQuery('#roblib-search-eds-article-more').empty().append('<a href="http://proxy.library.upei.ca/login?url=' + href_str + query_str + '" id="eds-article-see-all-results">See all results (' + data.recordCount + ')</a>');
jQuery('#roblib-eds-articles-more-results').empty().append('<a href="http://proxy.library.upei.ca/login?url=' + href_str + query_str + '" id="eds-article-see-all-results-button">See all results (' + data.recordCount + ')</a>');
jQuery('#roblib-eds-articles-toc').empty().append('<a href="http://proxy.library.upei.ca/login?url=' + href_str + query_str + '" id="eds-article-see-all-results-toc">Articles (' + data.recordCount + ')</a>');

1
targets/eds/roblib_search_eds.module

@ -332,7 +332,6 @@ function roblib_search_eds_build_config_arr($type) {
$config['pass'] = variable_get('roblib_search_eds_pass', 'edspassword');
$config['profile'] = ($type === 'Books') ? variable_get('roblib_search_eds_book_profile', 'apilite') :
variable_get('roblib_search_eds_profile', 'edsapi');
$config['profile'] = variable_get('roblib_search_eds_profile', 'edsapi');
$config['auth_url'] = variable_get('roblib_search_eds_auth_url', 'https://eds-api.ebscohost.com/Authservice/rest');
$config['rest_url'] = variable_get('roblib_search_eds_rest_url', 'http://eds-api.ebscohost.com/edsapi/rest');
return $config;

2
targets/eds/theme/theme.inc

@ -25,7 +25,7 @@ function roblib_search_eds_preprocess_roblib_search_eds(&$variables) {
'roblib_search_eds' => array(
'search_url' => $search_url,
'eds_profile' =>
variable_get('roblib_search_eds_profile', 'edsapi')
variable_get('roblib_search_eds_book_profile', 'apilite')
)
), array('type' => 'setting'));

Loading…
Cancel
Save