/examples/mail/Shortcuts.py
Python | 24 lines | 19 code | 5 blank | 0 comment | 0 complexity | 023d1985edc7c0ef10ff26c7d949663c MD5 | raw file
Possible License(s): LGPL-2.1, Apache-2.0
- from ui import Composite, StackPanel, Label
- from Tasks import Tasks
- from Mailboxes import Mailboxes
- from Contacts import Contacts
- class Shortcuts(Composite):
- def __init__(self):
- stackPanel = StackPanel()
- stackPanel.add(Mailboxes(), self.createHeaderHTML("mailgroup.gif", "Mail"), True)
- stackPanel.add(Tasks(), self.createHeaderHTML("tasksgroup.gif", "Tasks"), True)
- stackPanel.add(Contacts(), self.createHeaderHTML("contactsgroup.gif", "Contacts"), True)
- stackPanel.showStack(0)
- self.initWidget(stackPanel)
- def createHeaderHTML(self, imageUrl, caption):
- header = "<table align='left'><tr>" + "<td><img src='"
- header += "http://code.google.com/webtoolkit/documentation/examples/desktopclone/"
- header += imageUrl + "'></td>"
- header += "<td style='vertical-align:middle'><b style='white-space:nowrap'>"
- header += caption + "</b></td>" + "</tr></table>"
- return header