From 43a41f577fb63d0a3876a26e37163eedf652b9eb Mon Sep 17 00:00:00 2001 From: inpos Date: Thu, 9 Aug 2018 19:01:14 +0300 Subject: [PATCH] Ext.get and Ext.getCmp can get JsObject as param --- orun/extjs/base.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/orun/extjs/base.py b/orun/extjs/base.py index b6d1d70..d772e1f 100644 --- a/orun/extjs/base.py +++ b/orun/extjs/base.py @@ -27,9 +27,13 @@ def createByAlias(alias, args={}): return _create('createByAlias', alias, args) def get(id): + if isinstance(id, js.JsObject): + id = id._id return js.JsNode('Ext.get(\'%s\')' % id) def getCmp(id): + if isinstance(id, js.JsObject): + id = id._id return js.JsNode('Ext.getCmp(\'%s\')' % id) def getBody(): return js.JsNode('Ext.getBody()')