[FIX] option typo: unable_editor -> enable_editor
bzr revid: fme@openerp.com-20131023091152-h0hxw47hzfor2al8
This commit is contained in:
parent
6495851102
commit
7dd1934585
|
@ -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();
|
||||
}
|
||||
});
|
||||
|
|
|
@ -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();
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
},
|
||||
|
|
|
@ -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))
|
||||
|
|
|
@ -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'):
|
||||
|
|
|
@ -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);
|
||||
});
|
||||
});
|
||||
|
|
Loading…
Reference in New Issue