diff options
| author | niv-openerp <nicolas.vanhoren@openerp.com> | 2012-10-18 16:16:07 +0200 |
|---|---|---|
| committer | niv-openerp <nicolas.vanhoren@openerp.com> | 2012-10-18 16:16:07 +0200 |
| commit | 77415e7f7780ebc777e2a7f8e89e7adf781e6133 (patch) | |
| tree | b1c48d0216591773eb5f168dee51b46a3ed758f8 /addons/web/static/src/js/corelib.js | |
| parent | d5e8e627cbd6e642b86070784b6464f9cb7a6868 (diff) | |
[IMP] Finally allow to call set() with 2 arguments.
bzr revid: nicolas.vanhoren@openerp.com-20121018141607-jpow2bu1dlvdriyd
Diffstat (limited to 'addons/web/static/src/js/corelib.js')
| -rw-r--r-- | addons/web/static/src/js/corelib.js | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/addons/web/static/src/js/corelib.js b/addons/web/static/src/js/corelib.js index 7f4f8c0d6ca..41960dd278d 100644 --- a/addons/web/static/src/js/corelib.js +++ b/addons/web/static/src/js/corelib.js @@ -393,8 +393,17 @@ instance.web.PropertiesMixin = _.extend({}, instance.web.EventDispatcherMixin, { instance.web.EventDispatcherMixin.init.call(this); this.__getterSetterInternalMap = {}; }, - set: function(map, options) { - options = options || {}; + set: function(arg1, arg2, arg3) { + var map; + var options; + if (typeof arg1 === "string") { + map = {}; + map[arg1] = arg2; + options = arg3 || {}; + } else { + map = arg1; + options = arg2 || {}; + } var self = this; var changed = false; _.each(map, function(val, key) { |
