comparison browser_side/base_panels.py @ 358:df743589bb8c

browser_side: microblog images have a fixed CSS "max-width" and they are clickable
author souliane <souliane@mailoo.org>
date Thu, 13 Feb 2014 15:34:34 +0100
parents b95099a1d11b
children 019e1e706e74
comparison
equal deleted inserted replaced
357:2b5503392fbd 358:df743589bb8c
35 from datetime import datetime 35 from datetime import datetime
36 from time import time 36 from time import time
37 37
38 from tools import html_sanitize, html_strip, inlineRoot 38 from tools import html_sanitize, html_strip, inlineRoot
39 39
40 from sat_frontends.tools.strings import addURLToText 40 from sat_frontends.tools.strings import addURLToText, addURLToImage
41 from sat.core.i18n import _ 41 from sat.core.i18n import _
42 42
43 43
44 class ChatText(HTMLPanel): 44 class ChatText(HTMLPanel):
45 45
459 self.removeFocusListener(self) 459 self.removeFocusListener(self)
460 if self in self._keyboardListeners: 460 if self in self._keyboardListeners:
461 self.removeKeyboardListener(self) 461 self.removeKeyboardListener(self)
462 462
463 def setDisplayContent(self): 463 def setDisplayContent(self):
464 self.setHTML(addURLToText(self._original_content['text']) if self.__enhance_display else self._original_content['text']) 464 text = addURLToImage(self._original_content['text'])
465 self.setHTML(addURLToText(text) if self.__enhance_display else text)
465 466
466 def setFocus(self, focus): 467 def setFocus(self, focus):
467 if focus: 468 if focus:
468 self.getElement().focus() 469 self.getElement().focus()
469 else: 470 else: