};
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();
}
post pager.
:param dict post: kwargs, may contain
- - 'unable_editor': editor control
+ - 'enable_editor': editor control
:return dict values: values for the templates, containing
'blog_posts': blog_posts,
'pager': pager,
'nav_list': nav,
- 'unable_editor': post.get('unable_editor')
+ 'enable_editor': post.get('enable_editor')
}
if blog_post:
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):
'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))
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'):
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);
});
});