[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:
niv-openerp
2011-07-22 17:59:48 +02:00
parent 70ae6c0326
commit 09a3f7b86c
3 changed files with 7 additions and 3 deletions
+1
View File
@@ -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.
+5 -2
View File
@@ -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);
+1 -1
View File
@@ -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;
},
/**