diff options
| author | Dhaval Panchal <dpa@odoo.com> | 2017-05-17 18:09:09 +0530 |
|---|---|---|
| committer | ged-odoo <ged@odoo.com> | 2017-05-17 14:39:09 +0200 |
| commit | db41366b672d834d4a80ec525a9de593f742ff0c (patch) | |
| tree | de4c41319109692b25f26ee3d7d2d06ad3af93b9 /addons/web/static/src/js/chrome/abstract_web_client.js | |
| parent | 6ea3b8de383adc54469d2b0a636a3bd21e50f953 (diff) | |
[IMP] discuss: action buttons always visible on touch screens
We add the o_touch_device css class to the body (it was done in enterprise only), and various other small changes to make sure that the action buttons (in discuss, next to the message title) are always visible (not only on hover) when we are on a touch device. (pr (#15459, closes task 31208)
Diffstat (limited to 'addons/web/static/src/js/chrome/abstract_web_client.js')
| -rw-r--r-- | addons/web/static/src/js/chrome/abstract_web_client.js | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/addons/web/static/src/js/chrome/abstract_web_client.js b/addons/web/static/src/js/chrome/abstract_web_client.js index 5a84f4fe4b3..982fd05b1e0 100644 --- a/addons/web/static/src/js/chrome/abstract_web_client.js +++ b/addons/web/static/src/js/chrome/abstract_web_client.js @@ -14,6 +14,7 @@ odoo.define('web.AbstractWebClient', function (require) { var ActionManager = require('web.ActionManager'); var concurrency = require('web.concurrency'); var core = require('web.core'); +var config = require('web.config'); var crash_manager = require('web.crash_manager'); var data_manager = require('web.data_manager'); var Dialog = require('web.Dialog'); @@ -91,6 +92,11 @@ var AbstractWebClient = Widget.extend(mixins.ServiceProvider, { start: function () { var self = this; + // we add the o_touch_device css class to allow CSS to target touch + // devices. This is only for styling purpose, if you need javascript + // specific behaviour for touch device, just use the config object + // exported by web.config + this.$el.toggleClass('o_touch_device', config.device.touch); this.on("change:title_part", this, this._title_changed); this._title_changed(); |
