[imp] renammed some usage of instance for future refactoring

bzr revid: nicolas.vanhoren@openerp.com-20120417114358-ilya1z6iv0o61m6t
This commit is contained in:
niv-openerp 2012-04-17 13:43:58 +02:00
parent 1bad998f51
commit 5b89624fcf
2 changed files with 8 additions and 8 deletions

View File

@ -1926,7 +1926,7 @@ openerp.web.DateTimeWidget = openerp.web.OldWidget.extend({
picker: function() { picker: function() {
return $.fn[this.jqueryui_object].apply(this.$input_picker, arguments); return $.fn[this.jqueryui_object].apply(this.$input_picker, arguments);
}, },
on_picker_select: function(text, instance) { on_picker_select: function(text, instance_) {
var date = this.picker('getDate'); var date = this.picker('getDate');
this.$input.val(date ? this.format_client(date) : '').change(); this.$input.val(date ? this.format_client(date) : '').change();
}, },

View File

@ -1654,19 +1654,19 @@ var Collection = openerp.web.Class.extend(/** @lends Collection# */{
var records = record instanceof Array ? record : [record]; var records = record instanceof Array ? record : [record];
for(var i=0, length=records.length; i<length; ++i) { for(var i=0, length=records.length; i<length; ++i) {
var instance = (records[i] instanceof Record) ? records[i] : new Record(records[i]); var instance_ = (records[i] instanceof Record) ? records[i] : new Record(records[i]);
instance.bind(null, this._onRecordEvent); instance_.bind(null, this._onRecordEvent);
this._byId[instance.get('id')] = instance; this._byId[instance_.get('id')] = instance_;
if (options.at == undefined) { if (options.at == undefined) {
this.records.push(instance); this.records.push(instance_);
if (!options.silent) { if (!options.silent) {
this.trigger('add', this, instance, this.records.length-1); this.trigger('add', this, instance_, this.records.length-1);
} }
} else { } else {
var insertion_index = options.at + i; var insertion_index = options.at + i;
this.records.splice(insertion_index, 0, instance); this.records.splice(insertion_index, 0, instance_);
if (!options.silent) { if (!options.silent) {
this.trigger('add', this, instance, insertion_index); this.trigger('add', this, instance_, insertion_index);
} }
} }
this.length++; this.length++;