Browse Source

added hover popup for islandscholar target

2.x-ebsco
Paul Pound 11 years ago
parent
commit
0de3c36c39
  1. 6
      targets/evergreen/js/evergreen_results.js
  2. 13
      targets/islandscholar/js/islandscholar_results.js

6
targets/evergreen/js/evergreen_results.js

@ -64,12 +64,12 @@ Drupal.behaviors.roblib_search_evergreen = {
function populatePopupDivs(content, val, counter){ function populatePopupDivs(content, val, counter){
content[counter] = ''; content[counter] = '';
var placeOfPublication = ''; var placeOfPublication = '';
if(typeof val.publisher !== 'undefined'){ if(typeof val.pop !== 'undefined'){
content[counter] += '<div class="evergreen-publisher">Publisher: ' + val.publisher ; content[counter] += '<div class="evergreen-publisher">Publisher: ' + val.pop ;
placeOfPublication = '</div>'; placeOfPublication = '</div>';
} }
if(typeof val.pop !== 'undefined' ){ if(typeof val.pop !== 'undefined' ){
placeOfPublication = val.pop + ' ' +placeOfPublication; placeOfPublication = val.publisher + ' ' +placeOfPublication;
} }
content[counter] += placeOfPublication; content[counter] += placeOfPublication;

13
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('#' + 'roblib-search-content-islandscholar').empty().append('No Results');
jQuery('.' + 'pane-roblib-search-islandscholar-roblib-islandscholar-results').hide(); jQuery('.' + 'pane-roblib-search-islandscholar-roblib-islandscholar-results').hide();
} else { } else {
var counter = 0;
var divs = new Array();
var content = new Array();
jQuery.each(data.response.docs, function(key, val) { jQuery.each(data.response.docs, function(key, val) {
items.push('<div class ="roblib-search-row">\n\ id = 'roblib_search_islandscholar_' + counter;
content[counter] = '';
if(typeof val['mods.abstract'] !== 'undefined' ){
content[counter] = val['mods.abstract'];
}
divs[counter++] = id;
items.push('<div class ="roblib-search-row" id="' + id + '">\n\
<div class="roblib-title islandscholar">\n\ <div class="roblib-title islandscholar">\n\
<a href="http://www.islandscholar.ca/fedora/repository/' + val.PID +'">' + val.Title_sorted + '</a></div>'); <a href="http://www.islandscholar.ca/fedora/repository/' + val.PID +'">' + val.Title_sorted + '</a></div>');
try { try {
@ -95,7 +104,7 @@ Drupal.behaviors.roblib_search_islandscholar = {
var scholarUrl = "http://www.islandscholar.ca/islandora/solr/search/" var scholarUrl = "http://www.islandscholar.ca/islandora/solr/search/"
jQuery('#roblib-search-islandscholar-more').empty().append('<a id="islandscholar-see-more-result"' + jQuery('#roblib-search-islandscholar-more').empty().append('<a id="islandscholar-see-more-result"' +
' href="http://www.islandscholar.ca/islandora/solr/search/' + query + '">see all ' + number + ' results</a>'); ' href="http://www.islandscholar.ca/islandora/solr/search/' + query + '">see all ' + number + ' results</a>');
qtipify(divs, content, 'Abstract');
//items = showMoreItems(items, number); //items = showMoreItems(items, number);
} }
}); });

Loading…
Cancel
Save