table remove text wrapping
This commit is contained in:
parent
8bb202e81d
commit
02c88293d8
@ -34,6 +34,7 @@ function initContentTable() {
|
|||||||
{
|
{
|
||||||
title: "Name",
|
title: "Name",
|
||||||
data: "title",
|
data: "title",
|
||||||
|
className: "text-truncate",
|
||||||
render: function(data, type, row) {
|
render: function(data, type, row) {
|
||||||
return `<a href="${row.url}" class="text-decoration-none" target="_blank">${data}</a>`
|
return `<a href="${row.url}" class="text-decoration-none" target="_blank">${data}</a>`
|
||||||
}
|
}
|
||||||
@ -41,6 +42,7 @@ function initContentTable() {
|
|||||||
{
|
{
|
||||||
title: "Subscription",
|
title: "Subscription",
|
||||||
data: "subscription.name",
|
data: "subscription.name",
|
||||||
|
className: "text-nowrap",
|
||||||
render: function(data, type, row) {
|
render: function(data, type, row) {
|
||||||
return `<a href="#" onclick="goToSubscription(${row.subscription.id})" class="text-decoration-none">${data}</a>`
|
return `<a href="#" onclick="goToSubscription(${row.subscription.id})" class="text-decoration-none">${data}</a>`
|
||||||
}
|
}
|
||||||
@ -56,6 +58,7 @@ function initContentTable() {
|
|||||||
{
|
{
|
||||||
title: "Created",
|
title: "Created",
|
||||||
data: "creation_datetime",
|
data: "creation_datetime",
|
||||||
|
className: "text-nowrap",
|
||||||
render: function(data, type) {
|
render: function(data, type) {
|
||||||
return `<small>${new Date(data).toISOString().replace('T', ' · ').replace(/\.\d+Z$/, '')}</small>`;
|
return `<small>${new Date(data).toISOString().replace('T', ' · ').replace(/\.\d+Z$/, '')}</small>`;
|
||||||
}
|
}
|
||||||
|
@ -34,18 +34,26 @@ function initSubscriptionTable() {
|
|||||||
{
|
{
|
||||||
title: "Name",
|
title: "Name",
|
||||||
data: "name",
|
data: "name",
|
||||||
|
className: "text-truncate",
|
||||||
render: function(data, type, row) {
|
render: function(data, type, row) {
|
||||||
return `<a href="#" onclick="showEditSubModal(${row.id})" class="text-decoration-none">${data}</a>`
|
return `<a href="#" onclick="showEditSubModal(${row.id})" class="text-decoration-none">${data}</a>`;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: "URL",
|
title: "URL",
|
||||||
data: "url",
|
data: "url",
|
||||||
|
className: "text-truncate",
|
||||||
render: function(data, type) {
|
render: function(data, type) {
|
||||||
return `<a href="${data}" class="text-decoration-none" target="_blank">${data}</a>`
|
return `<a href="${data}" class="text-decoration-none" target="_blank">${data}</a>`;
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: "Channels",
|
||||||
|
data: "channels_count",
|
||||||
|
render: function(data) {
|
||||||
|
return `<span class="badge badge-secondary">${data}</span>`;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{ title: "Channels", data: "channels_count" },
|
|
||||||
// {
|
// {
|
||||||
// title: "Content",
|
// title: "Content",
|
||||||
// data: "channels_count",
|
// data: "channels_count",
|
||||||
@ -56,6 +64,7 @@ function initSubscriptionTable() {
|
|||||||
{
|
{
|
||||||
title: "Created",
|
title: "Created",
|
||||||
data: "creation_datetime",
|
data: "creation_datetime",
|
||||||
|
className: "small",
|
||||||
render: function(data, type) {
|
render: function(data, type) {
|
||||||
return new Date(data).toISOString().split("T")[0];
|
return new Date(data).toISOString().split("T")[0];
|
||||||
}
|
}
|
||||||
@ -66,8 +75,9 @@ function initSubscriptionTable() {
|
|||||||
orderable: false,
|
orderable: false,
|
||||||
className: "text-center",
|
className: "text-center",
|
||||||
render: function(data, type) {
|
render: function(data, type) {
|
||||||
if (!data) return "-";
|
if (!data) return "";
|
||||||
return $(`<i class="bi bi-chat-left-text" data-bs-trigger="hover focus" data-bs-toggle="popover" data-bs-title="Extra Notes" data-bs-content="${data}"></i>`).popover()[0];
|
return $(`
|
||||||
|
<i class="bi bi-chat-left-text" data-bs-trigger="hover focus" data-bs-toggle="popover" data-bs-title="Extra Notes" data-bs-content="${data}"></i>`).popover()[0];
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user