|
|
@ -22,27 +22,28 @@ |
|
|
|
var item = test[i]; |
|
|
|
if(item.librarian.includes(thename)){ |
|
|
|
ledocument = item.debrispath; |
|
|
|
lelibrarian = item.librarian; |
|
|
|
//put ledocument into li and nest inside ul |
|
|
|
var extension = ledocument.replace(/^.*\./, ''); |
|
|
|
console.log(ledocument); |
|
|
|
if ((extension=="jpg") || (extension=="jpeg") || (extension=="png") || (extension=="gif") || (extension=="tiff")) { |
|
|
|
$(".name-elements").append("<li><img class='listed-images' src='/files/"+ledocument+"'></li>"); |
|
|
|
$(".name-elements").append("<li><img class='listed-images' src='/files/"+ledocument+"'>Librarians: "+lelibrarian+"</li>"); |
|
|
|
} |
|
|
|
else if (extension=="pdf") { |
|
|
|
$(".name-elements").append("<li><embed class='listed-pdf' src='files/"+ledocument+"'/></li>"); |
|
|
|
$(".name-elements").append("<li><embed class='listed-pdf' src='files/"+ledocument+"'/>Librarians: "+lelibrarian+"</li>"); |
|
|
|
} |
|
|
|
else if (extension=="epub") { |
|
|
|
$(".name-elements").append("<li>"+ledocument+"</li>"); |
|
|
|
$(".name-elements").append("<li>"+ledocument+lelibrarian+"</li>"); |
|
|
|
} |
|
|
|
else if ((extension=="mp3") || (extension=="wav") || (extension=="m4a")) { |
|
|
|
$(".name-elements").append("<li><audio class='listed-audio' controls><source src='files/"+ledocument+"'></audio></li>"); |
|
|
|
$(".name-elements").append("<li><audio class='listed-audio' controls><source src='files/"+ledocument+"'></audio>Librarians: "+lelibrarian+"</li>"); |
|
|
|
} |
|
|
|
else if ((extension=="mov") || (extension=="mp4")) { |
|
|
|
$(".name-elements").append("<li><video class='listed-videos' controls><source src='files/"+ledocument+"'></video></li>"); |
|
|
|
$(".name-elements").append("<li><video class='listed-videos' controls><source src='files/"+ledocument+"'></video>Librarians: "+lelibrarian+"</li>"); |
|
|
|
} |
|
|
|
else if ((extension=="odt") || (extension=="docx")) { |
|
|
|
// something for odt and docx |
|
|
|
$(".name-elements").append("<li>"+ledocument+"</li>"); |
|
|
|
$(".name-elements").append("<li>"+ledocument+lelibrarian+"</li>"); |
|
|
|
}; |
|
|
|
}; |
|
|
|
}; |
|
|
|