Mercurial > libervia-web
diff browser_side/contact.py @ 19:e8e3704eb97f
Added basic chat panel
- the chat panel show history, timestamp, and nickname (pretty similar to primitivus and wix chat window)
- JID has be rewritten to work with pyjamas, and is now in browser_side directory
- a widget can now be selected: the message send in uniBox will be sent to it if there is no explicit target prefix ("@something")
- a basic status panel is added under the uniBox, but not used yet
author | Goffi <goffi@goffi.org> |
---|---|
date | Sat, 16 Apr 2011 01:46:01 +0200 |
parents | c725b702e927 |
children | 77c2e48efa29 |
line wrap: on
line diff
--- a/browser_side/contact.py Fri Apr 15 15:30:31 2011 +0200 +++ b/browser_side/contact.py Sat Apr 16 01:46:01 2011 +0200 @@ -29,7 +29,7 @@ from pyjamas.dnd import makeDraggable from pyjamas.ui.DragWidget import DragWidget, DragContainer -from tools.jid import JID +from jid import JID class DragLabel(DragWidget): @@ -70,13 +70,14 @@ DragLabel.__init__(self, group, "GROUP") -class ContactLabel(Label): +class ContactLabel(DragLabel, Label): def __init__(self, jid, name=None): if not name: name=jid Label.__init__(self, name) self.jid=jid self.setStyleName('contact') + DragLabel.__init__(self, jid, "CONTACT") class GroupList(VerticalPanel): @@ -109,7 +110,7 @@ def __init__(self, text): Label.__init__(self, text) #, Element=DOM.createElement('div') self.setStyleName('contactTitle') - DragLabel.__init__(self, text, "CONTACT") + DragLabel.__init__(self, text, "CONTACT_TITLE") class ContactPanel(SimplePanel): """Manage the contacts and groups"""