Mercurial > libervia-web
comparison browser_side/dialog.py @ 255:da0487f0a2e7
browser_side: small changes to prepare the contact group manager:
- group and contact lists are sorted
- avoid adding empty group in the "Add group" panel
- allow to show/hide the contact panel from another class
author | souliane <souliane@mailoo.org> |
---|---|
date | Sat, 09 Nov 2013 15:31:39 +0100 |
parents | 19153af4f327 |
children | 30c01671e338 |
comparison
equal
deleted
inserted
replaced
254:28d3315a8003 | 255:da0487f0a2e7 |
---|---|
296 self.add(Button("add", lambda sender: self.onGroupInput(textbox))) | 296 self.add(Button("add", lambda sender: self.onGroupInput(textbox))) |
297 self.cb = cb | 297 self.cb = cb |
298 | 298 |
299 def onGroupInput(self, sender): | 299 def onGroupInput(self, sender): |
300 text = sender.getText() | 300 text = sender.getText() |
301 if text == "": | |
302 return | |
301 for group in self.groups: | 303 for group in self.groups: |
302 if text == group: | 304 if text == group: |
303 Window.alert("The group '%s' already exists." % text) | 305 Window.alert("The group '%s' already exists." % text) |
304 return | 306 return |
305 for pattern in FORBIDDEN_PATTERNS_IN_GROUP: | 307 for pattern in FORBIDDEN_PATTERNS_IN_GROUP: |