commit 18c9f2c: [WebUI] Hide symbol order toggle in search dropdown

moisseev moiseev at mezonplus.ru
Fri Aug 26 13:42:03 UTC 2022


Author: moisseev
Date: 2022-08-26 14:15:09 +0300
URL: https://github.com/rspamd/rspamd/commit/18c9f2c9c8ded2d3165c7f80eaa8febbaf58ecfe (refs/pull/4250/head)

[WebUI] Hide symbol order toggle in search dropdown

---
 interface/css/rspamd.css    |  3 +++
 interface/js/app/history.js | 20 +++++++++++---------
 interface/js/app/upload.js  | 20 +++++++++++---------
 3 files changed, 25 insertions(+), 18 deletions(-)

diff --git a/interface/css/rspamd.css b/interface/css/rspamd.css
index 9e09b13a5..044bdd645 100644
--- a/interface/css/rspamd.css
+++ b/interface/css/rspamd.css
@@ -377,6 +377,9 @@ table#symbolsTable input[type="number"] {
         white-space: nowrap;
     }
 }
+.footable-filtering-search .dropdown-menu .sym-order-toggle {
+    display: none;
+}
 
 #history_page_size {
     width: 6em !important;
diff --git a/interface/js/app/history.js b/interface/js/app/history.js
index c511db25d..1812a6429 100644
--- a/interface/js/app/history.js
+++ b/interface/js/app/history.js
@@ -140,15 +140,17 @@ define(["jquery", "footable"],
                 sortValue: function (val) { return Number(val.options.sortValue); }
             }, {
                 name: "symbols",
-                title: "Symbols<br /><br />" +
-                        '<span style="font-weight:normal;">Sort by:</span><br />' +
-                        '<div class="btn-group btn-group-toggle btn-group-xs btn-sym-order-history" data-toggle="buttons">' +
-                            '<label type="button" class="btn btn-outline-secondary btn-sym-history-magnitude">' +
-                                '<input type="radio" value="magnitude">Magnitude</label>' +
-                            '<label type="button" class="btn btn-outline-secondary btn-sym-history-score">' +
-                                '<input type="radio" value="score">Value</label>' +
-                            '<label type="button" class="btn btn-outline-secondary btn-sym-history-name">' +
-                                '<input type="radio" value="name">Name</label>' +
+                title: "Symbols" +
+                        '<div class="sym-order-toggle">' +
+                            '<br><span style="font-weight:normal;">Sort by:</span><br>' +
+                            '<div class="btn-group btn-group-toggle btn-group-xs btn-sym-order-history" data-toggle="buttons">' +
+                                '<label type="button" class="btn btn-outline-secondary btn-sym-history-magnitude">' +
+                                    '<input type="radio" value="magnitude">Magnitude</label>' +
+                                '<label type="button" class="btn btn-outline-secondary btn-sym-history-score">' +
+                                    '<input type="radio" value="score">Value</label>' +
+                                '<label type="button" class="btn btn-outline-secondary btn-sym-history-name">' +
+                                    '<input type="radio" value="name">Name</label>' +
+                            "</div>" +
                         "</div>",
                 breakpoints: "all",
                 style: {
diff --git a/interface/js/app/upload.js b/interface/js/app/upload.js
index cef5c596e..4290f9b06 100644
--- a/interface/js/app/upload.js
+++ b/interface/js/app/upload.js
@@ -100,15 +100,17 @@ define(["jquery"],
                 sortValue: function (val) { return Number(val.options.sortValue); }
             }, {
                 name: "symbols",
-                title: "Symbols<br /><br />" +
-                        '<span style="font-weight:normal;">Sort by:</span><br />' +
-                        '<div class="btn-group btn-group-toggle btn-group-xs btn-sym-order-scan" data-toggle="buttons">' +
-                            '<label type="button" class="btn btn-outline-secondary btn-sym-scan-magnitude">' +
-                                '<input type="radio" value="magnitude">Magnitude</label>' +
-                            '<label type="button" class="btn btn-outline-secondary btn-sym-scan-score">' +
-                                '<input type="radio" value="score">Value</label>' +
-                            '<label type="button" class="btn btn-outline-secondary btn-sym-scan-name">' +
-                                '<input type="radio" value="name">Name</label>' +
+                title: "Symbols" +
+                        '<div class="sym-order-toggle">' +
+                            '<br><span style="font-weight:normal;">Sort by:</span><br>' +
+                            '<div class="btn-group btn-group-toggle btn-group-xs btn-sym-order-scan" data-toggle="buttons">' +
+                                '<label type="button" class="btn btn-outline-secondary btn-sym-scan-magnitude">' +
+                                    '<input type="radio" value="magnitude">Magnitude</label>' +
+                                '<label type="button" class="btn btn-outline-secondary btn-sym-scan-score">' +
+                                    '<input type="radio" value="score">Value</label>' +
+                                '<label type="button" class="btn btn-outline-secondary btn-sym-scan-name">' +
+                                    '<input type="radio" value="name">Name</label>' +
+                            "</div>" +
                         "</div>",
                 breakpoints: "all",
                 style: {


More information about the Commits mailing list