cleanup
parent
3ec9cdcfab
commit
3cc7302e3c
|
@ -1,5 +1,4 @@
|
||||||
from orun.extjs import *
|
from orun.extjs import js, Ext, cp
|
||||||
from orun.extjs import cp
|
|
||||||
|
|
||||||
def ok_click(id_, *args, **kwargs):
|
def ok_click(id_, *args, **kwargs):
|
||||||
js.cli << Ext.getCmp(id_).setText('Clicked')
|
js.cli << Ext.getCmp(id_).setText('Clicked')
|
||||||
|
|
|
@ -48,8 +48,8 @@ class JsBlock:
|
||||||
return self.code
|
return self.code
|
||||||
|
|
||||||
class JsFunction(JsBlock):
|
class JsFunction(JsBlock):
|
||||||
def __str__(cls):
|
def __str__(self):
|
||||||
return 'function () { %s }' % cls.code
|
return 'function () { %s }' % self.code
|
||||||
|
|
||||||
block = JsBlock
|
block = JsBlock
|
||||||
func = function = JsFunction
|
func = function = JsFunction
|
||||||
|
@ -69,8 +69,9 @@ class JsManager(object):
|
||||||
self.output.append(data)
|
self.output.append(data)
|
||||||
|
|
||||||
def __str__(self):
|
def __str__(self):
|
||||||
s = '\n'.join(output)
|
|
||||||
output = self.output[:]
|
output = self.output[:]
|
||||||
|
s = '\n'.join(output)
|
||||||
|
|
||||||
return s
|
return s
|
||||||
|
|
||||||
class JsNode(object):
|
class JsNode(object):
|
||||||
|
@ -215,4 +216,4 @@ if __name__ == '__main__':
|
||||||
client << client.x
|
client << client.x
|
||||||
|
|
||||||
# test block
|
# test block
|
||||||
print(json.dumps({'click': call}, default=_encoder))
|
print(encode({'click': 'call'}))
|
||||||
|
|
Loading…
Reference in New Issue