summaryrefslogtreecommitdiff
path: root/addons/web/static/src/js/abstract_web_client.js
diff options
context:
space:
mode:
authorGéry Debongnie <ged@odoo.com>2016-04-14 15:46:19 +0200
committerGéry Debongnie <ged@odoo.com>2016-04-22 11:03:21 +0200
commitd65d251c57bd2a72e3ac91c579f0ff604087e577 (patch)
tree8a334bf231c05508a0ad19116aa86ca56640005b /addons/web/static/src/js/abstract_web_client.js
parent0e46d35bf6c2168e4a511d83d15bf874e92657b1 (diff)
[IMP] base, web: add type=fullscreen to ir_actions
With this commit, actions can have a type=fullscreen. This means that the navbar will be hidden, for the action and for all subsequent actions open in the breadcrumb There is no real security behind this, this is just a feature for convenience, so users can bookmark an url an open some action in a way that they are not distracted by anything. In short, this is some kind of light 'kiosk' mode.
Diffstat (limited to 'addons/web/static/src/js/abstract_web_client.js')
-rw-r--r--addons/web/static/src/js/abstract_web_client.js12
1 files changed, 5 insertions, 7 deletions
diff --git a/addons/web/static/src/js/abstract_web_client.js b/addons/web/static/src/js/abstract_web_client.js
index 31aa0d6f3dd..ea8db35d962 100644
--- a/addons/web/static/src/js/abstract_web_client.js
+++ b/addons/web/static/src/js/abstract_web_client.js
@@ -27,6 +27,9 @@ var WebClient = Widget.extend({
clear_uncommitted_changes: function (e) {
this.clear_uncommitted_changes().then(e.data.callback);
},
+ toggle_fullscreen: function (event) {
+ this.toggle_fullscreen(event.data.fullscreen);
+ },
},
init: function(parent, client_options) {
this.client_options = {};
@@ -103,9 +106,6 @@ var WebClient = Widget.extend({
self.$('.oe_dropdown_menu.oe_opened, .oe_dropdown_toggle.oe_opened').removeClass('oe_opened');
}
});
- core.bus.on('set_full_screen', this, function (full_screen) {
- this.set_content_full_screen(full_screen);
- });
core.bus.on('connection_lost', this, this.on_connection_lost);
core.bus.on('connection_restored', this, this.on_connection_restored);
@@ -233,10 +233,8 @@ var WebClient = Widget.extend({
//--------------------------------------------------------------
// Misc.
//--------------------------------------------------------------
- set_content_full_screen: function(fullscreen) {
- $(document.body).css('overflow-y', fullscreen ? 'hidden' : 'scroll');
- this.$('.oe_webclient').toggleClass(
- 'oe_content_full_screen', fullscreen);
+ toggle_fullscreen: function(fullscreen) {
+ this.$el.toggleClass('o_fullscreen', fullscreen);
},
});