diff options
| author | Adrien Dieudonne <adr@odoo.com> | 2017-04-07 15:16:47 +0200 |
|---|---|---|
| committer | Aaron Bohy <aab@odoo.com> | 2017-04-11 19:44:38 +0200 |
| commit | 64e0fe80a37d8ddc70fe76daa732a77ace27c5a0 (patch) | |
| tree | 6ccf947959d300830f34004f19df046327d52c1b /addons/web/static/src/js | |
| parent | f624e8a575443cc8bf2339bd42f3311ad73ed3ec (diff) | |
[FIX] web: Calendar: enter key not working in quick create
Before this commit, it was not possible to add a new event
with the "quick create" if you pressed enter key instead of
using confirm button.
Diffstat (limited to 'addons/web/static/src/js')
| -rw-r--r-- | addons/web/static/src/js/views/calendar/calendar_quick_create.js | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/addons/web/static/src/js/views/calendar/calendar_quick_create.js b/addons/web/static/src/js/views/calendar/calendar_quick_create.js index b900b24667a..db39fa6bfd6 100644 --- a/addons/web/static/src/js/views/calendar/calendar_quick_create.js +++ b/addons/web/static/src/js/views/calendar/calendar_quick_create.js @@ -31,6 +31,7 @@ var QuickCreate = Dialog.extend({ // Can hold data pre-set from where you clicked on agenda this.dataTemplate = dataTemplate || {}; + this.dataCalendar = dataCalendar; this.$input = $(); var self = this; @@ -68,7 +69,7 @@ var QuickCreate = Dialog.extend({ this.$input = this.$('input').keyup(function enterHandler (e) { if(e.keyCode === $.ui.keyCode.ENTER) { self.$input.off('keyup', enterHandler); - if (!self._quickAdd()){ + if (!self._quickAdd(self.dataCalendar)){ self.$input.on('keyup', enterHandler); } } else if (e.keyCode === $.ui.keyCode.ESCAPE && self._buttons) { |
