[fix] corrected al's apparent inability to copy paste without adding bugs
bzr revid: nicolas.vanhoren@openerp.com-20110722155948-1vgw3g03jqr0ni6b
This commit is contained in:
@@ -534,6 +534,7 @@ openerp.base.BaseWidget = openerp.base.Controller.extend({
|
||||
if(this.$element != null) {
|
||||
this.$element.remove();
|
||||
}
|
||||
this._super();
|
||||
},
|
||||
/**
|
||||
* Render the widget. This.template must be defined.
|
||||
|
||||
@@ -137,8 +137,7 @@ instance.base.BasicController = instance.base.Class.extend( /** @lends instance.
|
||||
instance.screen[element_id] = this;
|
||||
}
|
||||
// save the parent children relationship
|
||||
this.controller_parent = null;
|
||||
this.controller_children = [];
|
||||
this.children = [];
|
||||
this.parent = parent;
|
||||
if(this.parent && this.parent.children) {
|
||||
this.parent.children.push(this);
|
||||
@@ -174,6 +173,10 @@ instance.base.BasicController = instance.base.Class.extend( /** @lends instance.
|
||||
return $.Deferred().done().promise();
|
||||
},
|
||||
stop: function() {
|
||||
if (this.parent && this.parent.children) {
|
||||
this.parent.children = _.without(this.parent.children, this);
|
||||
}
|
||||
this.parent = null;
|
||||
},
|
||||
log: function() {
|
||||
var args = Array.prototype.slice.call(arguments);
|
||||
|
||||
@@ -11,7 +11,7 @@ openerp.base.ActionManager = openerp.base.Controller.extend({
|
||||
this.viewmanager = null;
|
||||
this.current_dialog = null;
|
||||
// Temporary linking view_manager to session.
|
||||
// Will use controller_parent to find it when implementation will be done.
|
||||
// Will use parent to find it when implementation will be done.
|
||||
this.session.action_manager = this;
|
||||
},
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user