diff --git a/addons/website/static/src/js/website.editor.js b/addons/website/static/src/js/website.editor.js index 8b3a73a06a3..2249de2a24d 100644 --- a/addons/website/static/src/js/website.editor.js +++ b/addons/website/static/src/js/website.editor.js @@ -177,7 +177,7 @@ var editor = new website.EditorBar(); var $body = $(document.body); editor.prependTo($body).then(function () { - if (location.search.indexOf("unable_editor") >= 0) { + if (location.search.indexOf("enable_editor") >= 0) { editor.edit(); } }); diff --git a/addons/website/static/src/js/website.js b/addons/website/static/src/js/website.js index 0147bf0a406..682a6175086 100644 --- a/addons/website/static/src/js/website.js +++ b/addons/website/static/src/js/website.js @@ -36,8 +36,8 @@ }; website.reload = function () { location.hash = "scrollTop=" + window.document.body.scrollTop; - if (location.search.indexOf("unable_editor") > -1) { - window.location.href = window.location.href.replace(/unable_editor(=[^&]*)?/g, ''); + if (location.search.indexOf("enable_editor") > -1) { + window.location.href = window.location.href.replace(/enable_editor(=[^&]*)?/g, ''); } else { window.location.reload(); } diff --git a/addons/website/static/src/js/website.translator.js b/addons/website/static/src/js/website.translator.js index 014be7bfa6b..7e237598530 100644 --- a/addons/website/static/src/js/website.translator.js +++ b/addons/website/static/src/js/website.translator.js @@ -43,7 +43,7 @@ ev.preventDefault(); var link = $('.js_language_selector a[data-default-lang]')[0]; if (link) { - link.search += (link.search ? '&' : '?') + 'unable_editor=1'; + link.search += (link.search ? '&' : '?') + 'enable_editor=1'; window.location = link.attributes.href.value; } }, diff --git a/addons/website_blog/controllers/main.py b/addons/website_blog/controllers/main.py index 81b0610cb11..34a117505a5 100644 --- a/addons/website_blog/controllers/main.py +++ b/addons/website_blog/controllers/main.py @@ -57,7 +57,7 @@ class WebsiteBlog(http.Controller): post pager. :param dict post: kwargs, may contain - - 'unable_editor': editor control + - 'enable_editor': editor control :return dict values: values for the templates, containing @@ -147,7 +147,7 @@ class WebsiteBlog(http.Controller): 'blog_posts': blog_posts, 'pager': pager, 'nav_list': nav, - 'unable_editor': post.get('unable_editor') + 'enable_editor': post.get('enable_editor') } if blog_post: @@ -196,7 +196,7 @@ class WebsiteBlog(http.Controller): context=dict(context, mail_create_nosubcribe=True)) request.session.body = False - return werkzeug.utils.redirect("/blog/%s/?unable_editor=1" % (blog_post_id)) + return werkzeug.utils.redirect("/blog/%s/?enable_editor=1" % (blog_post_id)) @website.route(['/blog//new'], type='http', auth="public") def blog_post_create(self, category_id=None, **post): @@ -209,11 +209,11 @@ class WebsiteBlog(http.Controller): 'content': '', 'website_published': False, }, context=create_context) - return werkzeug.utils.redirect("/blog/%s/?unable_editor=1" % (new_blog_post_id)) + return werkzeug.utils.redirect("/blog/%s/?enable_editor=1" % (new_blog_post_id)) @website.route(['/blog//duplicate'], type='http', auth="public") def blog_post_copy(self, blog_post_id=None, **post): cr, uid, context = request.cr, request.uid, request.context create_context = dict(context, mail_create_nosubscribe=True) new_blog_post_id = request.registry['blog.post'].copy(cr, uid, blog_post_id, {}, context=create_context) - return werkzeug.utils.redirect("/blog/%s/?unable_editor=1" % (new_blog_post_id)) + return werkzeug.utils.redirect("/blog/%s/?enable_editor=1" % (new_blog_post_id)) diff --git a/addons/website_sale/controllers/main.py b/addons/website_sale/controllers/main.py index 23f3bf71257..8de0a0bb578 100644 --- a/addons/website_sale/controllers/main.py +++ b/addons/website_sale/controllers/main.py @@ -356,7 +356,7 @@ class Ecommerce(http.Controller): def add_product(self, cat_id=0, **post): product_id = request.registry.get('product.product').create(request.cr, request.uid, {'name': 'New Product', 'public_categ_id': cat_id}, request.context) - return request.redirect("/shop/product/%s/?unable_editor=1" % product_id) + return request.redirect("/shop/product/%s/?enable_editor=1" % product_id) def get_pricelist(self): if not request.httprequest.session.get('ecommerce_pricelist'): diff --git a/addons/website_sale/static/src/js/website_sale.js b/addons/website_sale/static/src/js/website_sale.js index 508a4405aea..5f31d52fccb 100644 --- a/addons/website_sale/static/src/js/website_sale.js +++ b/addons/website_sale/static/src/js/website_sale.js @@ -114,7 +114,7 @@ $(document).ready(function () { var y = $td.parent().index()+1; openerp.jsonRpc('/shop/change_size/', 'call', {'id': $data.data('id'), 'x': x, 'y': y}) .then(function () { - var search = location.search.replace(/\?|$/, '?unable_editor=1&'); + var search = location.search.replace(/\?|$/, '?enable_editor=1&'); location.href = location.href.replace(/(\?|#).*/, search + location.hash); }); });