diff browser_side/dialog.py @ 216:9827cda1a6b0

browser_side: added key listener to login and register panels - pressing enter set the focus to the next field or validate the form fix bug 29
author souliane <souliane@mailoo.org>
date Sun, 08 Sep 2013 13:40:01 +0200
parents a05e16f4a343
children f3898fbb00c3
line wrap: on
line diff
--- a/browser_side/dialog.py	Sat Sep 07 02:07:07 2013 +0200
+++ b/browser_side/dialog.py	Sun Sep 08 13:40:01 2013 +0200
@@ -195,26 +195,26 @@
 
     def onKeyUp(self, sender, keycode, modifiers):
         pass
-    
+
     def onKeyDown(self, sender, keycode, modifiers):
         pass
-    
+
     def onKeyPress(self, sender, keycode, modifiers):
         if self.enter_cb and keycode == KEY_ENTER:
             self.enter_cb(self)
 
 class GroupSelector(DialogBox):
-    
+
     def __init__(self, top_widgets, initial_groups, selected_groups,
                  ok_title, ok_cb = None, cancel_cb = None):
         DialogBox.__init__(self, centered = True)
         main_panel = VerticalPanel()
         self.ok_cb = ok_cb
         self.cancel_cb = cancel_cb
-        
+
         for wid in top_widgets:
             main_panel.add(wid)
-        
+
         main_panel.add(Label('Select in which groups your contact is:'))
         self.list_box = ListBox()
         self.list_box.setMultipleSelect(True)
@@ -222,7 +222,7 @@
         self.setAvailableGroups(initial_groups)
         self.setGroupsSelected(selected_groups)
         main_panel.add(self.list_box)
-        
+
         add_group_panel = HorizontalPanel()
         add_group_lb = Label('Add group:')
         add_group_tb = ExtTextBox(enter_cb = self.onGroupInput)
@@ -231,12 +231,12 @@
         add_group_panel.add(add_group_tb)
         add_group_panel.add(add_group_bt)
         main_panel.add(add_group_panel)
-        
+
         button_panel = HorizontalPanel()
         button_panel.add(Button(ok_title, self.onOK))
         button_panel.add(Button("Cancel", self.onCancel))
         main_panel.add(button_panel)
-        
+
         self.setWidget(main_panel)
 
     def getSelectedGroups(self):