diff --git a/apps/home/static/home/js/tabs/styles.js b/apps/home/static/home/js/tabs/styles.js index 39b0e2e..f1b3a9a 100644 --- a/apps/home/static/home/js/tabs/styles.js +++ b/apps/home/static/home/js/tabs/styles.js @@ -11,53 +11,54 @@ function initMessageStylesModule() { { title: "Name", data: "name", - render: function(data, type, row) { - const btn = renderEditColumn(data); - return row.auto_created ? - $(btn).removeClass("edit-modal").addClass("disabled")[0] - : btn; + className: "col-name", + render: (name, type, style) => { + const elem = renderEditColumn(name); + return style.auto_created ? + $(elem).removeClass("edit-modal").addClass("disabled").attr("role", null)[0] + : elem; } }, { - title: "Is Embed", + title: "Embed", data: "is_embed", - className: "text-center", + className: "col-icon", render: renderBooleanColumn }, { - title: "Embed Colour", + title: "Colour", data: "colour", - className: "text-center", + className: "col-hex", render: renderHexColourColumn }, { - title: "Is Hyperlinked", + title: "Hyperlinked", data: "is_hyperlinked", - className: "text-center", + className: "col-icon-wide", render: renderBooleanColumn }, { - title: "Show Author", + title: "Authored", data: "show_author", - className: "text-center", + className: "col-icon-wide", render: renderBooleanColumn }, { - title: "Show Timestamp", + title: "Timestamped", data: "show_timestamp", - className: "text-center", + className: "col-icon-wide", render: renderBooleanColumn }, { - title: "Show Images", + title: "Images", data: "show_images", - className: "text-center", + className: "col-icon", render: renderBooleanColumn }, - { + { title: "Fetch Images", data: "fetch_images", - className: "text-center", + className: "col-icon-wide", render: renderBooleanColumn }, { diff --git a/apps/home/static/home/scss/tables.scss b/apps/home/static/home/scss/tables.scss index de2df59..4c357bb 100644 --- a/apps/home/static/home/scss/tables.scss +++ b/apps/home/static/home/scss/tables.scss @@ -88,6 +88,7 @@ .table { td, th { vertical-align: middle; } + th { text-wrap: nowrap; } // Top & bottom border colours border-color: var(--bs-border-color); @@ -141,12 +142,13 @@ .col { - &-checkbox { @include col-styles($col-check); } &-name { @include col-styles($col-label); } &-url { @include col-styles($col-url, $col-url * 2); } &-date { @include col-styles($col-date); } + &-checkbox { @include col-styles($col-check); } &-switch { @include col-styles($col-switch); } &-icon { text-align: center; @include col-styles($col-icon); } + &-icon-wide { text-align: center; @include col-styles($col-icon, $col-icon + 30px) } &-hex { text-align: center; @include col-styles($col-icon);