compileapp patch, thanks Alan
This commit is contained in:
1 parent
54b6b9d995
commit
36f3571590
2 files changed
+8
-2
No files matched your search
@@ -1 +1 @@
|
|||||||
Version 1.99.5 (2012-03-02 10:03:17) stable
|
Version 1.99.5 (2012-03-02 10:04:06) stable
|
||||||
+7
-1
@@ -122,6 +122,9 @@ def LOAD(c=None, f='index', args=None, vars=None,
|
|||||||
is added on page loading without delay.
|
is added on page loading without delay.
|
||||||
"""
|
"""
|
||||||
from html import TAG, DIV, URL, SCRIPT, XML
|
from html import TAG, DIV, URL, SCRIPT, XML
|
||||||
|
create_div = True
|
||||||
|
if target is not None:
|
||||||
|
create_div = False
|
||||||
if args is None: args = []
|
if args is None: args = []
|
||||||
vars = Storage(vars or {})
|
vars = Storage(vars or {})
|
||||||
target = target or 'c'+str(random.random())[2:]
|
target = target or 'c'+str(random.random())[2:]
|
||||||
@@ -154,7 +157,10 @@ def LOAD(c=None, f='index', args=None, vars=None,
|
|||||||
else:
|
else:
|
||||||
statement = "web2py_component('%s','%s');" % (url, target)
|
statement = "web2py_component('%s','%s');" % (url, target)
|
||||||
script = SCRIPT(statement, _type="text/javascript")
|
script = SCRIPT(statement, _type="text/javascript")
|
||||||
return TAG[''](script, DIV(content,**attr))
|
if create_div:
|
||||||
|
return TAG[''](script, DIV(content,**attr))
|
||||||
|
else:
|
||||||
|
return TAG[''](script)
|
||||||
|
|
||||||
else:
|
else:
|
||||||
if not isinstance(args,(list,tuple)):
|
if not isinstance(args,(list,tuple)):
|
||||||
|
|||||||
Reference in new issue
Block a user