From 0de3c36c39096768a41a63dd12cf14f53612448b Mon Sep 17 00:00:00 2001 From: Paul Pound Date: Mon, 23 Jun 2014 12:03:51 -0300 Subject: [PATCH] added hover popup for islandscholar target --- targets/evergreen/js/evergreen_results.js | 6 +++--- targets/islandscholar/js/islandscholar_results.js | 13 +++++++++++-- 2 files changed, 14 insertions(+), 5 deletions(-) diff --git a/targets/evergreen/js/evergreen_results.js b/targets/evergreen/js/evergreen_results.js index f6473d3..18b7469 100644 --- a/targets/evergreen/js/evergreen_results.js +++ b/targets/evergreen/js/evergreen_results.js @@ -64,12 +64,12 @@ Drupal.behaviors.roblib_search_evergreen = { function populatePopupDivs(content, val, counter){ content[counter] = ''; var placeOfPublication = ''; - if(typeof val.publisher !== 'undefined'){ - content[counter] += '
Publisher: ' + val.publisher ; + if(typeof val.pop !== 'undefined'){ + content[counter] += '
Publisher: ' + val.pop ; placeOfPublication = '
'; } if(typeof val.pop !== 'undefined' ){ - placeOfPublication = val.pop + ' ' +placeOfPublication; + placeOfPublication = val.publisher + ' ' +placeOfPublication; } content[counter] += placeOfPublication; diff --git a/targets/islandscholar/js/islandscholar_results.js b/targets/islandscholar/js/islandscholar_results.js index ea5a219..0bdc91e 100644 --- a/targets/islandscholar/js/islandscholar_results.js +++ b/targets/islandscholar/js/islandscholar_results.js @@ -13,8 +13,17 @@ Drupal.behaviors.roblib_search_islandscholar = { jQuery('#' + 'roblib-search-content-islandscholar').empty().append('No Results'); jQuery('.' + 'pane-roblib-search-islandscholar-roblib-islandscholar-results').hide(); } else { + var counter = 0; + var divs = new Array(); + var content = new Array(); jQuery.each(data.response.docs, function(key, val) { - items.push('
\n\ + id = 'roblib_search_islandscholar_' + counter; + content[counter] = ''; + if(typeof val['mods.abstract'] !== 'undefined' ){ + content[counter] = val['mods.abstract']; + } + divs[counter++] = id; + items.push('
\n\ '); try { @@ -95,7 +104,7 @@ Drupal.behaviors.roblib_search_islandscholar = { var scholarUrl = "http://www.islandscholar.ca/islandora/solr/search/" jQuery('#roblib-search-islandscholar-more').empty().append('see all ' + number + ' results'); - + qtipify(divs, content, 'Abstract'); //items = showMoreItems(items, number); } });