summaryrefslogtreecommitdiff
path: root/addons/website_livechat/views
diff options
context:
space:
mode:
authorChristophe Matthieu <chm@odoo.com>2018-08-08 18:54:43 +0200
committerChristophe Matthieu <chm@odoo.com>2018-08-09 02:31:59 +0200
commit6448420c5dd160470e465dee7729d19d8d5e7bab (patch)
treec2696ff4e1f7abd90af8570804bc86a524790860 /addons/website_livechat/views
parent791c70b329bf513a4c9359d38603b10dc6066829 (diff)
[IMP] bus: re-factoring of bus.bus (Longpolling and CrossTab)
The purpose of this change is to make the code clearer and testable. In this change, the 'tab_manager' static object was merged with the bus cross tab. Cleaning was done to clearly define private and public functions as well as handlers. The methods are documented and the constants are now defined on the class. The bus use the service behavior with 'trigger_up'. 'bus.CrossTab' who extend 'bus.Longpolling' are instantiated by the bus service. The class is always instantiated with a parent, or root in the case of the website (im_livechat), to use the ajax and localstorage services. So the behavior, perhaps logger or redefined by the parents.
Diffstat (limited to 'addons/website_livechat/views')
-rw-r--r--addons/website_livechat/views/website_livechat.xml6
1 files changed, 5 insertions, 1 deletions
diff --git a/addons/website_livechat/views/website_livechat.xml b/addons/website_livechat/views/website_livechat.xml
index b8d77cbd4e5..f71721d92b5 100644
--- a/addons/website_livechat/views/website_livechat.xml
+++ b/addons/website_livechat/views/website_livechat.xml
@@ -11,7 +11,11 @@
<!-- thread window -->
<script type="text/javascript" src="/mail/static/src/js/thread_windows/abstract_thread_window.js"></script>
<script type="text/javascript" src="/im_livechat/static/src/js/website_livechat_window.js"></script>
- <script type="text/javascript" src="/bus/static/src/js/bus.js"></script>
+
+ <script type="text/javascript" src="/bus/static/src/js/longpolling_bus.js"></script>
+ <script type="text/javascript" src="/bus/static/src/js/crosstab_bus.js"></script>
+ <script type="text/javascript" src="/bus/static/src/js/services/bus_service.js"></script>
+
<script type="text/javascript" src="/mail/static/src/js/document_viewer.js"></script>
<script type="text/javascript" src="/mail/static/src/js/thread_widget.js"></script>
<script type="text/javascript" src="/mail/static/src/js/utils.js"></script>