Skip to content
Snippets Groups Projects
Commit 4a5c6c22 authored by Laurent's avatar Laurent
Browse files

hotline #24891 babelio

Fix insertion of babelio comments when no local comments in record page
parent d2fa5311
Branches
Tags
1 merge request!947Hotline master
- ticket #24891 : Babelthèque: correction du chargement des avis lorsqu'aucun avis interne n'est présent sur la notice
\ No newline at end of file
......@@ -50,7 +50,7 @@ $.fn.babelthequeTag=function(info) {
var insertBabelthequeISBNTag = function(isbn) {
if (!$('input#BW_id_isbn'))
if (!$('input#BW_id_isbn').size())
$('body').append('<input type="hidden" id="BW_id_isbn" value="'+isbn+'"\>');
}
......@@ -74,8 +74,15 @@ var tagsNoticeAfterLoad = function(target) {
var avisNoticeAfterLoad = function(target) {
var tr_critiques = target.find('table tr:nth-child(2)');
if (!tr_critiques.find('ul').size())
$('ul').appendTo(tr_critiques);
var ul_critiques = tr_critiques.find('ul');
$('<li class="notes_avis_babeltheque"><span id="BW_notes"></span><span id="BW_critiques"></span> <span id="BW_critiques_pro"></span></li>')
.appendTo(target.find('table tr:nth-child(2) ul'));
.appendTo(ul_critiques);
}
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment