diff --git a/targets/evergreen/js/evergreen_results.js b/targets/evergreen/js/evergreen_results.js
index 78f3363..e84ac04 100644
--- a/targets/evergreen/js/evergreen_results.js
+++ b/targets/evergreen/js/evergreen_results.js
@@ -13,9 +13,14 @@ Drupal.behaviors.roblib_search_evergreen = {
jQuery('#' + 'roblib-search-content-evergreen').empty().append('No Results');
jQuery('.pane-roblib-search-evergreen-roblib-search-evergreen-results').hide();
} else {
+ var counter = 0;
+ var divs = new Array();
+ var content = new Array();
jQuery.each(data, function(key, val) {
-
- items.push('
');
+ id = 'roblib_search_evergreen_' + counter;
+ populatePopupDivs(content, val, counter);
+ divs[counter++] = id;
+ items.push('
');
items.push('
')
}
items.push('
');
- });
+ });
+ jQuery('#roblib-search-content-evergreen').empty().append(items.join(''));
+ qtipify(divs, content, 'More Info');
}
- jQuery('#roblib-search-content-evergreen').empty().append(items.join(''));
+
jQuery('#roblib-search-evergreen-more').empty().append('
See all ' + data.numberOfRecords + ' results');
});
}
}
+function populatePopupDivs(content, val, counter){
+ content[counter] = '';
+ if(typeof val.publisher !== 'undefined'){
+ content[counter] += '
Publisher: ' + val.publisher +'
';
+ }
+ if(typeof val.pop !== 'undefined'){
+ content[counter] += '
Place of Publication: ' + val.pop +'
';
+ }
+ if(typeof val.numofpages !== 'undefined'){
+ content[counter] += '
Number of Pages: ' + val.numofpages +'
';
+ }
+ if(typeof val.date !== 'undefined'){
+ content[counter] += '';
+ }
+ var subjects = '';
+ if(typeof val.subjectsa !== 'undefined'){
+ subjects += val.subjectsa;
+ }
+ if(typeof val.subjectsb !== 'undefined'){
+ subjects += ' ' + val.subjectsb;
+ }
+ if(typeof val.subjectsc !== 'undefined'){
+ subjects += ' ' + val.subjectsc;
+ }
+ if(subjects){
+ content[counter] += '
Subjects: ' + subjects + '
';
+ }
+
+
+}
+
function roblibEvergreenAddHoldings(holdings, items){
items.push('
' + holdings.call_number + ' - ' + holdings.location +' (' + holdings.availability + ')
');
}
diff --git a/targets/evergreen/roblib_search_evergreen.module b/targets/evergreen/roblib_search_evergreen.module
index 999782e..25d486c 100644
--- a/targets/evergreen/roblib_search_evergreen.module
+++ b/targets/evergreen/roblib_search_evergreen.module
@@ -217,6 +217,12 @@ function roblib_search_evergreen_parse_results($results, $query) {
roblib_search_evergreen_update_array($output, $index, 'sor', $record->xpath('marcxml:datafield[@tag="245"]/marcxml:subfield[@code="c"]'));
roblib_search_evergreen_update_array($output, $index, 'date', $record->xpath('marcxml:datafield[@tag="260"]/marcxml:subfield[@code="c"]'));
roblib_search_evergreen_update_array($output, $index, 'id', $record->xpath('marcxml:datafield[@tag="901"]/marcxml:subfield[@code="c"]'));
+ roblib_search_evergreen_update_array($output, $index, 'publisher', $record->xpath('marcxml:datafield[@tag="260"]/marcxml:subfield[@code="a"]'));
+ roblib_search_evergreen_update_array($output, $index, 'pop', $record->xpath('marcxml:datafield[@tag="260"]/marcxml:subfield[@code="b"]'));
+ roblib_search_evergreen_update_array($output, $index, 'numofpages', $record->xpath('marcxml:datafield[@tag="300"]/marcxml:subfield[@code="a"]'));
+ roblib_search_evergreen_update_array($output, $index, 'subjectsa', $record->xpath('marcxml:datafield[@tag="650"]/marcxml:subfield[@code="a"]'));
+ roblib_search_evergreen_update_array($output, $index, 'subjectsb', $record->xpath('marcxml:datafield[@tag="650"]/marcxml:subfield[@code="b"]'));
+ roblib_search_evergreen_update_array($output, $index, 'subjectsc', $record->xpath('marcxml:datafield[@tag="650"]/marcxml:subfield[@code="c"]'));
roblib_search_evergreen_holdings($output, $index, $record->xpath('marcxml:datafield[@tag="852"]'));
roblib_search_evergreen_electronic_holdings($output, $index, $record->xpath('marcxml:datafield[@tag="856"]'));
$id = $output[$index]['id'];