diff --git a/targets/eds/js/eds_results.js b/targets/eds/js/eds_results.js
index 6e5029c..f60e76a 100644
--- a/targets/eds/js/eds_results.js
+++ b/targets/eds/js/eds_results.js
@@ -66,7 +66,7 @@ Drupal.behaviors.roblib_search_eds = {
//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 href_str = 'http://search.ebscohost.com/login.aspx?direct=true&site=ehost-live&scope=site&type=1&custid=uprince&groupid=main&profid=eds&mode=bool&lang=en&bquery=';
- jQuery('#roblib-search-eds-more').empty().append('See all ' + data.recordCount + ' results');
+ jQuery('#roblib-search-eds-more').empty().append('See all results');
});
}
@@ -76,7 +76,14 @@ function edsPopulatePopupDivs(content, val, counter){
content[counter] = '';
try{
jQuery.each(val.DetailedRecord, function(key, value){
- if(value.Group =='Ab' || value.Group == 'Note' || value.Group == 'TOC') {
+ if (content.length < 5 &&
+ (value.Group == 'PubInfo' || value.Group =="TypPub" || value.Group == "TypeDoc" || value.Group =="Su" || value.Group == "Au")) {
+ content[counter] += '
';(value.Group =='Ab' || value.Group == 'Note' )
+ } else if (content[counter].length < 5 && (value.Group == "Note" || value.Group== "Ab")) {
+ content[counter] += '';
+ } else if (content[counter].length < 3 && (value.Group == 'TOC' || value.Group == 'Src')) {
content[counter] += '';
}
diff --git a/targets/eds/js/eds_results_article.js b/targets/eds/js/eds_results_article.js
index 0d005c7..dd5f3b4 100644
--- a/targets/eds/js/eds_results_article.js
+++ b/targets/eds/js/eds_results_article.js
@@ -58,7 +58,7 @@ Drupal.behaviors.roblib_search_eds_articles = {
var query_str = data.queries[0].query;
var href_str = 'http://search.ebscohost.com/login.aspx?direct=true&site=ehost-live&scope=site&type=0&custid=uprince&profid=eds&groupid=main&mode=and&cli0=RV&clv0=N&lang=en' +
'&authtype=ip,guest&cli2=FT&clv2=N&cli3=&clv3=(ST+Academic+Journal+or+ST+Conference+Materials+or+ST+News+or+ST+Magazines)&bquery=';
- jQuery('#roblib-search-eds-article-more').empty().append('See all ' + data.recordCount + ' results');
+ jQuery('#roblib-search-eds-article-more').empty().append('See all results');
});
}
diff --git a/targets/eds/roblib_search_eds.module b/targets/eds/roblib_search_eds.module
index 41b729f..34836ff 100644
--- a/targets/eds/roblib_search_eds.module
+++ b/targets/eds/roblib_search_eds.module
@@ -105,6 +105,24 @@ function roblib_search_eds_config_form($form, &$form_state) {
'#description' => t('The number of results to display in the Bento box'),
'#required' => TRUE,
);
+ $form['roblib_search_eds_article_limiters'] = array(
+ '#type' => 'textarea',
+ '#title' => t('The limiters for Article searches'),
+ '#default_value' => variable_get('roblib_search_eds_article_limiters',
+ 'AND (PT Article OR PT Magazines OR PT News OR PT Academic Journals OR PT Conference Materials)'),
+ '#description' => t('Specify the Publication Types to use as limiters for Article searches. Formatted similar to
+ AND (PT Article OR PT Magazines OR PT News OR PT Academic Journals OR PT Conference Materials)'),
+ '#required' => TRUE,
+ );
+ $form['roblib_search_eds_book_limiters'] = array(
+ '#type' => 'textarea',
+ '#title' => t('The limiters for Books and Media searches'),
+ '#default_value' => variable_get('roblib_search_eds_book_limiters',
+ 'AND (PT Book OR PT Video OR PT Audio)'),
+ '#description' => t('Specify the Publication Types to use as limiters for Article searches. Formatted similar to
+ AND (PT Book OR PT Video OR PT Audio'),
+ '#required' => TRUE,
+ );
return system_settings_form($form);
@@ -235,7 +253,9 @@ function roblib_search_eds_get_results($query = NULL, $type = NULL) {
$eds_api = new EBSCOAPI($config);
$number_per_page = variable_get('roblib_search_eds_num_results', '5');
$query = urlencode($query);
- $params = "query=AND,$query&view=detailed&includefacets=n&$limiters&resultsperpage=$number_per_page";
+ $query .= $limiters;
+ //$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";
$output = $eds_api->apiSearch($params);
$output = roblib_search_eds_get_detailed_result($output, $query, $eds_api);
return json_encode($output);
@@ -255,17 +275,21 @@ function roblib_search_eds_get_query_limiters($type) {
$limiters = 'n';
switch ($type) {
case 'Articles':
- $limiters = 'facetfilter=1,SourceType:Magazines,SourceType:News,SourceType:Academic+Journals,SourceType:Conference+Materials';
+ //$limiters = 'facetfilter=1,SourceType:Magazines,SourceType:News,SourceType:Academic+Journals,SourceType:Conference+Materials';
+ $limiters = ' ' . variable_get('roblib_search_eds_article_limiters',
+ 'AND (PT Article OR PT Magazines OR PT News OR PT Academic Journals OR PT Conference Materials)');
break;
case 'Books':
// $limiters = '+AND+(PT+book)';
- $limiters = 'facetfilter=1,SourceType:Books,SourceType:Audio,SourceType:Videos';
+ //$limiters = 'facetfilter=1,PublicationType:Books,PublicationType:Audio,PublicationType:Videos';
+ $limiters = ' ' . variable_get('roblib_search_eds_book_limiters',
+ 'AND (PT Book OR PT Video OR PT Audio)');
break;
}
- return $limiters;
+ return urlencode($limiters);
}
function roblib_search_eds_build_config_arr() {