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 0e5475586e3cefa9822f0a74f60f96bb333e6860 Author: Daniel Gruno <[email protected]> AuthorDate: Tue Dec 1 15:02:14 2020 +0100 fix links not firing due to no target --- webui/js/ponymail.js | 6 +++--- webui/js/source/render-email.js | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/webui/js/ponymail.js b/webui/js/ponymail.js index 010d2f8..bc18ebe 100644 --- a/webui/js/ponymail.js +++ b/webui/js/ponymail.js @@ -2876,16 +2876,16 @@ async function render_email_chatty(state, json) { toolbar.inject(replybutton); // permalink button - let linkbutton = new HTML('a', { href: 'thread/%s'.format(json.mid), title: "Permanent link to this email", class: 'btn toolbar_btn toolbar_button_link'}, new HTML('span', { class: 'glyphicon glyphicon-link'}, ' ')); + let linkbutton = new HTML('a', { href: 'thread/%s'.format(json.mid), title: "Permanent link to this email", target: '_self', class: 'btn toolbar_btn toolbar_button_link'}, new HTML('span', { class: 'glyphicon glyphicon-link'}, ' ')); toolbar.inject(linkbutton); // 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'}, ' ')); + let sourcebutton = new HTML('a', { href: '%sapi/source.lua?id=%s'.format(apiURL, json.mid), target: '_self', title: "View raw source", class: 'btn toolbar_btn toolbar_button_source'}, new HTML('span', { class: 'glyphicon glyphicon-file'}, ' ')); toolbar.inject(sourcebutton); // Admin button? if (ponymail_preferences.login && ponymail_preferences.login.credentials && ponymail_preferences.login.credentials.admin) { - let adminbutton = new HTML('a', { href: '#', title: "Administrative control", class: 'btn toolbar_btn toolbar_button_admin'}, new HTML('span', { class: 'glyphicon glyphicon-cog'}, ' ')); + let adminbutton = new HTML('a', { href: 'admin/%s'.format(json.mid), target: '_self', title: "Administrative control", class: 'btn toolbar_btn toolbar_button_admin'}, new HTML('span', { class: 'glyphicon glyphicon-cog'}, ' ')); toolbar.inject(adminbutton); } diff --git a/webui/js/source/render-email.js b/webui/js/source/render-email.js index 6aa63bf..bfb1d90 100644 --- a/webui/js/source/render-email.js +++ b/webui/js/source/render-email.js @@ -164,16 +164,16 @@ async function render_email_chatty(state, json) { toolbar.inject(replybutton); // permalink button - let linkbutton = new HTML('a', { href: 'thread/%s'.format(json.mid), title: "Permanent link to this email", class: 'btn toolbar_btn toolbar_button_link'}, new HTML('span', { class: 'glyphicon glyphicon-link'}, ' ')); + let linkbutton = new HTML('a', { href: 'thread/%s'.format(json.mid), title: "Permanent link to this email", target: '_self', class: 'btn toolbar_btn toolbar_button_link'}, new HTML('span', { class: 'glyphicon glyphicon-link'}, ' ')); toolbar.inject(linkbutton); // 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'}, ' ')); + let sourcebutton = new HTML('a', { href: '%sapi/source.lua?id=%s'.format(apiURL, json.mid), target: '_self', title: "View raw source", class: 'btn toolbar_btn toolbar_button_source'}, new HTML('span', { class: 'glyphicon glyphicon-file'}, ' ')); toolbar.inject(sourcebutton); // Admin button? if (ponymail_preferences.login && ponymail_preferences.login.credentials && ponymail_preferences.login.credentials.admin) { - let adminbutton = new HTML('a', { href: '#', title: "Administrative control", class: 'btn toolbar_btn toolbar_button_admin'}, new HTML('span', { class: 'glyphicon glyphicon-cog'}, ' ')); + let adminbutton = new HTML('a', { href: 'admin/%s'.format(json.mid), target: '_self', title: "Administrative control", class: 'btn toolbar_btn toolbar_button_admin'}, new HTML('span', { class: 'glyphicon glyphicon-cog'}, ' ')); toolbar.inject(adminbutton); }
