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.
17 lines
758 B
XML
17 lines
758 B
XML
<?xml version="1.0" encoding="utf-8"?>
|
|
<odoo>
|
|
<template id="assets_backend" name="im assets" inherit_id="web.assets_backend">
|
|
<xpath expr="." position="inside">
|
|
<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>
|
|
</xpath>
|
|
</template>
|
|
|
|
<template id="qunit_suite" name="bus tests" inherit_id="web.qunit_suite">
|
|
<xpath expr="//script[last()]" position="after">
|
|
<script type="text/javascript" src="/bus/static/tests/bus_tests.js"/>
|
|
</xpath>
|
|
</template>
|
|
</odoo>
|