summaryrefslogtreecommitdiff
path: root/addons/mail/static/src/components/attachment
AgeCommit message (Collapse)Author
2021-04-07[FIX] mail: small image attachment preview too small for its boxDhruv Patel
In the chatter, the attachment preview image size is fixed with 160*160 but the actual preview area is 200*200px so the image is not filling correctly. It appears padding around the image, especially visible when hovering it. So with this commit, We should make sure to use a properly sized image in the preview. we have to also provide the perfect resolution and preview for the small images without upscaling incorrectly. For large images, it should be display based on the aspect ratio. Task : 2483885 closes odoo/odoo#68696 Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2021-03-26[FIX] mail: fix attachment preview for previewable filesXavier Dubuc
task-2412150 closes odoo/odoo#64072 Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2021-02-11[FIX] mail: prevent traceback on attachment unlinkThanh Dodeur
Due to asynchronous rendering, the attachment template can be rendered when its attachment is undefined, this was causing an issue with an unguarded getter call that was attempting to access the attachment. This commit fixes this issue. opw-2457983 closes odoo/odoo#65944 Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2021-01-26[FIX] mail: prevent from stretching small image attachmentSébastien Theys
task-2447939 closes odoo/odoo#65074 Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2021-01-21[FIX] mail, *: significantly reduce number of useless rendersSébastien Theys
* = hr_holidays, im_livechat, website_livechat A huge amount of components where rendered for no reason, notably when typing a new message (at every key press), which significantly slowed down the interface. There were 2 causes to this number of renders: - OWL rendering all children automatically, even if their props didn't change, unless `shouldUpdate` is overridden, which is now done. - `useStore` selectors being way too generous in what they observed task-2399731 closes odoo/odoo#62703 Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2021-01-18[FIX] mail, im_livechat, snailmail: use findFromIdentifyingDataSébastien Theys
find is O(n) and findFromIdentifyingData is O(1) task-2440693 closes odoo/odoo#64712 Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2020-12-16[FIX] mail: prevents image loading errorsThanh Dodeur
Before this commit, an event listener was still active after the removal of the attachment viewer, which caused the the onLoad function to be called on an removed component if the component was unmounted before the image was loaded. This commit fixes this issue by adding the eventListener through the owl template. Additionally, when a new image was loading, the old image was kept in the dom until the end of the loading of the new image, this commit also fixes this issue by adding a t-key on the image element. part of task-2363522 closes odoo/odoo#61560 Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2020-12-16[FIX] mail: prevents traceback when clicking attachment unlink buttonThanh Dodeur
Before this commit, quickly clicking on the unlink button of an attachment could result in a traceback if the click happened right after the deletion of attachment but before the rendering of the DOM. part of task-2363522 closes odoo/odoo#63366 Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2020-12-10[FIX] mail: handles unlink button spam on attachmentsThanh Dodeur
Before this commit, attempting to delete attachments multiple times could result in errors, especially on slow networks. This commit fixes this issue. task-2363522 closes odoo/odoo#61017 Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2020-10-09[FIX] mail: ask for confirmation before attachment deletionXavier Dubuc
also hide all messages with empty body and no attachments task-2282322 closes odoo/odoo#59672 X-original-commit: 60ae42dcda777cd66e4e421dbc02f9ef12a430ef Related: odoo/enterprise#13971 Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com> Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2020-09-16[FIX] mail: do not fetch attachment style in QUnit testsAlexandre Kühn
Task-2339931 closes odoo/odoo#57869 X-original-commit: 7586f7756859bb0711eee8a82bf728a039ad0d72 Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2020-09-14[FIX] mail: allow temporary attachment to be canceledXavier Dubuc
task-2324065 closes odoo/odoo#57618 X-original-commit: 9f774d4fb512017ab5f99981255afc8d2c35113c Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2020-08-21[FIX] mail: fix some CSS in chat window and attachmentsXavier Dubuc
Also make rounded style for composer tool buttons. task-2282342 closes odoo/odoo#56282 X-original-commit: 307fa6877ad72fe0afb10f1b4e67ec573422b732 Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2020-08-13[IMP] web, *: improve mock server and replace most mail mockRPCSébastien Theys
Improve mock server: - add support for mocked `fetch` - add support for `active_test` - add support for x2m `in` in domains - add support for default values computed from a function - implement a more natural "next id" compute - allow initial data without ids - ensure write and x2m commands integrity - improve bad data/bad commands error messages - always warn for failing RPC, not only in debug mode - fix all existing tests that had inconsistency data Other changes done in mail (or dependents) that are not just related to tests: - remove `direct_partner` from formatter result ->`correspondent` can be computed from other keys, especially `members` - fix `livechat_visitor` convertData -> only process if there is value - add `current_partner` and `current_user_id` as `init_messaging` result -> easier to mock than session - remove usage of `need_moderation` -> that was just a search indirection to `moderation_status` - adapt `partner_id` -> `res_partner_id` key in `_notification_format` -> to be consistent with field name - add name in result of `mail_partner_format` -> sometimes display_name is not the same - remove usage of `is_moderator` -> that was just an indirection to `moderation_channel_ids` Enterprise counterpart: https://github.com/odoo/enterprise/pull/11523 task-2287171 closes odoo/odoo#55854 X-original-commit: 7ba3fecb3377a720d1eb70e7515a0c45da73836d Related: odoo/enterprise#12391 Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2020-08-07[FIX] mail: traceback while going to close dialogHiral Bhavsar
Before this commit: Traceback appearing while going to close subtypes dialog from followers or closing the attachment viewer dialog. This is happening because the dialog manager doesn't have a close function after https://github.com/odoo/odoo/commit/9216bdcb6f0bbb20900a33bbf7283e6e4fda1b2c After this commit: Able to close the dialog without any traceback as fix it by call the delete function. LINKS Task-2314898 closes odoo/odoo#55636 X-original-commit: f2186ceefe23cd1a45adc72089c8e828e9b75cc8 Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2020-06-22[FIX] mail: fix attachment dialogXavier Dubuc
task-2279222 closes odoo/odoo#53437 X-original-commit: c61094bba21a4af567a68d3fb5d4a44352c667af Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2020-06-15[REF] mail, *: refactor messaging with OWLSébastien Theys
This commit is a significant rewriting of client-side discuss, chatter, chat window, and messaging menu using OWL. The behavior should be broadly the same, with some slight functional changes here and there. From a technical standpoint, the code of messaging is mainly organized in 2 main groups of modules: - models, which are logical entities that depict the client-side state of messaging as a whole. - components, which are in charge of displaying information from models. This refactoring also introduces new JS guidelines regarding folder structure (/static) and naming rules for JS modules. Community PR: https://github.com/odoo/odoo/pull/39023 Enterprise PR: https://github.com/odoo/enterprise/pull/6249 Task-1914207 This PR is a collaborative work by Alexandre, Julien, Sébastien and Xavier, with the precious help of Lucas to speed it up towards the end. closes odoo/odoo#39023 Related: odoo/enterprise#6249 Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com> Co-authored-by: Alexandre Kühn <aku@odoo.com> Co-authored-by: Julien Giannone <jgi@odoo.com> Co-authored-by: Lucas Perais <lpe@odoo.com> Co-authored-by: Sébastien Theys <seb@odoo.com> Co-authored-by: Xavier Dubuc <xdu@odoo.com>