diff options
| author | qsm-odoo <qsm@odoo.com> | 2016-08-08 16:02:44 +0200 |
|---|---|---|
| committer | qsm-odoo <qsm@odoo.com> | 2016-08-19 17:44:27 +0200 |
| commit | 0ab08050b9a2333a1f0793a524b56173cb3c3e3f (patch) | |
| tree | 54a7bb54d39fdca491b8eb95190addef2a1e71bd /addons/website/static/src/js/website.contentMenu.js | |
| parent | 9c07b67d10b5910a5a9b257477ed13cb07232baa (diff) | |
[FIX] web_editor,website: stop closing web_editor dialog two times
This commit fixes two problems:
* Clicking on the save button of a web_editor dialog closed the dialog
two times because the button was created with the flag "close: true"
and binded to a handler which closes the dialog. This also prevented
to extend this handler by placing the this._super call in a deferred.
* Some web_editor dialog extended the save callback but forgot to use
the this._super, which prevents the "saved" event to be triggered
(currently not used anywhere but useful for custo and master).
Diffstat (limited to 'addons/website/static/src/js/website.contentMenu.js')
| -rw-r--r-- | addons/website/static/src/js/website.contentMenu.js | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/addons/website/static/src/js/website.contentMenu.js b/addons/website/static/src/js/website.contentMenu.js index 2ee11463475..e01ec55eb24 100644 --- a/addons/website/static/src/js/website.contentMenu.js +++ b/addons/website/static/src/js/website.contentMenu.js @@ -277,6 +277,7 @@ var EditMenuDialog = widget.Dialog.extend({ $menu.remove(); }, save: function () { + var _super = this._super.bind(this); var self = this; var new_menu = this.$('.oe_menu_editor').nestedSortable('toArray', {startDepthCount: 0}); var levels = []; @@ -301,7 +302,7 @@ var EditMenuDialog = widget.Dialog.extend({ context: context }, }).then(function (menu) { - self.close(); + _super(); editor.reload(); }); }, |
