summaryrefslogtreecommitdiff
path: root/addons/web/static/src
diff options
context:
space:
mode:
authorXavier Morel <xmo@openerp.com>2012-06-28 10:45:47 +0200
committerXavier Morel <xmo@openerp.com>2012-06-28 10:45:47 +0200
commitcbba19da672a74c6e3edd7dc577e09e5f07f3bb9 (patch)
treea6b03385e299d7e7f85e06ecb2fc3a6b2475d403 /addons/web/static/src
parent94f6eec2ab99bd2cfac9e0a39ac583d902422636 (diff)
[IMP] automatically focus first field of edited row
bzr revid: xmo@openerp.com-20120628084547-6fo7fkiy2gh2wb6m
Diffstat (limited to 'addons/web/static/src')
-rw-r--r--addons/web/static/src/js/view_list_editable.js3
1 files changed, 2 insertions, 1 deletions
diff --git a/addons/web/static/src/js/view_list_editable.js b/addons/web/static/src/js/view_list_editable.js
index 4109a5bd6d5..74b51c3c686 100644
--- a/addons/web/static/src/js/view_list_editable.js
+++ b/addons/web/static/src/js/view_list_editable.js
@@ -147,7 +147,6 @@ openerp.web.list_editable = function (instance) {
return this.form.on_record_loaded(record.attributes).pipe(function () {
return self.form.do_show({reload: false});
}).then(function () {
- // TODO: automatic focus of ?first field
// TODO: [Save] button
// TODO: save on action button?
_(cells).each(function (cell, field_name) {
@@ -169,6 +168,8 @@ openerp.web.list_editable = function (instance) {
minHeight: $cell.outerHeight()
});
});
+ // TODO: actually focus clicked field (if editable)
+ self.form.fields[self.form.fields_order[0]].focus();
self.trigger('edit:after', record, self.form)
});