Mercurial > libervia-web
comparison browser_side/xmlui.py @ 325:d07b54fdc60a
reverted changeset: bfbd9d6eb901
author | souliane <souliane@mailoo.org> |
---|---|
date | Tue, 07 Jan 2014 15:39:16 +0100 |
parents | bfbd9d6eb901 |
children | e8c26e24a6c7 |
comparison
equal
deleted
inserted
replaced
324:8131d0ccf21b | 325:d07b54fdc60a |
---|---|
17 | 17 |
18 You should have received a copy of the GNU Affero General Public License | 18 You should have received a copy of the GNU Affero General Public License |
19 along with this program. If not, see <http://www.gnu.org/licenses/>. | 19 along with this program. If not, see <http://www.gnu.org/licenses/>. |
20 """ | 20 """ |
21 | 21 |
22 from sat.core.i18n import _ | |
23 from pyjamas.ui.VerticalPanel import VerticalPanel | 22 from pyjamas.ui.VerticalPanel import VerticalPanel |
24 from pyjamas.ui.HorizontalPanel import HorizontalPanel | 23 from pyjamas.ui.HorizontalPanel import HorizontalPanel |
25 from pyjamas.ui.CellPanel import CellPanel | 24 from pyjamas.ui.CellPanel import CellPanel |
26 from pyjamas.ui.TabPanel import TabPanel | 25 from pyjamas.ui.TabPanel import TabPanel |
27 from pyjamas.ui.Grid import Grid | 26 from pyjamas.ui.Grid import Grid |
31 from pyjamas.ui.PasswordTextBox import PasswordTextBox | 30 from pyjamas.ui.PasswordTextBox import PasswordTextBox |
32 from pyjamas.ui.TextArea import TextArea | 31 from pyjamas.ui.TextArea import TextArea |
33 from pyjamas.ui.CheckBox import CheckBox | 32 from pyjamas.ui.CheckBox import CheckBox |
34 from pyjamas.ui.ListBox import ListBox | 33 from pyjamas.ui.ListBox import ListBox |
35 from pyjamas.ui.Button import Button | 34 from pyjamas.ui.Button import Button |
36 from dialog import InfoDialog | |
37 from nativedom import NativeDOM | 35 from nativedom import NativeDOM |
38 | 36 |
39 | 37 |
40 class InvalidXMLUI(Exception): | 38 class InvalidXMLUI(Exception): |
41 pass | 39 pass |
270 def onFormCancelled(self, button): | 268 def onFormCancelled(self, button): |
271 self.close() | 269 self.close() |
272 | 270 |
273 def onSaveParams(self, button): | 271 def onSaveParams(self, button): |
274 print "onSaveParams" | 272 print "onSaveParams" |
275 refresh = False | |
276 for ctrl in self.param_changed: | 273 for ctrl in self.param_changed: |
277 if isinstance(ctrl, CheckBox): | 274 if isinstance(ctrl, CheckBox): |
278 value = "true" if ctrl.isChecked() else "false" | 275 value = "true" if ctrl.isChecked() else "false" |
279 elif isinstance(ctrl, ListBox): | 276 elif isinstance(ctrl, ListBox): |
280 value = '\t'.join(ctrl.getSelectedItemText()) | 277 value = '\t'.join(ctrl.getSelectedItemText()) |
281 else: | 278 else: |
282 value = ctrl.getText() | 279 value = ctrl.getText() |
283 self.host.bridge.call('setParam', None, ctrl._param_name, value, ctrl._param_category) | 280 self.host.bridge.call('setParam', None, ctrl._param_name, value, ctrl._param_category) |
284 if ctrl._param_name in self.host.ui_refresh_params: | |
285 refresh = True | |
286 self.close() | 281 self.close() |
287 if refresh: | |
288 InfoDialog(_("Refresh needed"), _("A parameter requesting a page refresh has been modified.<br/>Your changes will be fully effective only after you refresh the page with 'F5' or from your browser menu.")).show() |