[FIX] option typo: unable_editor -> enable_editor
authorFabien Meghazi <fme@openerp.com>
Wed, 23 Oct 2013 09:11:52 +0000 (11:11 +0200)
committerFabien Meghazi <fme@openerp.com>
Wed, 23 Oct 2013 09:11:52 +0000 (11:11 +0200)
bzr revid: fme@openerp.com-20131023091152-h0hxw47hzfor2al8

addons/website/static/src/js/website.editor.js
addons/website/static/src/js/website.js
addons/website/static/src/js/website.translator.js
addons/website_blog/controllers/main.py
addons/website_sale/controllers/main.py
addons/website_sale/static/src/js/website_sale.js

index 8b3a73a..2249de2 100644 (file)
         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();
             }
         });
index 0147bf0..682a617 100644 (file)
@@ -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();
         }
index 014be7b..7e23759 100644 (file)
@@ -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;
             }
         },
index 81b0610..34a1175 100644 (file)
@@ -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/<int:category_id>/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/<int:blog_post_id>/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))
index 23f3bf7..8de0a0b 100644 (file)
@@ -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'):
index 508a440..5f31d52 100644 (file)
@@ -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);
             });
     });