Commit d3a2e21f authored by Gabriela Bittencourt's avatar Gabriela Bittencourt
Browse files

Fix spacing display of results.

Add a paragraph to description and related objects and remove some
spacing margin.
parent a4ab1cde
Pipeline #3673 canceled with stage
......@@ -387,8 +387,10 @@ function display_toc() {
header.appendChild(a);
div.appendChild(header);
if (doc.description) {
text_node = document.createTextNode(doc.description);
div.appendChild(text_node);
var p_desc = document.createElement("p");
p_desc.innerHTML = doc.description;
p_desc.style.marginTop = "-12px";
div.appendChild(p_desc);
}
} catch (e) {
// entry doesn't exist, ignore it
......@@ -819,8 +821,7 @@ function display_doc(doc) {
var div = document.createElement("div"),
a = document.createElement("a"),
results_elem = document.getElementById("results"),
header,
text_node;
header;
a.href = "javascript: pdgui.doc_open('" +
pdgui.defunkify_windows_path(path.dirname(doc.id)) + "', '" +
pdgui.defunkify_windows_path(path.basename(doc.id)) + "');"
......@@ -831,12 +832,16 @@ function display_doc(doc) {
header.appendChild(a);
div.appendChild(header);
if (doc.description) {
text_node = document.createTextNode(doc.description);
div.appendChild(text_node);
var p_desc = document.createElement("p");
p_desc.innerHTML = doc.description;
p_desc.style.marginTop = "-12px";
div.appendChild(p_desc);
}
if (doc.related_objects) {
text_node = document.createTextNode("\n Related objects: " + doc.related_objects.toString());
div.appendChild(text_node);
var p_rel_objs = document.createElement("p");
p_rel_objs.innerHTML = "related objects: ".bold() + doc.related_objects.toString();
p_rel_objs.style.marginTop = "-15px";
div.appendChild(p_rel_objs);
}
results_elem.appendChild(div);
toc_bookmark_update(current_dir);
......@@ -871,7 +876,7 @@ function doc_search() {
title: {boost: 64, expand: true},
keywords: {boost: 8, expand: true},
description: {boost: 2},
related_objects: {boost: 1}
related_objects: {boost: 1, expand: true}
}
});
// Increase priority of pd-l2ork docs over externals docs
......
Markdown is supported
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