diff options
| author | niv-openerp <nicolas.vanhoren@openerp.com> | 2012-02-23 17:10:41 +0100 |
|---|---|---|
| committer | niv-openerp <nicolas.vanhoren@openerp.com> | 2012-02-23 17:10:41 +0100 |
| commit | fa510462f4c49d434cd2ed4145eb8c3c99dae0e6 (patch) | |
| tree | 481b2b50428d5bc15b6a185e9d906e2dee4a6643 /addons/web/static/src/js/core.js | |
| parent | 2b73fb4a6a53fe729f21b9b50036b788676cc1cc (diff) | |
[imp] switched to nivjs
bzr revid: nicolas.vanhoren@openerp.com-20120223161041-mymbna11fsp3bo9m
Diffstat (limited to 'addons/web/static/src/js/core.js')
| -rw-r--r-- | addons/web/static/src/js/core.js | 36 |
1 files changed, 1 insertions, 35 deletions
diff --git a/addons/web/static/src/js/core.js b/addons/web/static/src/js/core.js index fd0abcb0eb4..69ec98e7350 100644 --- a/addons/web/static/src/js/core.js +++ b/addons/web/static/src/js/core.js @@ -925,40 +925,6 @@ openerp.web.Connection = openerp.web.CallbackEnabled.extend( /** @lends openerp. } }); -openerp.web.ParentedMixin = { - __parented_mixin: true, - setParent: function(parent) { - if(this.getParent()) { - if (this.getParent().__parented_mixin) { - this.getParent().__parented_children = _.without(this.getParent().getChildren(), this); - } - this.__parented_parent = undefined; - } - this.__parented_parent = parent; - if(parent && parent.__parented_mixin) { - if (!parent.__parented_children) - parent.__parented_children = []; - parent.__parented_children.push(this); - } - }, - getParent: function() { - return this.__parented_parent; - }, - getChildren: function() { - return this.__parented_children ? _.clone(this.__parented_children) : []; - }, - isDestroyed: function() { - return this.__parented_destroyed; - }, - destroy: function() { - _.each(this.getChildren(), function(el) { - el.destroy(); - }); - this.setParent(undefined); - this.__parented_destroyed = true; - }, -}; - /** * Base class for all visual components. Provides a lot of functionalities helpful * for the management of a part of the DOM. @@ -1007,7 +973,7 @@ openerp.web.ParentedMixin = { * * That will kill the widget in a clean way and erase its content from the dom. */ -openerp.web.Widget = openerp.web.CallbackEnabled.extend(openerp.web.ParentedMixin).extend(/** @lends openerp.web.Widget# */{ +openerp.web.Widget = openerp.web.CallbackEnabled.extend(niv.ParentedMixin).extend(/** @lends openerp.web.Widget# */{ /** * The name of the QWeb template that will be used for rendering. Must be * redefined in subclasses or the default render() method can not be used. |
