Permalink
Browse files

Added some tooltips to employeeadmin example

  • Loading branch information...
1 parent e750205 commit 12f281eb1d08646c4b494ff266f21e84045269cf @keesbos keesbos committed May 9, 2011
Showing with 22 additions and 5 deletions.
  1. +13 −4 examples/employeeadmin/components.py
  2. +9 −1 examples/employeeadmin/public/EmployeeAdmin.css
@@ -16,6 +16,7 @@
from pyjamas.ui.TextBox import TextBox
from pyjamas.ui.PasswordTextBox import PasswordTextBox
from pyjamas.ui.ListBox import ListBox
+from pyjamas.ui.Tooltip import TooltipListener
from Grid import Grid
import ApplicationConstants
@@ -246,25 +247,33 @@ def __init__(self,parent):
self.emailInput.addKeyboardListener(self)
ftable.setWidget(2, 1, self.emailInput)
- ftable.setWidget(3, 0, Label("* Username", wordWrap=False))
+ w = Label("* Username", wordWrap=False)
+ w.addMouseListener(TooltipListener("Required, not changable"))
+ ftable.setWidget(3, 0, w)
self.usernameInput = TextBox()
self.usernameInput.addChangeListener(self.checkValid)
self.usernameInput.addKeyboardListener(self)
ftable.setWidget(3, 1, self.usernameInput)
- ftable.setWidget(4, 0, Label("* Password", wordWrap=False))
+ w = Label("* Password", wordWrap=False)
+ w.addMouseListener(TooltipListener("Required"))
+ ftable.setWidget(4, 0, w)
self.passwordInput = PasswordTextBox()
self.passwordInput.addChangeListener(self.checkValid)
self.passwordInput.addKeyboardListener(self)
ftable.setWidget(4, 1, self.passwordInput)
- ftable.setWidget(5, 0, Label("* Confirm", wordWrap=False))
+ w = Label("* Confirm", wordWrap=False)
+ w.addMouseListener(TooltipListener("Required"))
+ ftable.setWidget(5, 0, w)
self.confirmInput = PasswordTextBox()
self.confirmInput.addChangeListener(self.checkValid)
self.confirmInput.addKeyboardListener(self)
ftable.setWidget(5, 1, self.confirmInput)
- ftable.setWidget(6, 0, Label("* Department", wordWrap=False))
+ w = Label("* Department", wordWrap=False)
+ w.addMouseListener(TooltipListener("Required"))
+ ftable.setWidget(6, 0, w)
self.departmentCombo = ListBox()
self.departmentCombo.addChangeListener(self.checkValid)
self.departmentCombo.addKeyboardListener(self)
@@ -185,4 +185,12 @@ html>body .gwt-DecoratedStackPanel .gwt-StackPanelItem-below-selected .stackItem
border-top: 1px solid #666;
}
-
+.TooltipPopup {
+ background-color: #FFFFCC;
+ border: 1px solid #000000;
+ border-top: 1px solid #ccc;
+ border-left: 1px solid #ccc;
+ padding: 2px 4px 2px 4px;
+ font-family: arial,sans-serif;
+ font-size: 14px;
+}

0 comments on commit 12f281e

Please sign in to comment.