diff --git a/targets/eds/js/eds_results.js b/targets/eds/js/eds_results.js index 3ba6538..049555a 100644 --- a/targets/eds/js/eds_results.js +++ b/targets/eds/js/eds_results.js @@ -17,6 +17,13 @@ Drupal.behaviors.roblib_search_eds = { var counter = 0; var divs = new Array(); var content = new Array(); + var queries = []; + jQuery.each(data.queries, function (key7, query) { + queries.push(query.query); + }) + var query_str = data.queries[0].query; + var href_str = 'http://search.ebscohost.com/login.aspx?direct=true&site=eds-live&scope=site&type=1&custid=uprince&groupid=main&profid=lite&mode=bool&lang=en&bquery='; + jQuery.each(data.documents, function (key, val) { id = 'roblib-search-eds-' + counter; divs[counter++] = id; @@ -58,19 +65,13 @@ Drupal.behaviors.roblib_search_eds = { } } items.push(''); + } else { + items.push('
You must login to view this result, click here to login
' ); } }); jQuery('#' + 'roblib-search-content-eds').empty().append(items.join('')); } - var queries = []; - jQuery.each(data.queries, function (key7, query) { - queries.push(query.query); - }) - var query_str = data.queries[0].query; - //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=eds-live&scope=site&type=1&custid=uprince&groupid=main&profid=lite&mode=bool&lang=en&bquery='; jQuery('#roblib-search-eds-more').empty().append('See all results (' + data.recordCount + ')'); jQuery('#roblib-eds-books-more-results').empty().append('See all results (' + data.recordCount + ')'); jQuery('#roblib-eds-books-toc').empty().append('Books (' + data.recordCount + ')'); @@ -79,6 +80,7 @@ Drupal.behaviors.roblib_search_eds = { } } + function roblib_intersects(a, b) { var d = {}; var results = []; diff --git a/targets/eds/js/eds_results_article.js b/targets/eds/js/eds_results_article.js index a00488e..ef58a70 100644 --- a/targets/eds/js/eds_results_article.js +++ b/targets/eds/js/eds_results_article.js @@ -17,7 +17,12 @@ Drupal.behaviors.roblib_search_eds_articles = { var counter = 0; var divs = new Array(); var content = new Array(); - docs = data.documents; + var queries = []; + jQuery.each(data.queries, function (key7, query) { + queries.push(query.query); + }) + var query_str = data.queries[0].query; + var href_str = 'http://search.ebscohost.com/login.aspx?direct=true&site=eds-live&scope=site&type=1&custid=uprince&groupid=main&profile=eds&mode=bool&lang=en&bquery='; jQuery.each(data.documents, function (key, val) { id = 'roblib-search-eds-article-' + counter; divs[counter++] = id; @@ -58,17 +63,13 @@ Drupal.behaviors.roblib_search_eds_articles = { } items.push(''); + } else { + items.push('
You must login to view this result, click here to login
' ); } }); jQuery('#' + 'roblib-search-content-eds-articles').empty().append(items.join('')); } - var queries = []; - jQuery.each(data.queries, function (key7, query) { - queries.push(query.query); - }) - var query_str = data.queries[0].query; - var href_str = 'http://search.ebscohost.com/login.aspx?direct=true&site=eds-live&scope=site&type=1&custid=uprince&groupid=main&profile=eds&mode=bool&lang=en&bquery='; jQuery('#roblib-search-eds-article-more').empty().append('See all results (' + data.recordCount + ')'); jQuery('#roblib-eds-articles-more-results').empty().append('See all results (' + data.recordCount + ')'); jQuery('#roblib-eds-articles-toc').empty().append('Articles (' + data.recordCount + ')'); diff --git a/targets/eds/roblib_search_eds.module b/targets/eds/roblib_search_eds.module index afcbfcd..f2689bd 100644 --- a/targets/eds/roblib_search_eds.module +++ b/targets/eds/roblib_search_eds.module @@ -151,7 +151,7 @@ function roblib_search_eds_permission() { return array( 'search roblib eds' => array( 'title' => t('Search the eds target'), - 'description' => t('Search oblib eds target. This permission exposes the search blocks and allows you to see search results.'), + 'description' => t('Search Roblib eds target. This permission exposes the search blocks and allows you to see search results.'), ), 'administer roblib search eds' => array( 'title' => t('Administer Roblib Search EDS'),