Mercurial > libervia-backend
comparison frontends/src/tools/xmlui.py @ 1608:05274b27e90e
frontends (xmlui): fixed widget closing on submit
author | Goffi <goffi@goffi.org> |
---|---|
date | Mon, 16 Nov 2015 08:57:02 +0100 |
parents | d5e332055d9f |
children | 1378ec04380f |
comparison
equal
deleted
inserted
replaced
1607:4741e2f5eed2 | 1608:05274b27e90e |
---|---|
187 self._xmluiSubmit(data) | 187 self._xmluiSubmit(data) |
188 | 188 |
189 def _xmluiSubmit(self, data): | 189 def _xmluiSubmit(self, data): |
190 if self._xmlui_parent.submit_id is None: | 190 if self._xmlui_parent.submit_id is None: |
191 log.debug(_("Nothing to submit")) | 191 log.debug(_("Nothing to submit")) |
192 self._xmluiClose() | |
193 else: | 192 else: |
194 self._xmlui_parent.submit(data) | 193 self._xmlui_parent.submit(data) |
195 | 194 |
196 def _xmluiSetData(self, status, data): | 195 def _xmluiSetData(self, status, data): |
197 pass | 196 pass |
280 if child.nodeName == name: | 279 if child.nodeName == name: |
281 return child | 280 return child |
282 return None | 281 return None |
283 | 282 |
284 def submit(self, data): | 283 def submit(self, data): |
284 self._xmluiClose() | |
285 if self.submit_id is None: | 285 if self.submit_id is None: |
286 raise ValueError("Can't submit is self.submit_id is not set") | 286 raise ValueError("Can't submit is self.submit_id is not set") |
287 if "session_id" in data: | 287 if "session_id" in data: |
288 raise ValueError("session_id must no be used in data, it is automaticaly filled with self.session_id if present") | 288 raise ValueError("session_id must no be used in data, it is automaticaly filled with self.session_id if present") |
289 if self.session_id is not None: | 289 if self.session_id is not None: |