summaryrefslogtreecommitdiff
path: root/addons/hr_skills
diff options
context:
space:
mode:
authorJulien Mougenot <jum@odoo.com>2019-09-18 10:33:26 +0000
committerAaron Bohy <aab@odoo.com>2019-09-25 07:20:36 +0000
commit3147e5fada058ec676183b3136145ffe824a9044 (patch)
treeef2ee8476a203865b6065105ad15dfa572a5875f /addons/hr_skills
parent3023cd24af35bf63f1c962ec51183a20f9ca80e0 (diff)
[IMP] web,*: editable readonly list views
*:board,hr_skills Hold on tight, this is a tricky one. Allows *any* readonly list view (only plain lists, not x2manies) to become partially editable when checking records. This means that once checked, a record line acts just like it was in an editable list. You can click on it, edit any of its values as long as they're not constrained by readonly modifiers, and save them on the fly. Clicking on an unchecked record will have the same effect as before: it will open the record, regardless of the other selected records. You can also check multiple records and edit them all at once by changing the value of one selected record (just like standard multi edition). Keyboard navigation is also allowed between selected records (TAB and SHIFT+TAB to navigate and ENTER to save). /!\ If a list is only made of records having all of their fields locked by readonly modifiers, checking a record and clicking on it will do absolutely nothing. This is to keep consistency with the rest of the specs. Task 1967602
Diffstat (limited to 'addons/hr_skills')
-rw-r--r--addons/hr_skills/static/src/js/resume_widget.js19
1 files changed, 15 insertions, 4 deletions
diff --git a/addons/hr_skills/static/src/js/resume_widget.js b/addons/hr_skills/static/src/js/resume_widget.js
index 906d26b0435..413942badf6 100644
--- a/addons/hr_skills/static/src/js/resume_widget.js
+++ b/addons/hr_skills/static/src/js/resume_widget.js
@@ -28,22 +28,33 @@ var AbstractGroupedOne2ManyRenderer = ListRenderer.extend({
dataRowTemplate: '', // Template used to render a record
addLineButtonTemplate: 'group_add_item',
+ /**
+ * Don't freeze the columns because as the header is empty, the algorithm
+ * won't work.
+ *
+ * @override
+ * @private
+ */
+ _freezeColumnWidths: function () {},
+
/**
+ * Renders a empty header
+ *
* @override
* @private
- * Don't render any header
*/
_renderHeader: function () {
- return $('<div>');
+ return $('<thead/>');
},
/**
+ * Renders a empty footer
+ *
* @override
* @private
- * Don't render any footer
*/
_renderFooter: function () {
- return $('<div>');
+ return $('<tfoot/>');
},
/**