[FIX] don't use 'undefined' as a fallback value for .attr, it makes jquery think that's a get and breaks chaining

bzr revid: xmo@openerp.com-20120213100543-0zu2ij95tnufu5df
This commit is contained in:
Xavier Morel 2012-02-13 11:05:43 +01:00
parent 85ac428a7b
commit 042a5f823d
1 changed files with 1 additions and 2 deletions

View File

@ -967,8 +967,7 @@ openerp.web.search.DateField = openerp.web.search.Field.extend(/** @lends opener
this.datewidget.prependTo(this.$element);
this.datewidget.$element.find("input")
.attr("size", 15)
.attr("autofocus", this.attrs.default_focus === '1' ?
'autofocus' : undefined)
.attr("autofocus", this.attrs.default_focus === '1' ? 'autofocus' : null)
.removeAttr('style');
this.datewidget.set_value(this.defaults[this.attrs.name] || false);
},