toolbar and ajax fix patch
This commit is contained in:
@@ -1 +1 @@
|
|||||||
Version 2.6.0-development+timestamp.2013.09.04.16.32.36
|
Version 2.6.0-development+timestamp.2013.09.05.09.47.48
|
||||||
|
|||||||
+7
-1
@@ -643,6 +643,12 @@ class Response(Storage):
|
|||||||
lazy=v['dbtables']['lazy'] or '[no lazy tables]')
|
lazy=v['dbtables']['lazy'] or '[no lazy tables]')
|
||||||
u = web2py_uuid()
|
u = web2py_uuid()
|
||||||
backtotop = A('Back to top', _href="#totop-%s" % u)
|
backtotop = A('Back to top', _href="#totop-%s" % u)
|
||||||
|
# Convert lazy request.vars from property to Storage so they
|
||||||
|
# will be displayed in the toolbar.
|
||||||
|
request = copy.copy(current.request)
|
||||||
|
request.update(vars=current.request.vars,
|
||||||
|
get_vars=current.request.get_vars,
|
||||||
|
post_vars=current.request.post_vars)
|
||||||
return DIV(
|
return DIV(
|
||||||
BUTTON('design', _onclick="document.location='%s'" % admin),
|
BUTTON('design', _onclick="document.location='%s'" % admin),
|
||||||
BUTTON('request',
|
BUTTON('request',
|
||||||
@@ -655,7 +661,7 @@ class Response(Storage):
|
|||||||
_onclick="jQuery('#db-tables-%s').slideToggle()" % u),
|
_onclick="jQuery('#db-tables-%s').slideToggle()" % u),
|
||||||
BUTTON('db stats',
|
BUTTON('db stats',
|
||||||
_onclick="jQuery('#db-stats-%s').slideToggle()" % u),
|
_onclick="jQuery('#db-stats-%s').slideToggle()" % u),
|
||||||
DIV(BEAUTIFY(current.request), backtotop,
|
DIV(BEAUTIFY(request), backtotop,
|
||||||
_class="hidden", _id="request-%s" % u),
|
_class="hidden", _id="request-%s" % u),
|
||||||
DIV(BEAUTIFY(current.session), backtotop,
|
DIV(BEAUTIFY(current.session), backtotop,
|
||||||
_class="hidden", _id="session-%s" % u),
|
_class="hidden", _id="session-%s" % u),
|
||||||
|
|||||||
@@ -485,7 +485,12 @@ def wsgibase(environ, responder):
|
|||||||
|
|
||||||
session._try_store_in_cookie_or_file(request, response)
|
session._try_store_in_cookie_or_file(request, response)
|
||||||
|
|
||||||
|
# Set header so client can distinguish component requests.
|
||||||
if request.cid:
|
if request.cid:
|
||||||
|
http_response.headers.setdefault(
|
||||||
|
'web2py-component-content', 'replace')
|
||||||
|
|
||||||
|
if request.ajax:
|
||||||
if response.flash:
|
if response.flash:
|
||||||
http_response.headers['web2py-component-flash'] = \
|
http_response.headers['web2py-component-flash'] = \
|
||||||
urllib2.quote(xmlescape(response.flash)\
|
urllib2.quote(xmlescape(response.flash)\
|
||||||
|
|||||||
Reference in New Issue
Block a user