Javascript code now uses all relevant CSS styles (purebibtex for <pre>)

This commit is contained in:
Martin Monperrus
2011-03-15 20:44:34 +01:00
parent 5efc0cdf9a
commit 9ba3742f65
+1 -1
View File
@@ -1738,7 +1738,7 @@ $('a.biburl').each(function(item) { // for each url "[bib]"
if (biburl.nextAll('pre').length == 0) { // we don't have yet the bibtex data if (biburl.nextAll('pre').length == 0) { // we don't have yet the bibtex data
var bibtexEntryUrl = $(this).attr('href'); var bibtexEntryUrl = $(this).attr('href');
$.ajax({url: bibtexEntryUrl, dataType: 'xml', success: function (data) { // we download it $.ajax({url: bibtexEntryUrl, dataType: 'xml', success: function (data) { // we download it
var elem = $('<pre/>'); // the element containing bibtex entry, creating a new element is required for Chrome and IE var elem = $('<pre class="purebibtex"/>'); // the element containing bibtex entry, creating a new element is required for Chrome and IE
elem.text($('.purebibtex', data).text()); // both text() is required for IE elem.text($('.purebibtex', data).text()); // both text() is required for IE
// we add a link so that users clearly see that even with AJAX // we add a link so that users clearly see that even with AJAX
// there is still one URL per paper (which is important for crawlers and metadata) // there is still one URL per paper (which is important for crawlers and metadata)