Browse Source

added hover pop up for cufts results

2.x-ebsco
Paul Pound 11 years ago
parent
commit
2275ea4409
  1. 44
      targets/cufts/js/cufts_results.js

44
targets/cufts/js/cufts_results.js

@ -13,48 +13,34 @@ Drupal.behaviors.roblib_search_cufts = {
jQuery('#' + 'roblib-search-content-cufts').empty().append('No Results'); jQuery('#' + 'roblib-search-content-cufts').empty().append('No Results');
jQuery('.' + 'pane-roblib-search-cufts-roblib-search-cufts-results').hide(); jQuery('.' + 'pane-roblib-search-cufts-roblib-search-cufts-results').hide();
} else { } else {
var counter = 0;
var divs = new Array();
var content = new Array();
jQuery.each(data.journals, function(key, val) { jQuery.each(data.journals, function(key, val) {
var item_str = '<div class ="roblib-search-row">'; id = 'roblib_cufts_results_' + counter;
content[counter] = "";
divs[counter] = id;
var item_str = '<div class ="roblib-search-row" id="' + id + '">';
item_str += '<div class="roblib-title cufts">'; item_str += '<div class="roblib-title cufts">';
item_str += '<a href = "' + val.url + '">' + val.title + '</a>'; item_str += '<a href = "' + val.url + '">' + val.title + '</a>';
item_str += '</div>'; item_str += '</div>';
jQuery.each(val.fulltext_coverages, function(key3, val3) {
//item_str += '<div class="cufts-issns">ISSN: '; if(typeof val3 !== 'undefined' && val3 != null ){
//jQuery.each(val.issns, function(key2, val2) { content[counter] += '<div class="cufts-coverage">' + val3 + "</div>";
// var newIssn = ""; }
// var issn = val2.toString(); });
// if (issn.length == 8) counter++;
// {
// newIssn = issn.substr(0, 4) + '-' + issn.substr(4, 4);
// }
// else
// {
// newIssn = issn;
// }
// item_str += newIssn + ',';
//});
//item_str += '</div>';
//item_str += '<div class="cufts-fulltext-coverages">';
//jQuery.each(val.fulltext_coverages, function(key3, val3) {
// item_str += val3 + " ";
//});
//item_str += '</div>';
item_str += '</div>'; item_str += '</div>';
items.push(item_str); items.push(item_str);
}); });
jQuery('#' + 'roblib-search-content-cufts').empty().append(items.join(''));
qtipify(divs, content, 'Coverage');
} }
var originURL = settings.roblib_search_cufts.url; var originURL = settings.roblib_search_cufts.url;
var originSuffix = settings.roblib_search_cufts.suffix; var originSuffix = settings.roblib_search_cufts.suffix;
var newSuffix = originSuffix.replace("&format=json", ""); var newSuffix = originSuffix.replace("&format=json", "");
if (parseInt(data.numOfResults) > 0) if (parseInt(data.numOfResults) > 0)
{ {
jQuery('#' + 'roblib-search-content-cufts').empty().append(items.join(''));
jQuery('#' + 'roblib-search-cufts-more').empty().append('<a href="' + originURL + newSuffix + '">see all ' + data.numOfResults + ' results</a>'); jQuery('#' + 'roblib-search-cufts-more').empty().append('<a href="' + originURL + newSuffix + '">see all ' + data.numOfResults + ' results</a>');
} }
else else

Loading…
Cancel
Save