[IMP] Widget.$ shortcut

bzr revid: al@openerp.com-20120521153530-g3anzkkkhs75psk5
This commit is contained in:
Antony Lesuisse 2012-05-21 17:35:30 +02:00
parent 7bc2664663
commit ca6283de8e
1 changed files with 6 additions and 0 deletions

View File

@ -709,6 +709,12 @@ instance.web.Widget = instance.web.Class.extend(instance.web.WidgetMixin, {
this.$element = elem;
}
},
/**
* Shortcut for $element.find() like backbone
*/
"$": function() {
return this.$element.find.apply(this.$element,arguments);
},
/**
* Informs the action manager to do an action. This supposes that
* the action manager can be found amongst the ancestors of the current widget.