Browse Source

added items found count and no longer need extra calls to populate pop up so things are faster

2.x-ebsco
Paul Pound 8 years ago
parent
commit
4c948042bd
  1. 3
      targets/eds/js/eds_results.js
  2. 2
      targets/eds/js/eds_results_article.js
  3. 1
      targets/eds/roblib_search_eds.module

3
targets/eds/js/eds_results.js

@ -56,7 +56,6 @@ Drupal.behaviors.roblib_search_eds = {
} }
}); });
jQuery('#' + 'roblib-search-content-eds').empty().append(items.join('')); jQuery('#' + 'roblib-search-content-eds').empty().append(items.join(''));
//qtipify(divs, content, 'Notes');
} }
var queries = []; var queries = [];
@ -67,7 +66,7 @@ Drupal.behaviors.roblib_search_eds = {
//var host = "http://eds-api.ebscohost.com"; //var host = "http://eds-api.ebscohost.com";
//var get = "/edsapi/rest/Search?query=history&searchmode=all&resultsperpage=20&pagenumber=1&sort=relevance&highlight=y&includefacets=y&facetfilter=1%2cSourceType%3aMagazines%2cSourceType%3aNews%2cSourceType%3aAcademic+Journals%2cSourceType%3aConference+Materials&view=detailed"; //var get = "/edsapi/rest/Search?query=history&searchmode=all&resultsperpage=20&pagenumber=1&sort=relevance&highlight=y&includefacets=y&facetfilter=1%2cSourceType%3aMagazines%2cSourceType%3aNews%2cSourceType%3aAcademic+Journals%2cSourceType%3aConference+Materials&view=detailed";
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=' + profile + '&mode=bool&lang=en&bquery=';
jQuery('#roblib-search-eds-more').empty().append('<a href="http://proxy.library.upei.ca/login?url='+href_str+query_str+'" id="see_all_results">See all results</a>'); jQuery('#roblib-search-eds-more').empty().append('<a href="http://proxy.library.upei.ca/login?url='+href_str+query_str+'" id="see_all_results">See all results (' + data.recordCount + ')</a>');
}); });
} }

2
targets/eds/js/eds_results_article.js

@ -61,7 +61,7 @@ Drupal.behaviors.roblib_search_eds_articles = {
}) })
var query_str = data.queries[0].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=' + 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</a>'); 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>');
}); });
} }

1
targets/eds/roblib_search_eds.module

@ -259,7 +259,6 @@ function roblib_search_eds_get_results($query = NULL, $type = NULL) {
//$params = "query=AND,$query&view=detailed&includefacets=n&$limiters&resultsperpage=$number_per_page"; //$params = "query=AND,$query&view=detailed&includefacets=n&$limiters&resultsperpage=$number_per_page";
$params = "query=AND,$query&view=detailed&includefacets=n&resultsperpage=$number_per_page"; $params = "query=AND,$query&view=detailed&includefacets=n&resultsperpage=$number_per_page";
$output = $eds_api->apiSearch($params); $output = $eds_api->apiSearch($params);
roblib_search_eds_get_detailed_result($output, $query, $eds_api);
return json_encode($output); return json_encode($output);
} }

Loading…
Cancel
Save