diff options
| author | niv-openerp <nicolas.vanhoren@openerp.com> | 2012-02-22 11:22:34 +0100 |
|---|---|---|
| committer | niv-openerp <nicolas.vanhoren@openerp.com> | 2012-02-22 11:22:34 +0100 |
| commit | bd4723f66d0e5a68ab48214837fbca98d2d37ca2 (patch) | |
| tree | 124d44318cfd73a17841bbb63a4527c837287ff0 | |
| parent | 653967443759024c296935ee47fbe62e84c16e4a (diff) | |
[fix] some details
bzr revid: nicolas.vanhoren@openerp.com-20120222102234-k9jjclhmgpalf3qs
| -rw-r--r-- | addons/web/static/src/js/core.js | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/addons/web/static/src/js/core.js b/addons/web/static/src/js/core.js index a02c6767ca3..fd0abcb0eb4 100644 --- a/addons/web/static/src/js/core.js +++ b/addons/web/static/src/js/core.js @@ -936,9 +936,9 @@ openerp.web.ParentedMixin = { } this.__parented_parent = parent; if(parent && parent.__parented_mixin) { - if (!parent.getChildren()) + if (!parent.__parented_children) parent.__parented_children = []; - parent.getChildren().push(this); + parent.__parented_children.push(this); } }, getParent: function() { @@ -948,14 +948,14 @@ openerp.web.ParentedMixin = { return this.__parented_children ? _.clone(this.__parented_children) : []; }, isDestroyed: function() { - return this.__parented_stopped; + return this.__parented_destroyed; }, destroy: function() { _.each(this.getChildren(), function(el) { el.destroy(); }); this.setParent(undefined); - this.__parented_stopped = true; + this.__parented_destroyed = true; }, }; @@ -1046,7 +1046,7 @@ openerp.web.Widget = openerp.web.CallbackEnabled.extend(openerp.web.ParentedMixi * Destroys the current widget, also destroys all its children before destroying itself. */ destroy: function() { - _.each(_.clone(this.getChildren()), function(el) { + _.each(this.getChildren(), function(el) { el.destroy(); }); if(this.$element != null) { |
