summaryrefslogtreecommitdiff
path: root/addons/base/static/src
diff options
context:
space:
mode:
authorXavier Morel <xmo@openerp.com>2011-08-19 16:39:47 +0200
committerXavier Morel <xmo@openerp.com>2011-08-19 16:39:47 +0200
commiteaf0914e2a152e1ff50c4ec2d0956584abedd04a (patch)
treec5dbfeb3d8674a6bbcd455e929df96a71ec529e6 /addons/base/static/src
parent2cefb02439751755962f43006009852bfdf25f4d (diff)
[FIX] incompatibility between static home and ActionManager
convert static home to a client action, fix ActionManager's handling of client actions to play correctly with the Widget lifecycle (and clean any client action displayed in case it's switching to an inner act_window) bzr revid: xmo@openerp.com-20110819143947-29dzerce0d42fhel
Diffstat (limited to 'addons/base/static/src')
-rw-r--r--addons/base/static/src/js/views.js13
1 files changed, 9 insertions, 4 deletions
diff --git a/addons/base/static/src/js/views.js b/addons/base/static/src/js/views.js
index ad75268156f..cb9b7d364cf 100644
--- a/addons/base/static/src/js/views.js
+++ b/addons/base/static/src/js/views.js
@@ -30,11 +30,15 @@ openerp.base.ActionManager = openerp.base.Widget.extend({
this.dialog = null;
}
},
- inner_stop: function () {
+ content_stop: function () {
if (this.inner_viewmanager) {
this.inner_viewmanager.stop();
this.inner_viewmanager = null;
}
+ if (this.client_widget) {
+ this.client_widget.stop();
+ this.client_widget = null;
+ }
},
url_update: function(action) {
// this.url = {
@@ -89,7 +93,7 @@ openerp.base.ActionManager = openerp.base.Widget.extend({
this.dialog.open();
} else {
this.dialog_stop();
- this.inner_stop();
+ this.content_stop();
this.inner_viewmanager = new openerp.base.ViewManagerAction(this, action);
this.inner_viewmanager.appendTo(this.$element);
this.url_update(action);
@@ -114,8 +118,9 @@ openerp.base.ActionManager = openerp.base.Widget.extend({
});
},
ir_actions_client: function (action) {
- this.client_widget = openerp.base.client_actions.get_object(action.tag);
- new this.client_widget(this, this.element_id, action.params).start();
+ this.content_stop();
+ var ClientWidget = openerp.base.client_actions.get_object(action.tag);
+ (this.client_widget = new ClientWidget(this, action.params)).appendTo(this);
}
});