Mercurial > libervia-web
comparison browser_side/panels.py @ 383:b90744ec426e
browser_side: refresh the ChatPanel and MicroblogPanel when they are opened from a drag and drop
author | souliane <souliane@mailoo.org> |
---|---|
date | Wed, 26 Feb 2014 13:50:26 +0100 |
parents | 5e0e2032928c |
children | ee61b0765d6c |
comparison
equal
deleted
inserted
replaced
382:06fbe6055925 | 383:b90744ec426e |
---|---|
631 # XXX: pyjamas doesn't support use of cls directly | 631 # XXX: pyjamas doesn't support use of cls directly |
632 _new_panel = MicroblogPanel(host, _items) | 632 _new_panel = MicroblogPanel(host, _items) |
633 host.FillMicroblogPanel(_new_panel) | 633 host.FillMicroblogPanel(_new_panel) |
634 host.bridge.call('getMassiveLastMblogs', _new_panel.massiveInsert, _type, _items, 10) | 634 host.bridge.call('getMassiveLastMblogs', _new_panel.massiveInsert, _type, _items, 10) |
635 host.setSelected(_new_panel) | 635 host.setSelected(_new_panel) |
636 _new_panel.refresh() | |
636 return _new_panel | 637 return _new_panel |
637 | 638 |
638 @classmethod | 639 @classmethod |
639 def createMetaPanel(cls, host, item): | 640 def createMetaPanel(cls, host, item): |
640 """Needed for the drop keys to not be mixed between meta panel and panel for "Contacts" group""" | 641 """Needed for the drop keys to not be mixed between meta panel and panel for "Contacts" group""" |
1038 _contact = item if isinstance(item, JID) else JID(item) | 1039 _contact = item if isinstance(item, JID) else JID(item) |
1039 host.contact_panel.setContactMessageWaiting(_contact.bare, False) | 1040 host.contact_panel.setContactMessageWaiting(_contact.bare, False) |
1040 _new_panel = ChatPanel(host, _contact) # XXX: pyjamas doesn't seems to support creating with cls directly | 1041 _new_panel = ChatPanel(host, _contact) # XXX: pyjamas doesn't seems to support creating with cls directly |
1041 _new_panel.historyPrint() | 1042 _new_panel.historyPrint() |
1042 host.setSelected(_new_panel) | 1043 host.setSelected(_new_panel) |
1044 _new_panel.refresh() | |
1043 return _new_panel | 1045 return _new_panel |
1044 | 1046 |
1045 def refresh(self): | 1047 def refresh(self): |
1046 """Refresh the display of this widget. If the unibox is disabled, | 1048 """Refresh the display of this widget. If the unibox is disabled, |
1047 add a message box at the bottom of the panel""" | 1049 add a message box at the bottom of the panel""" |