diff options
| author | Christophe Matthieu <chm@odoo.com> | 2015-07-07 16:03:01 +0200 |
|---|---|---|
| committer | Christophe Matthieu <chm@odoo.com> | 2015-07-10 17:00:12 +0200 |
| commit | 9665882fbadafbaed0fb56f218c9c74696f71815 (patch) | |
| tree | 8a0664d30a4a75a69725f31217368dd38d34f394 /addons/web/static/src/js/framework/widget.js | |
| parent | 25d5bb855c480831f2792f9a48be3d16d7320706 (diff) | |
[IMP] web_editor: adapt css, js and xml to use web_editor
Diffstat (limited to 'addons/web/static/src/js/framework/widget.js')
| -rw-r--r-- | addons/web/static/src/js/framework/widget.js | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/addons/web/static/src/js/framework/widget.js b/addons/web/static/src/js/framework/widget.js index f606e8482ca..199568b727f 100644 --- a/addons/web/static/src/js/framework/widget.js +++ b/addons/web/static/src/js/framework/widget.js @@ -164,6 +164,18 @@ var Widget = core.Class.extend(mixins.PropertiesMixin, { }, target); }, /** + * Attach the current widget to a dom element + * + * @param target A jQuery object or a Widget instance. + */ + attachTo: function(target) { + var self = this; + this.setElement(target.$el || target); + return this.willStart().then(function() { + return self.start(); + }); + }, + /** * Renders the current widget and replaces the given jQuery object. * * @param target A jQuery object or a Widget instance. |
