commit fcc7e2c: [WebUI] Hide extra To detail row on small screens

moisseev moiseev at mezonplus.ru
Sun Aug 28 12:00:03 UTC 2022


Author: moisseev
Date: 2022-08-28 11:16:01 +0300
URL: https://github.com/rspamd/rspamd/commit/fcc7e2cb88e2dc50db789f185b1372c49b0ae135 (refs/pull/4254/head)

[WebUI] Hide extra To detail row on small screens

---
 interface/js/app/history.js | 1 +
 interface/js/app/rspamd.js  | 9 +++++++++
 2 files changed, 10 insertions(+)

diff --git a/interface/js/app/history.js b/interface/js/app/history.js
index 1812a6429..b9b3831ea 100644
--- a/interface/js/app/history.js
+++ b/interface/js/app/history.js
@@ -98,6 +98,7 @@ define(["jquery", "footable"],
                 title: "[Envelope To] To/Cc/Bcc",
                 breakpoints: "xs sm md",
                 filterable: false,
+                classes: "d-none d-xl-table-cell",
                 style: {
                     "font-size": "11px",
                     "minWidth": 100,
diff --git a/interface/js/app/rspamd.js b/interface/js/app/rspamd.js
index ecb034a86..c5b28968c 100644
--- a/interface/js/app/rspamd.js
+++ b/interface/js/app/rspamd.js
@@ -751,6 +751,15 @@ function ($, visibility, NProgress, stickyTabs, tab_stat, tab_graph, tab_config,
 
 
     ui.initHistoryTable = function (rspamd, data, items, table, columns, expandFirst) {
+        /* eslint-disable no-underscore-dangle */
+        FooTable.Cell.extend("collapse", function () {
+            // call the original method
+            this._super();
+            // Copy cell classes to detail row tr element
+            this._setClasses(this.$detail);
+        });
+        /* eslint-enable no-underscore-dangle */
+
         /* eslint-disable consistent-this, no-underscore-dangle, one-var-declaration-per-line */
         FooTable.actionFilter = FooTable.Filtering.extend({
             construct: function (instance) {


More information about the Commits mailing list