Commit Graph

39 Commits

Author SHA1 Message Date
Thomas Lamprecht
f057ca9085 drop jslint hints
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2020-10-23 14:08:50 +02:00
Thomas Lamprecht
a36756b058 drop jslint hint for Proxmox global
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2020-10-23 14:03:17 +02:00
Thomas Lamprecht
c87d46fbe8 tree wide: eslint --fix
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2020-10-23 13:17:15 +02:00
Thomas Lamprecht
b9a5e7079d quarantine: display how many mails are selected
Mostly taken from a bigger patch of Dominik, for now lets just show
the count (release is near) and add some padding

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2020-04-24 16:16:37 +02:00
Dominik Csapak
72d8403cb6 Quarantine: set mailinfo visible only on html preview
We did already hide it when toggling raw/html, but when choosing raw
and changing the mail, it was again set to visible.
This patch fixes that by always taking 'me.raw' into account.

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2020-04-15 14:06:43 +02:00
Thomas Lamprecht
4935e8fb22 qurantine: hide mailinfo in raw mode
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2020-04-15 12:59:38 +02:00
Dominik Csapak
ac6c1fb818 fix #2676: add MailInfo box on Quarantine Views
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2020-04-14 15:00:33 +02:00
Thomas Lamprecht
07a9b44595 quarantine: set mail-dowanload link's download attribute again
to ensure the browser sets the download filename we need to set the
link elements download attribute[0].

fixes commit 41a290e3f0

[0]: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/a

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-11-22 12:21:41 +01:00
Dominik Csapak
38771d946b fix broken maillist when deleting last mail in list
on deleting the last mail in the list, the selection is empty and
the access below to 'rec.data.id' breaks, leaving the maillist broken
(until the user changed the panel or reloaded)

so give rec an empty fallback object and check if there is a 'data'
property and use that, otherwise set the id to the empty string

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
Tested-By: Stoiko Ivanov <s.ivanov@proxmox.com>
Reviewed-By: Stoiko Ivanov <s.ivanov@proxmox.com>
2019-11-14 13:34:56 +01:00
Thomas Lamprecht
550a2c5b7c SpamQuarantine: onSelectMail: re-use queried selection
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-10-25 12:37:05 +02:00
Thomas Lamprecht
41a290e3f0 SpamQuarantine: simplify download button by binding its href config
This avoids all the strange click event hack. We already have a
button where the users needs to click on, so just use that.

A viewModel with a downloadMailURL formula to assemble the href
allows us to just bind the "href" config from the Download button,
and be done with it..

refactors commit 7ad0de10d6

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-10-25 12:23:43 +02:00
Dominik Csapak
8b1d19f3a1 SpamQuarantine: fix download of large emails
since datauri downloads are size limited (2MB in chrome), we have
to use another method, and instead of working around in the gui
(e.g. by using URL.createObjectURL) make use of the existing download
code in the api, which should have better compatibility
(and omits the whole raw -> json -> raw -> base64 conversion chain from
file to download)

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
Tested-By: Stoiko Ivanov <s.ivanov@proxmox.com>
Reviewed-By: Stoiko Ivanov <s.ivanov@proxmox.com>
2019-10-25 09:19:05 +02:00
Dominik Csapak
7ad0de10d6 add download button to spam quarantine preview
so that users can download the file directly

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2019-02-26 10:46:29 +01:00
Dietmar Maurer
6265117277 cleanup: set selModel only where we need it 2018-03-29 14:40:32 +02:00
Dominik Csapak
0b9c052824 SpamQuarantine: add keyboard shortcuts for actions
d/D: deliver
delete: delete
w/W: whitelist
b/B: blacklist

the delete key registers differently depending on browser,
so we have to check for event.DELETE and '127'

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2018-03-29 14:33:45 +02:00
Dominik Csapak
c627f092b8 SpamQuarantine: add context menu
with the actions: deliver,delete,whitelist,blacklist

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2018-03-29 14:31:58 +02:00
Dominik Csapak
7f0619ff3b quarantine: refactor action logic
so that it can be reused

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2018-03-29 14:31:29 +02:00
Dominik Csapak
d42f85b806 implement multiselection of spamquarantine mails
and allow the actions to be sent for all simultaniously

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2018-03-29 14:22:42 +02:00
Dietmar Maurer
aac17b9be4 Revert "doQuarantineAction: pass pmail parameter"
This reverts commit 794e411a4f.

Not required any longer, because the backend now encode all info inside
the id.
2017-12-28 12:47:11 +01:00
Dietmar Maurer
794e411a4f doQuarantineAction: pass pmail parameter 2017-12-28 08:41:59 +01:00
Dominik Csapak
b76ce2c5f7 jslint: remove unnecessary code, optimize updatePreview
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2017-10-23 17:31:40 +02:00
Dominik Csapak
207471c040 select mail when coming from link in SpamQuarantine mail
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2017-10-06 07:29:58 +02:00
Dietmar Maurer
f34abacac7 SpamInfoGrid.js - avoid border 2017-09-29 07:11:33 +02:00
Dominik Csapak
56b4528f24 add missing titles for quarantines
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2017-09-28 15:16:34 +02:00
Dominik Csapak
2d1f7824e4 make SpamQuarantine use the QuarantineList and SpamInfoGrid
this changes the SpamQuarantine so it uses the refactored version
of the list, and add the function to show the spaminfo
in a table

also it changes from "show html"/"show raw" buttons to
a single button which gets toggled

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2017-09-28 14:46:56 +02:00
Dominik Csapak
ea07c9aa8e jslint: type confusion
fix many type confusions

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2017-09-28 14:42:13 +02:00
Dominik Csapak
749af0601a jslint: trailing commas
fix many trailing commas

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2017-09-28 14:41:43 +02:00
Dominik Csapak
2c1d504e90 jslint: globals
adds the global object proxmox to most files

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2017-09-28 14:41:31 +02:00
Dietmar Maurer
bd69f90e64 fix time format (i => hour) 2017-09-18 12:28:00 +02:00
Dominik Csapak
8e89b895fe add white/blacklist, deliver and delete button for the spam quarantine
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2017-09-12 07:18:46 +02:00
Dominik Csapak
cdff090fa3 only reset email if not in quarantineview
else the user could not view his own spams until a refresh anymore

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2017-09-12 07:18:06 +02:00
Dominik Csapak
f4404f28c2 better formatting of spam list
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2017-09-12 07:17:21 +02:00
Dietmar Maurer
842ad32e48 simplify gettext messages 2017-09-05 10:21:12 +02:00
Dietmar Maurer
73fa787589 SpamQuarantine: reduce number of gettext messages 2017-09-04 07:42:03 +02:00
Dominik Csapak
c96a22cb0b restructure spam quarantine
this patch restructures the spam quarantine tab

notable changes:
* no daily overview any more, instead you have to select the range and
  email address
* an email selector in the admin view, which gets its data from
  the backend
* preview window has a show raw/html button

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2017-08-23 12:37:52 +02:00
Dietmar Maurer
e5de6d6435 use splitter component instead of slpit property 2017-08-17 11:32:40 +02:00
Dietmar Maurer
af5aba0cd0 improve spam list table layout 2017-08-11 13:52:07 +02:00
Dietmar Maurer
d9c3552acf implement spam quarantine list and preview 2017-08-10 14:00:44 +02:00
Dietmar Maurer
0277bfebf0 add new quarantine view 2017-04-30 11:19:28 +02:00