Show only first line of script in index page

This commit is contained in:
Shweelan Samson authored and Zaid Abdulla committed 2018-12-27 01:21:18 -08:00
1 parent c702003c32
commit 28a6ec950e
2 files changed
+12 -8

No files matched your search

+9 -3
View File
@@ -181,9 +181,15 @@ function renderTable(
const tds = [m("td", checkbox)]; const tds = [m("td", checkbox)];
for (const attr of attributes) { for (const attr of attributes) {
if (attr.id == "script") if (attr.id == "script") {
tds.push(m("td", { title: provision[attr.id] }, provision[attr.id])); const firstLines = provision[attr.id].split("\n", 11);
else tds.push(m("td", provision[attr.id])); if (firstLines.length > 10) firstLines[10] = ["\ufe19"];
tds.push(
m("td", { title: firstLines.join("\n") }, firstLines[0] || "")
);
} else {
tds.push(m("td", provision[attr.id]));
}
} }
tds.push( tds.push(
+3 -5
View File
@@ -183,12 +183,10 @@ function renderTable(
const tds = [m("td", checkbox)]; const tds = [m("td", checkbox)];
for (const attr of attributes) { for (const attr of attributes) {
if (attr.id == "script") { if (attr.id == "script") {
const firstLines = virtualParameter[attr.id].split("\n", 11);
if (firstLines.length > 10) firstLines[10] = ["\ufe19"];
tds.push( tds.push(
m( m("td", { title: firstLines.join("\n") }, firstLines[0] || "")
"td",
{ title: virtualParameter[attr.id] },
virtualParameter[attr.id]
)
); );
} else { } else {
tds.push(m("td", virtualParameter[attr.id])); tds.push(m("td", virtualParameter[attr.id]));