changeset 1036:35048cafb18d

tools (xmlui): to click a button in a "param" form will automatically submit the parameters of the same category
author souliane <souliane@mailoo.org>
date Fri, 16 May 2014 00:53:09 +0200
parents c4c14480715a
children 6e975c6b0faf
files src/tools/xml_tools.py
diffstat 1 files changed, 4 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/src/tools/xml_tools.py	Wed May 07 18:16:15 2014 +0200
+++ b/src/tools/xml_tools.py	Fri May 16 00:53:09 2014 +0200
@@ -236,6 +236,10 @@
 
             if callback_id:
                 widget_kwargs['callback_id'] = callback_id
+                others = ["%s%s%s" % (category_name, SAT_PARAM_SEPARATOR, other.getAttribute('name'))
+                          for other in category.getElementsByTagName('param')
+                          if other.getAttribute('type') != 'button']
+                widget_kwargs['fields_back'] = others
 
             widget_kwargs['name'] = "%s%s%s" % (category_name, SAT_PARAM_SEPARATOR, param_name)