[MERGE] from saas-3
bzr revid: fva@openerp.com-20140210151007-saw8m1bqwnxek26x bzr revid: fva@openerp.com-20140210155110-6obc985lc4rl3eyv
This commit is contained in:
@@ -5,7 +5,7 @@
|
||||
<template id="auth_oauth_signup.signup" inherit_id="auth_signup.signup" name="OAuth Signup buttons">
|
||||
<xpath expr="//button[@type='submit']" position="before">
|
||||
<div class="pull-right">
|
||||
<div t-foreach="providers" t-as="p">
|
||||
<div t-foreach="providers or []" t-as="p">
|
||||
<a t-att-href="p['auth_link']" class="btn btn-link">
|
||||
<i t-att-class="p['css_class']"/>
|
||||
<t t-esc="p['body']"/>
|
||||
|
||||
@@ -36,7 +36,10 @@ class AuthSignup(openerp.addons.web.controllers.main.Home):
|
||||
def web_login(self, *args, **kw):
|
||||
mode = request.params.get('mode')
|
||||
qcontext = request.params.copy()
|
||||
super_response = super(AuthSignup, self).web_login(*args, **kw)
|
||||
response = webmain.render_bootstrap_template(request.session.db, 'auth_signup.signup', qcontext, lazy=True)
|
||||
if isinstance(super_response, LazyResponse):
|
||||
response.params['values'].update(super_response.params['values'])
|
||||
token = qcontext.get('token', None)
|
||||
token_infos = None
|
||||
if token:
|
||||
@@ -60,10 +63,9 @@ class AuthSignup(openerp.addons.web.controllers.main.Home):
|
||||
qcontext.update(config)
|
||||
|
||||
if 'error' in qcontext or mode not in ('reset', 'signup') or (not token and not config[mode]):
|
||||
response = super(AuthSignup, self).web_login(*args, **kw)
|
||||
if isinstance(response, LazyResponse):
|
||||
response.params['values'].update(config)
|
||||
return response
|
||||
if isinstance(super_response, LazyResponse):
|
||||
super_response.params['values'].update(config)
|
||||
return super_response
|
||||
|
||||
if request.httprequest.method == 'GET':
|
||||
if token_infos:
|
||||
|
||||
@@ -133,8 +133,9 @@ class view(osv.osv):
|
||||
if not context:
|
||||
context = {}
|
||||
|
||||
qcontext = context.copy()
|
||||
qcontext = dict(editable=False)
|
||||
qcontext.update(
|
||||
context.copy(),
|
||||
website=request.website,
|
||||
url_for=website.url_for,
|
||||
slug=website.slug,
|
||||
|
||||
@@ -29,6 +29,14 @@ class website_config_settings(osv.osv_memory):
|
||||
values[fname] = v[0] if v and self._columns[fname]._type == 'many2one' else v
|
||||
return {'value' : values}
|
||||
|
||||
# FIXME in trunk for god sake. Change the fields above to fields.char instead of fields.related,
|
||||
# and create the function set_website who will set the value on the website_id
|
||||
# create does not forward the values to the related many2one. Write does.
|
||||
def create(self, cr, uid, vals, context=None):
|
||||
config_id = super(website_config_settings, self).create(cr, uid, vals, context=context)
|
||||
self.write(cr, uid, config_id, vals, context=context)
|
||||
return config_id
|
||||
|
||||
_defaults = {
|
||||
'website_id': lambda self,cr,uid,c: self.pool.get('website').search(cr, uid, [], context=c)[0],
|
||||
}
|
||||
|
||||
@@ -638,7 +638,7 @@
|
||||
image_dialog(editor, new CKEDITOR.dom.element(previous));
|
||||
$image_button.hide();
|
||||
previous = null;
|
||||
});
|
||||
}, 'btn-sm');
|
||||
|
||||
// previous is the state of the button-trigger: it's the
|
||||
// currently-ish hovered element which can trigger a button showing.
|
||||
|
||||
@@ -71,8 +71,8 @@
|
||||
{
|
||||
snippet: 'three-columns',
|
||||
placement: 'bottom',
|
||||
title: _t("Drag & Drop a Block"),
|
||||
content: _t("Drag the <em>'3 Columns'</em> block and drop it below the banner."),
|
||||
title: _t("Drag & Drop This Block"),
|
||||
content: _t("Drag the <em>'Three Columns'</em> block and drop it below the banner."),
|
||||
popover: { fixed: true },
|
||||
},
|
||||
{
|
||||
@@ -98,16 +98,18 @@
|
||||
popover: { fixed: true },
|
||||
},
|
||||
{
|
||||
element: 'button[data-dismiss=modal]',
|
||||
element: '.modal:has(#mobile-viewport) button[data-dismiss=modal]',
|
||||
placement: 'right',
|
||||
title: _t("Close Mobile Preview"),
|
||||
content: _t("Scroll in the mobile preview to test the rendering. Once it's ok, close this dialog."),
|
||||
},
|
||||
{
|
||||
waitNot: '.modal',
|
||||
title: _t("Congrats"),
|
||||
content: _t("Congratulation. This tour is finished."),
|
||||
popover: { fixed: true, next: _t("Close Tutorial") },
|
||||
element: '#content-menu-button',
|
||||
placement: 'bottom',
|
||||
title: _t("Add new pages and menus"),
|
||||
content: _t("The 'Content' menu allows you to add pages or add the top menu."),
|
||||
popover: { next: _t("Close Tutorial") },
|
||||
},
|
||||
];
|
||||
return this._super();
|
||||
|
||||
@@ -77,7 +77,11 @@ website.Tour = openerp.Class.extend({
|
||||
|
||||
website.Tour.busy = true;
|
||||
|
||||
this.localStorage.setItem("tour-"+this.id+"-test-automatic", automatic);
|
||||
if (automatic) {
|
||||
this.localStorage.setItem("tour-"+this.id+"-test-automatic", true);
|
||||
} else {
|
||||
this.localStorage.removeItem("tour-"+this.id+"-test-automatic");
|
||||
}
|
||||
this.automatic = automatic;
|
||||
|
||||
if (this.path) {
|
||||
|
||||
@@ -22,6 +22,6 @@
|
||||
</div>
|
||||
</t>
|
||||
<t t-name="website.tour_popover_title">
|
||||
<t t-esc="title"/><button title="Close Tutorial" type="button" class="close" data-role="end">×</button>
|
||||
<t t-esc="title"/><button title="End This Tutorial" type="button" class="close" data-role="end">×</button>
|
||||
</t>
|
||||
</templates>
|
||||
|
||||
@@ -86,10 +86,6 @@ class WebsiteUiSuite(unittest.TestSuite):
|
||||
self._options['timeout'] = self._timeout
|
||||
self._options['port'] = tools.config.get('xmlrpc_port', 80)
|
||||
self._options['db'] = tools.config.get('db_name', '')
|
||||
# FIX for runbot test
|
||||
if hasattr(os, 'uname') and os.uname()[1].startswith('runbot.'):
|
||||
self._options['host'] = tools.config.get('db_name', '') + ".runbot.openerp.com"
|
||||
|
||||
if 'user' not in self._options:
|
||||
self._options['user'] = 'admin'
|
||||
self._options['password'] = 'admin'
|
||||
|
||||
@@ -224,7 +224,7 @@
|
||||
<xpath expr="//body" position="attributes">
|
||||
<attribute name="style">padding-top: 51px;</attribute>
|
||||
</xpath>
|
||||
<xpath expr="//body/*[1]" position="before">
|
||||
<xpath expr="//body" position="inside">
|
||||
<div id="website-top-navbar-placeholder" class="navbar navbar-inverse navbar-fixed-top hidden-xs">
|
||||
<div class="navbar-header">
|
||||
<form class="navbar-form navbar-left">
|
||||
|
||||
Reference in New Issue
Block a user