Bug fixes, text encoding tag

This commit is contained in:
simon987
2018-04-14 22:31:55 -04:00
parent 8b55c3b681
commit 157d2c1ea5
10 changed files with 31 additions and 70 deletions

View File

@@ -39,6 +39,11 @@
background-color: #FFC107;
}
.badge-text {
color: #FFFFFF;
background-color: #FAAB3C;
}
.card-img-top {
@@ -324,7 +329,7 @@
if (hit.hasOwnProperty("highlight") && hit["highlight"].hasOwnProperty("name")) {
title.insertAdjacentHTML('afterbegin', hit["highlight"]["name"] + extension);
} else {
title.appendChild(document.createTextNode(hit["_source"]["name"]));
title.appendChild(document.createTextNode(hit["_source"]["name"] + extension));
}
title.setAttribute("title", hit["_source"]["path"] + hit["_source"]["name"] + extension);
@@ -415,6 +420,13 @@
formatTag.appendChild(document.createTextNode(hit["_source"]["format_name"]));
tags.push(formatTag);
break;
case "text":
formatTag = document.createElement("span");
formatTag.setAttribute("class", "badge badge-pill badge-text");
formatTag.appendChild(document.createTextNode(hit["_source"]["encoding"]));
tags.push(formatTag);
break;
}