[FIX] revert 1200 revid:fme@openerp.com-20111010150811-4vdff1jcr6eqz2xq, action manager must be used for client actions

bzr revid: al@openerp.com-20111010214634-dmq7fcv840252p8t
This commit is contained in:
Antony Lesuisse 2011-10-10 23:46:34 +02:00
parent 7399463070
commit 2c55b9339d
2 changed files with 12 additions and 6 deletions

View File

@ -11,6 +11,7 @@ openerp.web.FormView = openerp.web.View.extend( /** @lends openerp.web.FormView#
*/
searchable: false,
form_template: "FormView",
identifier_prefix: 'formview-',
/**
* @constructs openerp.web.FormView
* @extends openerp.web.View

View File

@ -7,7 +7,7 @@ openerp.web.form.DashBoard = openerp.web.form.Widget.extend({
this._super(view, node);
this.template = 'DashBoard';
this.actions_attrs = {};
this.view = view;
this.action_managers = [];
},
start: function() {
var self = this;
@ -224,8 +224,10 @@ openerp.web.form.DashBoard = openerp.web.form.Widget.extend({
low_profile: true,
display_title: false
};
var view_manager = new openerp.web.ViewManagerAction(this, action);
view_manager.appendTo($("#"+this.view.element_id + '_action_' + action.id));
var am = new openerp.web.ActionManager(this);
this.action_managers.push(am);
am.appendTo($("#"+this.view.element_id + '_action_' + action.id));
am.do_action(action);
},
render: function() {
// We should start with three columns available
@ -239,9 +241,12 @@ openerp.web.form.DashBoard = openerp.web.form.Widget.extend({
return QWeb.render(this.template, this);
},
do_reload: function() {
var view_manager = this.view.widget_parent,
action_manager = view_manager.widget_parent;
action_manager.do_action(view_manager.action);
_.each(this.action_managers, function(am) {
am.stop();
});
this.action_managers = [];
this.view.stop();
this.view.start();
}
});
openerp.web.form.DashBoardLegacy = openerp.web.form.DashBoard.extend({