[IMP] Finally allow to call set() with 2 arguments.
bzr revid: nicolas.vanhoren@openerp.com-20121018141607-jpow2bu1dlvdriyd
This commit is contained in:
parent
d5e8e627cb
commit
77415e7f77
|
@ -393,8 +393,17 @@ instance.web.PropertiesMixin = _.extend({}, instance.web.EventDispatcherMixin, {
|
||||||
instance.web.EventDispatcherMixin.init.call(this);
|
instance.web.EventDispatcherMixin.init.call(this);
|
||||||
this.__getterSetterInternalMap = {};
|
this.__getterSetterInternalMap = {};
|
||||||
},
|
},
|
||||||
set: function(map, options) {
|
set: function(arg1, arg2, arg3) {
|
||||||
options = options || {};
|
var map;
|
||||||
|
var options;
|
||||||
|
if (typeof arg1 === "string") {
|
||||||
|
map = {};
|
||||||
|
map[arg1] = arg2;
|
||||||
|
options = arg3 || {};
|
||||||
|
} else {
|
||||||
|
map = arg1;
|
||||||
|
options = arg2 || {};
|
||||||
|
}
|
||||||
var self = this;
|
var self = this;
|
||||||
var changed = false;
|
var changed = false;
|
||||||
_.each(map, function(val, key) {
|
_.each(map, function(val, key) {
|
||||||
|
|
Loading…
Reference in New Issue