changeset 359:151bf1afd97e

browser_side: fix error when displaying the microblogs of a contact
author souliane <souliane@mailoo.org>
date Tue, 18 Feb 2014 14:38:04 +0100
parents df743589bb8c
children 9834136b15ed
files browser_side/richtext.py
diffstat 1 files changed, 4 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/browser_side/richtext.py	Thu Feb 13 15:34:34 2014 +0100
+++ b/browser_side/richtext.py	Tue Feb 18 14:38:04 2014 +0100
@@ -73,12 +73,15 @@
 
     def _prepareUI(self, y_offset=0):
         """Prepare the UI to host title panel, toolbar, text area...
-         @param y_offset: Y offset to start from (extra rows on top)"""
+        @param y_offset: Y offset to start from (extra rows on top)"""
         if not self.read_only:
             self.title_offset = y_offset
             self.toolbar_offset = self.title_offset + (0 if self.no_title else 1)
             self.content_offset = self.toolbar_offset + (len(composition.RICH_SYNTAXES) if self._debug else 1)
             self.command_offset = self.content_offset + 1
+        else:
+            self.title_offset = self.toolbar_offset = self.content_offset = y_offset
+            self.command_offset = self.content_offset + 1
         FlexTable.__init__(self, self.command_offset + (0 if self.no_command else 1), 2)
         self.addStyleName(self.style['main'])