Mercurial > libervia-web
diff libervia.tac @ 218:4e6467efd6bf
browser_side: small improvements for parameters panel
- auto-select the first tab
- remove the parameters item if there's nothing to display
author | souliane <souliane@mailoo.org> |
---|---|
date | Sat, 07 Sep 2013 19:54:41 +0200 |
parents | e830a0c60d32 |
children | 36673d19c87e |
line wrap: on
line diff
--- a/libervia.tac Sun Sep 08 12:34:00 2013 +0200 +++ b/libervia.tac Sat Sep 07 19:54:41 2013 +0200 @@ -371,11 +371,14 @@ params = cat.getElementsByTagName("param") params_list = [param.getAttribute("name") for param in params] self.authorized_params[cat.getAttribute("name")] = params_list - return d + if self.authorized_params: + return d + else: + return None d.addCallback(setAuthorizedParams) from sat.tools.xml_tools import paramsXml2xmlUI - d.addCallback(lambda d: paramsXml2xmlUI(d)) + d.addCallback(lambda d: paramsXml2xmlUI(d) if d else "") self.sat_host.bridge.getParams(SECURITY_LIMIT, profile, callback=d.callback, errback=d.errback) return d