summaryrefslogtreecommitdiff
path: root/addons/website_livechat/static/src
AgeCommit message (Collapse)Author
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>
2020-11-17[IMP] website_livechat, *: properly position the chatbox in edit modeSiddarth Gajjar
*: im_livechat Also, fix its unopened position so that it stays at the same horizontal position when opened. task-2369225 closes odoo/odoo#61649 Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com> Co-authored-by: qsm-odoo <qsm@odoo.com>
2020-09-29[IMP] mail, website_livechat: bring back visitor banner in discussXavier Dubuc
task-2276589 closes odoo/odoo#58857 X-original-commit: 65dbe1c4760e2ffe104426f9aa41007a10dc32f0 Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2020-09-24[FIX] im_livechat, mail, website_livechat: open chat website visitorAlexandre Kühn
Also fix an issue with livechats not being considered in 'chat' filter of messaging menu. Task-Id 2282426 closes odoo/odoo#58466 X-original-commit: 631e52536964763bbfe857305f023e5e67084e95 Signed-off-by: Sébastien Theys (seb) <seb@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>
2020-02-12[IMP] im_livechat : set livechat inactive _onCloseChatWindowDavid Beguin
If the visitor closes the livechat window, he is redirected on rating / feedback / send_transcript screen but he cannot go back to the conversation, except by reloading the whole page. Conversation should then be considered as inactive after the first click on X. This commit close the conversation (set as livechat inactive and send the 'has left conversation' message) at first time the visitor closes the conversation. Task ID: 2120210 PR #39939
2020-01-02[IMP] website_livechat : enable chat request on all livechat enabled pagesDavid Beguin
Before this commit, only the tracked page can start the chat request at visitor side. Which is a bit sad as the operator can send the visitor a chat request but if the visitor goes on a non tracked page but has the opportunity to start a livechat, the chat request won't reach the visitor. This commit refactor the way a chat request is sent to the client side. Instead of looking for a opened chat request on every page request, the chat request information (if any opened) is added to the channel info that are given to the Livechat button widget. If the widget receives chat request infos, the widget set himself, before starting, the cookie of the livechat session using the chat request informations. Then, the conversation (from chat request) is automatically loaded as any other opened chat session. Task ID: 2081550 PR #40274 Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2019-11-28[FIX] website_livechat : fix blank space visitor banner in non live chatDavid Beguin
Since visitor banner has been added to the chat window (in discuss app), the channel messages div has been pushed down (padding-top) to display visitor banner without overlapping the channel content. But this padding was always applied, even if there was no visitor banner (in the case of normal -non live- chat). This commit only applies this padding when the visitor banner is present. Task ID: 2145749 closes odoo/odoo#41590 X-original-commit: 04f67217c4063d69477005a165b68b5ebecef01d Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2019-12-09[REV] web: reverts update to fontawesome 5.11.2Kevin Baptiste
This reverts commit ff1c35513aecef5fbc30f7c2f3834450e719714e. closes odoo/odoo#41480 X-original-commit: 116057b26e71db4692280463669f3e80d813ddcc Related: odoo/enterprise#7110 Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2019-11-28[IMP] web: update to fontawesome 4.7.0 to 5.11.2Kevin Baptiste
FontAwesome 5 introduced new names for some icons as described on https://fontawesome.com/how-to-use/on-the-web/setup/upgrading-from-version-4#name-changes This commit replaces the old names to the new ones. closes odoo/odoo#35826 Taskid: 2050241 Related: odoo/enterprise#5180 Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2019-09-20[IMP] website, website_* : improve visitor kanban viewDavid Beguin
This commit review the design of the visitor kanban view. There is now two style for kanban card. Ungrouped : the card takes all the width of the screen. It's simulate a nice tree view. Grouped : Same design as before. ('normal' kanban card) Apply visitor kanban views redesign also in : - website_livechat - website_crm - website_sms Task ID: 2073714 PR #37081 Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2019-09-19[IMP] *: remove image_64 and clean viewsSébastien Theys
There are too many image sizes. Since they are stored resized this takes time to generate when saving a new image, it's more rows on the attachment table, more files on the disk, ... 64px is close enough to 128px that it can be removed without a big impact on download size. It will even reduce download and number of requests when both images are displayed because now only one has to be downloaded and then benefit from cache. The difference between the two is typically around 1.5kB which is negligible these days, especially when the request overhead is around 0.5kB already, not even taking into account other factors such as latency. If a 64px image must absolutely be returned, it is still possible to pass the size parameters to the image route. But the current guideline is to handle resizing in the views when necessary. Views ===== - remove width and height attributes when existing CSS rules are overriding them (eg. `.oe_kanban_avatar` in the right context) - add CSS rules instead of width and height attributes when possible - use `object-fit: cover;` where width and height are forced to avoid distortion of non-square images - for products, use `object-fit: contain;` instead, keep ratio but without crop - add new CSS rules where the expected size was max 64px*64px before due to the image size itself - remove `img-fluid` where using size classes to avoid conflicting rules task-2060865 closes odoo/odoo#36147 Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2019-09-17[IMP] website,livechat : apply various imp and fix on visitor viewsDavid Beguin
Applies various improvements: - Remove welcome message if chat request usecase. - If a visitor is online: line is green / if offline: line is red (in the list view) - Visitors list view: add first / last connection fields and remove time_since_last_action - Avoid useless leave notification if the livechat channel is empty Fix - ACLS on website_visitor_page model (for im_livechat_group_user) - ACLS on website_visitor and website_visitor_page model (for sales_team.group_sale_salesman) - Update visitor lang if visitor change the website lang. - Create visitor twice when translated website (due to rerouting) - Avatar for visitor banner in discuss. (image_64 instead of old image_small) Task ID: 2056080 PR #36290
2019-08-19[IMP] website_livechat : allow to send chat request to a website_visitorDavid Beguin
This commit allows a livechat operator to send a chat request to a connected and available website_visitor. A visitor is considered as connected if his last tracked website.page request was within the last 5 minutes. A visitor is available if he doesn't have an active livechat conversation (mail_channel with type = livechat). - If another operator sent him a chat request - Or if the visitor asked himself to speak with an operator (via the normal and existing flow) A livechat conversation is active while the visitor haven't left the conversation. An operator cannot leave a livechat conversation, only the visitor can. The flow to send a chat request: - On the visitor view (tree or form), operator click on 'send chat request' (button or livechat icon) - A empty conversation with the visitor pops up at operator side. - While the operator didn't send a message, the visitor won't see the conversation. - The operator can type a message to the user - If the operator close the chat without sending any messages, the chat request AND the mail_channel are both deleted. In this case, the visitor is then available to send him a new chat request. - If the operator send a message, at the visitor's next action (page navigation on pages that allows livechat, based on livechat rules), the conversation will pop up at visitor side, using the livechat button widget. The visitor won't be able to request a livechat conversation with an operator until he leaves the chat requested by the operator. - Once the visitor leaves (with or without rating) the conversation : - the operator is notified that the visitor has left the conversation - the chat request is deleted to keep the chat request table clean and minimal - the livechat conversation if set to inactive. - The visitor is now available again to send him a chat request. This feature uses the already existing livechat_session cookie mechanism, so no further code modification was needed to make this work. It's directly integrated is existing livechat flow. The chat_request model is only useful to quickly check if a visitor has a chat request and to send the livechat conversation info to the visitor via the livechat_session cookie. This commit also add a website_visitor banner info on discuss view : To be able to quickly see all the relevant information of a website visitor while talking with in discuss view, a fixed banner have been added. Only the discuss view will benefit from this because detached chatter window is to small to display such banner. Task ID: 34624 PR #2028059
2019-03-06[REF] website_livechat: adapt code after jQuery updateVincent Schippefilt
Part of task 1896658 Co-authored-by: Aaron Bohy <aab@odoo.com> Co-authored-by: Christophe Matthieu <chm@odoo.com> Co-authored-by: Mathieu Duckerts-Antoine <dam@odoo.com> Co-authored-by: David Monjoie <dmo@odoo.com> Co-authored-by: Martin Geubelle <mge@odoo.com> Co-authored-by: svs-odoo <svs@odoo.com> Co-authored-by: Vincent Schippefilt <vsc@odoo.com>
2018-09-30[REF] website, *: add automatic context for call_kw rpcqsm-odoo
* web_editor, website_blog, website_crm_partner_assign, website_links, website_livechat, website_mail_channel, website_mass_mailing, website_slides Calling a model's method thanks to an RPC will now always send the web_editor context automatically, making sure the method gets the website_id all the time, removing the need to guess the current website (now the get_current_website method uses the context website_id if any). Note: other routes already have the website_id via request.env.context if they correctly set website=True (this commit also adds website=True for scss files customization routes).
2018-09-25[IMP] website,website_livechat,website_slides: add "new content" buttonsSébastien Theys
Those allow the user to quickly create a new channel or new slides. PR: #27110 task-1885419