summaryrefslogtreecommitdiff
path: root/addons/web/static/src/js/action_manager.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/action_manager.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/action_manager.js')
-rw-r--r--addons/web/static/src/js/action_manager.js8
1 files changed, 8 insertions, 0 deletions
diff --git a/addons/web/static/src/js/action_manager.js b/addons/web/static/src/js/action_manager.js
index be5e6c6c996..c7f79070e8c 100644
--- a/addons/web/static/src/js/action_manager.js
+++ b/addons/web/static/src/js/action_manager.js
@@ -320,6 +320,7 @@ var ActionManager = Widget.extend({
if (options.clear_breadcrumbs) {
self.clear_action_stack(old_action_stack);
}
+ self.toggle_fullscreen();
}).fail(function () {
// Destroy failed action and restore internal state
new_action.destroy();
@@ -416,6 +417,13 @@ var ActionManager = Widget.extend({
this.inner_action = null;
this.inner_widget = null;
}
+ this.toggle_fullscreen();
+ },
+ toggle_fullscreen: function() {
+ var is_fullscreen = _.some(this.action_stack, function(action) {
+ return action.action_descr.target === "fullscreen";
+ });
+ this.trigger_up("toggle_fullscreen", {fullscreen: is_fullscreen});
},
do_push_state: function(state) {
if (!this.webclient || this.dialog) {