changeset 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 2b5503392fbd
children 151bf1afd97e
files browser_side/base_panels.py public/libervia.css
diffstat 2 files changed, 5 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/browser_side/base_panels.py	Thu Feb 13 15:32:59 2014 +0100
+++ b/browser_side/base_panels.py	Thu Feb 13 15:34:34 2014 +0100
@@ -37,7 +37,7 @@
 
 from tools import html_sanitize, html_strip, inlineRoot
 
-from sat_frontends.tools.strings import addURLToText
+from sat_frontends.tools.strings import addURLToText, addURLToImage
 from sat.core.i18n import _
 
 
@@ -461,7 +461,8 @@
                     self.removeKeyboardListener(self)
 
     def setDisplayContent(self):
-        self.setHTML(addURLToText(self._original_content['text']) if self.__enhance_display else self._original_content['text'])
+        text = addURLToImage(self._original_content['text'])
+        self.setHTML(addURLToText(text) if self.__enhance_display else text)
 
     def setFocus(self, focus):
         if focus:
--- a/public/libervia.css	Thu Feb 13 15:32:59 2014 +0100
+++ b/public/libervia.css	Thu Feb 13 15:34:34 2014 +0100
@@ -69,9 +69,9 @@
 .bubble p {
     margin: 0.4em 0em;
 }
-
 .bubble img {
-    # if you set max-width, check that the rich text editor icons are still well displayed
+    /* /!\ setting a max-width percentage value affects the toolbar icons */
+    max-width: 600px;
 }
 
 /* styles for displaying rich text - END */