add regexp by Ext.re('/regexp/i')
parent
75ee3b188f
commit
cac13a1da3
|
@ -36,6 +36,9 @@ def getCmp(id):
|
|||
def getBody():
|
||||
return js.JsNode('Ext.getBody()')
|
||||
|
||||
def re(pattern):
|
||||
return js.RE(pattern)
|
||||
|
||||
tip = js.JsNode('Ext.tip')
|
||||
|
||||
class Component(js.JsObject):
|
||||
|
|
|
@ -7,10 +7,9 @@ js_ajax = None
|
|||
|
||||
live_methods = {}
|
||||
|
||||
class STUB:
|
||||
def stub_method(self):
|
||||
pass
|
||||
stub_class = STUB()
|
||||
class RE:
|
||||
def __init__(self, re):
|
||||
self.re = re
|
||||
|
||||
class FuncWithParams:
|
||||
def __init__(self, func, args = [], params = {}):
|
||||
|
@ -28,6 +27,8 @@ def dict2extjs(d):
|
|||
def encode(o):
|
||||
if isinstance(o, JsNode):
|
||||
return str(o)
|
||||
if isinstance(o, RE):
|
||||
return o.re
|
||||
elif isinstance(o, (list, tuple)):
|
||||
return list2extjs(o)
|
||||
elif isinstance(o, bool):
|
||||
|
|
Loading…
Reference in New Issue