diff options
| author | Christophe Simonis <chs@odoo.com> | 2015-05-26 17:34:04 +0200 |
|---|---|---|
| committer | Christophe Simonis <chs@odoo.com> | 2015-05-28 14:27:38 +0200 |
| commit | fe2b5f35a40ca8df662130608b0f89427a196362 (patch) | |
| tree | 0c7773f0599f3b1e6dbb869104fad0b04869b269 /addons/website/static/src/js/website.editor.js | |
| parent | d4d8a2eae31e7a6a45029b84603e055300e3be36 (diff) | |
| parent | bf1e99964cdbc374f8a0c4cec1b338bf7c7c2930 (diff) | |
[MERGE] forward port of branch saas-6 up to bf1e999
Diffstat (limited to 'addons/website/static/src/js/website.editor.js')
| -rw-r--r-- | addons/website/static/src/js/website.editor.js | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/addons/website/static/src/js/website.editor.js b/addons/website/static/src/js/website.editor.js index 9cc84746454..5e12647a63a 100644 --- a/addons/website/static/src/js/website.editor.js +++ b/addons/website/static/src/js/website.editor.js @@ -937,6 +937,7 @@ function change_default_bootstrap_animation_to_edit() { website.no_editor = !!$(document.documentElement).data('editable-no-editor'); + website.add_template_file('/website/static/src/xml/website.xml'); website.add_template_file('/website/static/src/xml/website.editor.xml'); website.dom_ready.done(function () { website.ready().then(init_editor); @@ -965,6 +966,16 @@ website.dom_ready.done(function () { }); }); + website.error = function(data, url) { + var $error = $(openerp.qweb.render('website.error_dialog', { + 'title': data.data ? data.data.arguments[0] : "", + 'message': data.data ? data.data.arguments[1] : data.statusText, + 'backend_url': url + })); + $error.appendTo("body"); + $error.modal('show'); + }; + /* ----- TOP EDITOR BAR FOR ADMIN ---- */ var EditorBar = Widget.extend({ @@ -1411,6 +1422,12 @@ var Dialog = Widget.extend({ }, close: function () { this.$el.modal('hide'); + }, + destroy: function () { + this.$el.modal('hide').remove(); + if($(".modal.in").length>0){ + $('body').addClass('modal-open'); + } }, }); |
