diff --git a/targets/passthru_results/js/passthru_results.js b/targets/passthru_results/js/passthru_results.js index cbb5a67..87ad0c5 100644 --- a/targets/passthru_results/js/passthru_results.js +++ b/targets/passthru_results/js/passthru_results.js @@ -2,6 +2,7 @@ Drupal.behaviors.roblib_search_passthru = { attach: function (context, settings) { scholar_url = settings.roblib_search_passthru.scholar_search_url; evergreen_url = settings.roblib_search_passthru.evergreen_search_url; + eds_url = settings.roblib_search_passthru.eds_search_url; jQuery.getJSON(scholar_url, function (data) { var scholar_numfound = data.response.numFound; var query = encodeURIComponent(data.responseHeader.params.q); @@ -14,6 +15,12 @@ Drupal.behaviors.roblib_search_passthru = { jQuery('#roblib-search-passthru-evergreen-more').empty().append('PEI Collection (' + evergreen_numfound +')'); }); + jQuery.getJSON(eds_url, function (data) { + var eds_numfound = data.recordCount; + 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-passthru-eds-more').empty().append('Complete OneSearch results (' + + eds_numfound +')'); + }); jQuery('#roblib-search-content-passthru').empty(); } } diff --git a/targets/passthru_results/roblib_search_passthru.module b/targets/passthru_results/roblib_search_passthru.module index 603ddf7..9ab3deb 100644 --- a/targets/passthru_results/roblib_search_passthru.module +++ b/targets/passthru_results/roblib_search_passthru.module @@ -26,6 +26,13 @@ function roblib_search_passthru_menu() { 'type' => MENU_CALLBACK, 'access arguments' => ['search roblib'], ]; + $items['roblib_search/passthru/eds/ajax/%'] = [ + 'title' => 'eds ajax', + 'page callback' => 'roblib_search_passthru_eds_ajax', + 'page arguments' => [4], + 'type' => MENU_CALLBACK, + 'access arguments' => ['search roblib'], + ]; return $items; } @@ -36,6 +43,12 @@ function roblib_search_passthru_evergreen_ajax($query) { exit(); } +function roblib_search_passthru_eds_ajax($query) { + $output = roblib_search_eds_get_results($query); + print $output; + exit(); +} + /** * * @param string $query @@ -150,7 +163,6 @@ function roblib_search_passthru_block_view($delta = '') { */ function roblib_search_passthru_islandscholar_ajax($query) { $output = roblib_search_passthru_get_results($query); - debug($output, 'pp_passthru_content', TRUE); print $output; exit(); } diff --git a/targets/passthru_results/theme/roblib-search-passthru.tpl.php b/targets/passthru_results/theme/roblib-search-passthru.tpl.php index 61b29d4..1d59def 100644 --- a/targets/passthru_results/theme/roblib-search-passthru.tpl.php +++ b/targets/passthru_results/theme/roblib-search-passthru.tpl.php @@ -2,23 +2,30 @@ /** * @file roblib-search-passthru.tpl.php - */ ?> -
+
-
-
+
+
+
- Google Scholar + Google + Scholar
- Canadian Government Sites + Canadian + Government Sites
- Films on Demand + Films + on Demand
diff --git a/targets/passthru_results/theme/theme.inc b/targets/passthru_results/theme/theme.inc index ee6b15b..c57fe72 100644 --- a/targets/passthru_results/theme/theme.inc +++ b/targets/passthru_results/theme/theme.inc @@ -20,6 +20,7 @@ function roblib_search_passthru_preprocess_roblib_search_passthru(&$variables) { $variables['spinner_path'] = $spinner_path; $scholar_search_url = $base_url . '/roblib_search/passthru/scholar/ajax/' . urlencode($query); $evergreen_search_url = $base_url . '/roblib_search/passthru/evergreen/ajax/' . urlencode($query); + $eds_search_url = $base_url . '/roblib_search/passthru/eds/ajax/' . urlencode($query); drupal_add_js(drupal_get_path('module', 'roblib_search_passthru') . '/js/passthru_results.js'); drupal_add_js( @@ -27,6 +28,7 @@ function roblib_search_passthru_preprocess_roblib_search_passthru(&$variables) { 'roblib_search_passthru' => [ 'scholar_search_url' => $scholar_search_url, 'evergreen_search_url' => $evergreen_search_url, + 'eds_search_url' => $eds_search_url, ], ], ['type' => 'setting']);