This is an automated email from the ASF dual-hosted git repository. humbedooh pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/incubator-ponymail-foal.git
commit 57d441c7fe9ef79929c090db271d7017e789271d Author: Daniel Gruno <[email protected]> AuthorDate: Tue Dec 1 13:14:42 2020 +0100 Add an admin control button for emails. Does not do anything yet. --- webui/css/scaffolding.css | 7 +++++++ webui/js/ponymail.js | 4 ++++ webui/js/source/render-email.js | 4 ++++ 3 files changed, 15 insertions(+) diff --git a/webui/css/scaffolding.css b/webui/css/scaffolding.css index 04b2b2c..c74953b 100644 --- a/webui/css/scaffolding.css +++ b/webui/css/scaffolding.css @@ -1149,6 +1149,13 @@ a.disabled { text-indent: 1px; } + +.toolbar_button_admin { + background: #e5c30b; + color: #FFF !important; + text-indent: 1px; +} + pre { word-break:keep-all; word-wrap:normal; diff --git a/webui/js/ponymail.js b/webui/js/ponymail.js index 47a3a3e..6e9cd2e 100644 --- a/webui/js/ponymail.js +++ b/webui/js/ponymail.js @@ -2882,6 +2882,10 @@ async function render_email_chatty(state, json) { // Source-view button let sourcebutton = new HTML('a', { href: '%sapi/source.lua?id=%s'.format(apiURL, json.mid), title: "View raw source", class: 'btn toolbar_btn toolbar_button_source'}, new HTML('span', { class: 'glyphicon glyphicon-file'}, ' ')); toolbar.inject(sourcebutton); + + // Admin button? + let adminbutton = new HTML('a', { href: '#', title: "Administrative control", class: 'btn toolbar_btn toolbar_button_admin'}, new HTML('span', { class: 'glyphicon glyphicon-cog'}, ' ')); + toolbar.inject(adminbutton); text.inject(toolbar); } diff --git a/webui/js/source/render-email.js b/webui/js/source/render-email.js index af51496..fe8edd2 100644 --- a/webui/js/source/render-email.js +++ b/webui/js/source/render-email.js @@ -170,6 +170,10 @@ async function render_email_chatty(state, json) { // Source-view button let sourcebutton = new HTML('a', { href: '%sapi/source.lua?id=%s'.format(apiURL, json.mid), title: "View raw source", class: 'btn toolbar_btn toolbar_button_source'}, new HTML('span', { class: 'glyphicon glyphicon-file'}, ' ')); toolbar.inject(sourcebutton); + + // Admin button? + let adminbutton = new HTML('a', { href: '#', title: "Administrative control", class: 'btn toolbar_btn toolbar_button_admin'}, new HTML('span', { class: 'glyphicon glyphicon-cog'}, ' ')); + toolbar.inject(adminbutton); text.inject(toolbar); }
