[IMP] web: select input on add record in list editable
bzr revid: dle@openerp.com-20140408120141-f1fx2e9e8vqatccx
This commit is contained in:
parent
7dc732af6c
commit
a16b0c7907
|
@ -123,10 +123,19 @@ openerp.web.list_editable = function (instance) {
|
|||
* as an editable row at the top or bottom of the list)
|
||||
*/
|
||||
do_add_record: function () {
|
||||
var self = this;
|
||||
if (this.editable()) {
|
||||
this.$el.find('table:first').show();
|
||||
this.$el.find('.oe_view_nocontent').remove();
|
||||
this.start_edition();
|
||||
this.start_edition().then(function(){
|
||||
var fields = self.editor.form.fields;
|
||||
self.editor.form.fields_order.some(function(field){
|
||||
if (fields[field].$el.is(':visible')){
|
||||
fields[field].$el.find("input").select();
|
||||
return true;
|
||||
}
|
||||
});
|
||||
});
|
||||
} else {
|
||||
this._super();
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue