commit e4446ad: [WebUI] Tweak history table layout

moisseev moiseev at mezonplus.ru
Wed Jun 29 19:56:04 UTC 2022


Author: moisseev
Date: 2022-06-29 17:52:57 +0300
URL: https://github.com/rspamd/rspamd/commit/e4446ad2c2a75154025d7d96a9195aa8c7108725 (refs/pull/4209/head)

[WebUI] Tweak history table layout

---
 interface/css/rspamd.css    | 6 ++++++
 interface/js/app/history.js | 5 ++++-
 2 files changed, 10 insertions(+), 1 deletion(-)

diff --git a/interface/css/rspamd.css b/interface/css/rspamd.css
index 4c279cda7..9e09b13a5 100644
--- a/interface/css/rspamd.css
+++ b/interface/css/rspamd.css
@@ -371,6 +371,12 @@ table#symbolsTable input[type="number"] {
 #historyTable_history > thead > tr > th {
     padding-right: 20px;
 }
+ at media (min-width: 576px) and (max-width: 1199px) {
+    .history-col-time {
+        /* Avoid taking multiple lines in every row when one of rows has long ID */
+        white-space: nowrap;
+    }
+}
 
 #history_page_size {
     width: 6em !important;
diff --git a/interface/js/app/history.js b/interface/js/app/history.js
index e6573cd1e..7409be597 100644
--- a/interface/js/app/history.js
+++ b/interface/js/app/history.js
@@ -132,7 +132,9 @@ define(["jquery", "footable"],
                 title: "Score",
                 style: {
                     "font-size": "11px",
-                    "maxWidth": 110
+                    "maxWidth": 110,
+                    "text-align": "right",
+                    "white-space": "nowrap"
                 },
                 sortValue: function (val) { return Number(val.options.sortValue); }
             }, {
@@ -172,6 +174,7 @@ define(["jquery", "footable"],
                 },
                 sortValue: function (val) { return Number(val); }
             }, {
+                classes: "history-col-time",
                 sorted: true,
                 direction: "DESC",
                 name: "time",


More information about the Commits mailing list