diff options
| author | Fabien Meghazi <fme@openerp.com> | 2011-12-21 14:57:16 +0100 |
|---|---|---|
| committer | Fabien Meghazi <fme@openerp.com> | 2011-12-21 14:57:16 +0100 |
| commit | 2d480dacee09965465e556022ae2cc3c4ef9a76b (patch) | |
| tree | da893f385576224dd15e99606b93c6e842ddf487 | |
| parent | 44173617d69c0b22cbd15c23fb98aff75a75308b (diff) | |
| parent | fedb878b0b28aa3276ce61ca681a490f43df6379 (diff) | |
[FIX] close dialog on cancel form.
lp bug: https://launchpad.net/bugs/905375 fixed
bzr revid: fme@openerp.com-20111221135716-6skqmki0hqd8fudn
| -rw-r--r-- | addons/web_calendar/static/src/js/calendar.js | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/addons/web_calendar/static/src/js/calendar.js b/addons/web_calendar/static/src/js/calendar.js index 13bd7455c36..8511a14e4d0 100644 --- a/addons/web_calendar/static/src/js/calendar.js +++ b/addons/web_calendar/static/src/js/calendar.js @@ -419,6 +419,7 @@ openerp.web_calendar.CalendarFormDialog = openerp.web.Dialog.extend({ this.view = view; }, start: function() { + var self = this; this._super(); this.form = new openerp.web.FormView(this, this.dataset, this.view_id, { sidebar: false, @@ -427,6 +428,9 @@ openerp.web_calendar.CalendarFormDialog = openerp.web.Dialog.extend({ this.form.appendTo(this.$element); this.form.on_created.add_last(this.on_form_dialog_saved); this.form.on_saved.add_last(this.on_form_dialog_saved); + this.form.on_button_cancel = function() { + self.close(); + } }, on_form_dialog_saved: function() { var id = this.dataset.ids[this.dataset.index]; |
