Commit Graph
109 Commits
Author SHA1 Message Date
Christophe Simonis 96de6756ab [MERGE] forward port branch saas-15 up to 42e5b322af 2018-07-31 19:11:33 +02:00
Christophe Simonis 42e5b322af [MERGE] forward port branch saas-14 up to 0265884608 2018-07-31 18:52:40 +02:00
Nicolas Lempereur 5dc180a3ea [FIX] im_livechat: double click on :) => 1 message
Prevent sending multiple messages when multiple clicks on one feedback
icon.

opw-1863312
closes #26047
2018-07-30 17:03:57 +02:00
Nicolas Lempereur ce2fdc02ab [FIX] im_livechat: bad rating=1 not 0 w/ 75d3121c
In 75d3121c9 the bad rating was change from 0 to 1.

This commit update the javascript feedback part so the behavior is the
one expected.

related to opw-1863312
closes #26043
2018-07-30 12:45:53 +02:00
Martin Trigaux 7572b57c27 [FIX] mail: do not translate channel_icons 2017-10-02 10:25:12 +02:00
Aaron Bohy 7a91d87614 [IMP] im_livechat, mail: Discuss UI in mobile
- Extract mobile specific code for the client action to a specific
  file
- Massive clean of less rules
- Unify channels preview of the systray dropdown and the mobile UI
  of Discuss
- Ensure to only load the last message of each channel in mobile,
  as this is not used in desktop (unless the user opens the systray
  menu)
- Make livechat available in Discuss mobile UI
2017-09-15 15:25:06 +02:00
Mitali Patel ad79fed261 [IMP] im_livechat: add copy to clipboard for the website live chat widget code
This commit adds 2 buttons to copy directly the code needed to add the livechat
in the website.
2017-09-14 10:54:00 +02:00
Géry Debongnie 905e01921f [REF] web, *: redesign all JS views
This commit introduce a full redesign of all JS views.  We started
basically from scratch.  The goal was to unify all the various views
under a common framework, to make them testable, to make then usable in
different conditions (in studio, or in the frontend), and to make our
lives easier.

Some important points are:
- we introduced new coding guidelines (camelCase, 80 chars width, ...)
- we have a brand new testing framework (still QUnit based)
- kanban view moved to the web addon
- calendar view (formerly web_calender) moved to web as well
- the tree view was removed
- all new code should be documented

We hope that this code is the start of a new era for the Odoo web
client, we want to have a high quality codebase, well documented, well
tested, well designed.

Work done by the framework team: mostly aab, ged, chm, dmo, qsm
2017-04-11 19:44:38 +02:00
Christophe Simonis a282d4ae7f [MERGE] forward port branch saas-14 up to be9dfb331f 2017-02-10 18:41:06 +01:00
Nicolas Lempereur 7c8a98e53a [FIX] im_livechat: livechat button over ecommerce
Some things in the ecommerce have z-index 1, 4 (product images) or 5. So
this went over the live chat button "Have a question? Chat with us."

opw-707086
2017-02-07 15:29:53 +01:00
Christophe Simonis b7c7591bfb [MERGE] forward port branch saas-11 up to 71773e1f1c 2017-02-01 19:08:14 +01:00
Christophe Simonis 71773e1f1c [MERGE] forward port branch 9.0 up to a53063606a 2017-02-01 18:16:15 +01:00
Aaron Bohy f4bb9bc976 [FIX] im_livechat,web: partial revert of 7f8fe10766
Proxy.load is required by the livechat when it is embedded in an
external page, so that it is able to get the static xml files
(with the correct base_url).

opw-706497
2017-01-31 10:52:08 +01:00
Aaron Bohy adb0312faf [FIX] im_livechat: prefix avatar's src with server url
This is required if the livechat is embedded in an external page,
so that it can correctly retrieve the images.
2017-01-31 10:15:32 +01:00
Sagar Ahirrao bb03449bc8 [IMP] im_livechat: visitor history command
this commit introduces the '/history' command
for an operator during a livechat session.

When the visitor load a page, its url is added in
a cookie (kept only 1 day) in order to track his
visited web pages.
The '/history' command will ask the cookie content
and send it to the operator as a transient message
in the livechat channel.
2017-01-30 13:45:03 +01:00
Jérome Maes 75d3121c9c [FIX] im_livechat: correct rating smiley and value for bad rating 2016-11-16 16:13:00 +01:00
Jérome Maes 8cac9d664c [FIX] im_livechat: stop using unsecure controller
Loading history can contains sensitive informations.
You can load the history of a public conversation if
you have its uuid.

This commit stops using unsecure controller when a
secure one for this case exists !
2016-11-16 16:12:52 +01:00
qsm-odoo fb363b572b [FIX] *: adapt odoo interface violet
Change color #a24689 to #875A7B

Commit https://github.com/odoo/enterprise/commit/8ac1c19fac7615fecd51e670f798d13158a4e53c
changed the odoo interface violet by changing the main LESS variable
but forgot there was many direct occurences in XML/HTML/... (for
example for the mobile browser color).

Even if it's community the odoo interface violet is used at many places
(module description, XML demo data, ...).
2016-10-05 10:29:00 +02:00
Denis Vermylen (dve) 016ca761e0 [FIX] livechat: fix livechat display for website visitor
add customer_email_data in the add_message function, otherwise he would crash
later trying to get this key's value's length and nothing would be displayed
for the website visitor.
2016-09-14 14:32:32 +02:00
Christophe Simonis 93e6316029 [MERGE] forward port of branch saas-11 up to 7153077 2016-06-28 18:05:25 +02:00
Christophe Simonis 5166fbd21b [MERGE] forward port of branch saas-10 up to 6d51bce 2016-06-28 15:12:06 +02:00
Aaron Bohy db99c65f7b [IMP] im_livechat,mail: sort livechat channels in Discuss
by date of last message in channel, desc.
2016-06-22 10:10:46 +02:00
Christophe Simonis a4b94012c2 [MERGE] forward port of branch saas-11 up to f43b206 2016-05-24 17:00:17 +02:00
Christophe Simonis f43b206970 [MERGE] forward port of branch saas-10 up to d35d8c3 2016-05-24 16:59:37 +02:00
Christophe Simonis d35d8c3fca [MERGE] forward port of branch saas-9 up to e5c2e6e 2016-05-24 16:40:53 +02:00
Nicolas Lempereur d4e7da6133 [IMP] im_livechat: don't auto-open on mobile
Currently on mobile, the livechat window would take all the viewport of
a small screen mobile browser. This combined with the "auto open"
feature can be desorienting: users could have only seen the "hello, how
may I help you ?" window and not know what to do or what is happening.

So this commit remove the "auto open" feature if user is on a too small
device (the user would thus have to click on "Have a Question").

closes #12148
opw-678012
2016-05-24 14:34:36 +02:00
Foram Shah 41d8b5c390 updated the description of 'im_livechat' 2016-05-10 15:24:45 +02:00
Aaron Bohy 790d84f78d [IMP] im_livechat,mail: mention in backend chat windows
The BasicComposer widget is now used in chat windows, which enables the mention
feature. This is only for the backend, as for the livechat windows in the
frontend, the composer is still a simple input.

Classname 'o_chat_input' has been renamed into 'o_chat_composer' (the root
classname of the basic composer) for uniformity in the JS and LESS code of
chat windows.
2016-05-03 10:34:40 +02:00
Fabien Pinckaers 4c8e908b49 [IMP] Speed up app switcher loading: 645k --> 137k lossless compression for all icons 2016-02-26 11:39:38 +01:00
Christophe Simonis 1231585df1 [MERGE] forward port of branch saas-9 up to 78d20b5 2016-01-27 12:27:01 +01:00
Aaron Bohy 16a3a4b7fe [FIX] im_livechat,mail: various livechat fixes
- prevent concurrent opening of the chat window
- take into account the placeholder value of the livechat session record
- don't send welcome message if empty
2016-01-25 15:47:25 +01:00
Géry Debongnie 8af3841cb2 [FIX] mail: prevent mail to rejoin a channel that we just left
sometimes, the web client receives unsubscribe notification and an extra
notification on that channel.  This is then followed by an attempt to
rejoin the channel that we just left.  This commit prevents that
situation to occur.

For that, it needs to know the notifications received by the bus in one
batch, not one at a time.
2016-01-20 14:41:34 +01:00
Aaron Bohy de9c2135a6 [FIX] im_livechat,mail: external lib: missing dependency
@navbar-height was used in chat_window.less since rev. 8397abd but wasn't
defined in the external_lib bundle (light bundle to embed im_livechat in
external pages).

This rev. also fixes some glitches of the chat window due to missing
font-awesome, and global rule 'box-sizing: border-box' on all elements.
2016-01-19 15:20:37 +01:00
Aaron Bohy c304e2ce95 [FIX] im_livechat: chat_window: scrollBottom() and feedback
The function scrollBottom has been removed at rev. 30c26d7 as the scroll logic
has been moved to the thread, to make it common for the client action and chat
windows.

Moreover, the o_chat_content div has been removed from the chat window layout
at the same commit, we thus now directly replace the thread's $el by the
feedback and fix less rules

Also adapt the behavior of the livechat's chat window as done for the backend
at 30c26d7:
  - scroll to bottom on message sent
  - increment unread messages counter if the chat window is folded or if the
    thread is not scrolled to bottom
  - reset the unread counter on scroll to bottom)
2016-01-14 14:49:58 +01:00
Xavier Morel 7f8fe10766 [REM] web: Proxy.load
Not really useful at this point, if we ever go down the path of embedded
web client we can probably make the relevant controllers CORS.
2016-01-11 11:32:18 +01:00
Aaron Bohy 3f370651c7 [FIX] im_livechat,mail: don't translate html data-type argument
as it is only there for a technical purpose (used in JS to bind event handlers)
2015-12-29 15:59:54 +01:00
Aaron Bohy 30003dbce3 [FIX] im_livechat,mail: various ui fixes/improvements
im_livechat:
  - feedback message wording
  - livechat_channel form view typo

mail:
  - channel form view: email_send field label wording and layout
  - notifications preview extended
  - client action mass mailing composer fine tuning
  - client action mass mailing channels tooltip
  - client action idle bullet color
2015-12-28 10:19:22 +01:00
Aaron Bohy d8605b7993 [FIX] im_livechat: matching rule in cache
The problem was that the matching rule was evaluated before sending the html
page, and the script was inserted in the page according to the matching rule
(it wasn't inserted if the rule was 'hide_button'). However, the matching rule
wasn't re-evaluated if the page was already in the cache. The page content thus
might depend on a matching rule computed for someone else in that case.

Rather than inserting the script according to the matching rule, we insert it
only if there is an operator available. We then ask for the matching rule in
the livechat widget, by RPC, and we reject its willStart deferred if the rule
says so. We also re-check for operator availability in the same RPC.
2015-12-24 12:59:46 +01:00
Aaron Bohy 0c92788d88 [FIX] im_livechat: various fixes
- use channel configuration for the auto_popup
- clear auto_popup timeout when chat open to prevent opening the chat twice
  if the user opens it himself before the end of the timeout
- don't send message when no feedback given
2015-12-16 15:48:43 +01:00
Aaron Bohy 17896a92da [FIX] mail: various ui improvements/fixes
* chat windows:
  - input was kicked out of the window on chrome 43
  - don't animate if folded by default (e.g. after a refresh)
  - width and height 100% like in the frontend
  - z-index to make sure that they are over bootstrap active btn,
    but below notifications, and modals

* chatter:
  - internal note: send button renammed to 'Log'
  - send button is the first button again
  - remove annoying form view widget's tooltip

* client action: focus on composer on channel change
2015-12-15 10:01:21 +01:00
Aaron Bohy 1029571c35 [FIX] im_livechat: various fixes
- Don't display livechat button if no operator available
- Livechat windows persistence through website pages
- Auto popup feature re-introduced (inadvertently removed at rev. f23f57cc)
- Operators that are 'away' are available, as 'away' means that the focus isn't
  on the Odoo tab for at least 10 minutes, but the user is still connected.
- Avoid duplicated messages when the visitor is a connected user
- Unfold livechat window on first 'close' click as the event is intercepted to
  ask the user feedback before actually closing the window
2015-12-15 10:01:20 +01:00
Géry Debongnie 4e6caf19a2 [FIX] im_livechat: style chat windows in im_livechat
They are hidden in mobile mode, but we don't want to deactivate chat
windows in website livechat.
2015-12-11 14:04:59 +01:00
Nicolas Martinelli 149aa2ffc1 [FIX] im_livechat: close window
If the user clicks twice on the 'x', the chat window is closed
2015-12-11 10:33:27 +01:00
Nicolas Martinelli c7b7094248 [IMP] im_livechat: allow to close chat without feedback
opw-658973
2015-12-11 08:39:49 +01:00
Aaron Bohy 3f1ef1f11d [FIX] im_livechat: prevent starting multiple poll
bus.poll() should be a private function, as it initializes a new longpolling.
Only bus.start_polling() should be called as it prevents running multiple
polls concurrently.

On the website, bus.poll() was called each time the user clicked on the
livechat button, blocking the whole UI if the user clicked 6 times in a row on
that button, as only 6 RPCs can be done concurrently.

A consequence of this fix is that the poll isn't restarted if the user opens
a new livechat session just after closing one, so the messages sent through
that session are delayed (~50 seconds). To circumvent this situation, we simply
don't restore the livechat button after closing a livechat session (the button
re-appears anyway at the next click, or after a refresh).
2015-12-07 16:32:28 +01:00
Géry Debongnie 7137891a8a [FIX] mail, im_livechat: correctly displayed message date
Messages are required to be displayed in a smarter way: relative to the
current date, if it's a recent message, or absolute if not.  This
commits rework most of the date processing code to comply with these
requirements.

Messages were preprocessed each time a thread is rendered, which is
stupid.  It should be preprocessed only when the message is created.
This was a small problem because livechat does not use the chat manager,
so a simplified version of the preprocessing had to be done.
2015-11-26 14:27:11 +01:00
Nicolas Lempereur 4424f301a6 [FIX] im_livechat: missing dependencies in im_livechat page
The Website Live Chat is supposed to appear following 3 ways outside of
the backend:

- in a singleton page with path /im_livechat/support/{id}

- in a page in which a code code snippet (with two script and a css
  bundle) has been inserted in the head section

- by installing the module "Website Live Support"

In the first both instances, including some less files and bootstrap
default variables is required which this commit do.

In the last instance these file should already be included in the
website and the additional assets required are inserted in the
website.assets_frontend bundle.

opw-654898
2015-11-24 13:02:47 +01:00
Aaron Bohy 5616027190 [FIX] im_livechat,mail: unread counter in chat windows
Synchronize the unread counter between chat windows, client action and the
actual value stored in DB. This adds robustness to the counter displayed in
chat window, and allows to synchronize the client action with the chat windows
when marking messages as read.
2015-11-23 16:29:08 +01:00
Géry Debongnie 6ae0309b99 [FIX] bus,mail,livechat: fix problem with multiple long polls
The bus was allowed to restart polling, client side, to allow the user
to directly receive messages in new channels.  This was only acceptable
as a temporary fix, the correct way to do this is to actually notify the
bus server side. This is even more urgent since the client was allowed
to keep multiple longpolls simultaneously, which degraded the experience
in some cases.
2015-10-16 15:52:01 +02:00
Aaron Bohy 2dfbaceaec [IMP] mail,im_livechat: client action sidebar: 'unsubcribe' cross
displayed for all channels
2015-10-16 15:52:01 +02:00