[IMP] keep query parameters around (at least debug) when clicking on logo or redirecting from HTTP root to 'correct' root URL
bzr revid: xmo@openerp.com-20110822131248-tl9j6flsw38r7p9e
This commit is contained in:
parent
2fad2d1f80
commit
26b7801355
|
@ -566,6 +566,11 @@ openerp.base.Login = openerp.base.Widget.extend({
|
||||||
openerp.base.Header = openerp.base.Widget.extend({
|
openerp.base.Header = openerp.base.Widget.extend({
|
||||||
init: function(parent, element_id) {
|
init: function(parent, element_id) {
|
||||||
this._super(parent, element_id);
|
this._super(parent, element_id);
|
||||||
|
if (jQuery.deparam(jQuery.param.querystring()).debug !== undefined) {
|
||||||
|
this.qs = '?debug'
|
||||||
|
} else {
|
||||||
|
this.qs = ''
|
||||||
|
}
|
||||||
},
|
},
|
||||||
start: function() {
|
start: function() {
|
||||||
return this.do_update();
|
return this.do_update();
|
||||||
|
|
|
@ -326,7 +326,7 @@
|
||||||
</div>
|
</div>
|
||||||
</t>
|
</t>
|
||||||
<t t-name="Header">
|
<t t-name="Header">
|
||||||
<a href="/" class="company_logo_link">
|
<a t-att-href="'/' + qs" class="company_logo_link">
|
||||||
<div class="company_logo" />
|
<div class="company_logo" />
|
||||||
</a>
|
</a>
|
||||||
<h1 class="header_title" t-if="session.session_is_valid()">
|
<h1 class="header_title" t-if="session.session_is_valid()">
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
#!/usr/bin/python
|
#!/usr/bin/python
|
||||||
import datetime
|
import datetime
|
||||||
|
import urllib
|
||||||
import dateutil.relativedelta
|
import dateutil.relativedelta
|
||||||
import functools
|
import functools
|
||||||
import optparse
|
import optparse
|
||||||
|
@ -446,7 +447,11 @@ class Root(object):
|
||||||
#for the mobile web client we are supposed to use a different url to just add '/mobile'
|
#for the mobile web client we are supposed to use a different url to just add '/mobile'
|
||||||
raise cherrypy.HTTPRedirect('/web_mobile/static/src/web_mobile.html', 301)
|
raise cherrypy.HTTPRedirect('/web_mobile/static/src/web_mobile.html', 301)
|
||||||
else:
|
else:
|
||||||
raise cherrypy.HTTPRedirect('/base/webclient/home', 301)
|
if kw:
|
||||||
|
qs = '?' + urllib.urlencode(kw)
|
||||||
|
else:
|
||||||
|
qs = ''
|
||||||
|
raise cherrypy.HTTPRedirect('/base/webclient/home' + qs, 301)
|
||||||
default.exposed = True
|
default.exposed = True
|
||||||
|
|
||||||
def main(argv):
|
def main(argv):
|
||||||
|
|
Loading…
Reference in New Issue