changeset 425:19bd203daa27

browser_side: set microblog editor width to 80%
author souliane <souliane@mailoo.org>
date Wed, 26 Mar 2014 13:39:08 +0100
parents 4ba4b099d266
children 77d8f55fc5f0
files browser_side/panels.py browser_side/richtext.py public/libervia.css
diffstat 3 files changed, 11 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/browser_side/panels.py	Wed Mar 26 17:53:02 2014 +0100
+++ b/browser_side/panels.py	Wed Mar 26 13:39:08 2014 +0100
@@ -516,6 +516,7 @@
                 self._blog_panel.refresh()
             else:  # allow to create a new comment
                 self._parent_entry._current_comment = None
+        self.entry_dialog.setWidth('auto')
         try:
             self.toggle_syntax_button.removeFromParent()
         except TypeError:
@@ -534,7 +535,7 @@
             self.bubble = richtext.RichTextEditor(self._blog_panel.host, content, self.__modifiedCb, self.__afterEditCb, options)
         else:  # assume raw text message have no title
             self.bubble = LightTextEditor(content, self.__modifiedCb, self.__afterEditCb, options={'no_xhtml': True})
-        self.bubble.setStyleName("bubble")
+        self.bubble.addStyleName("bubble")
         try:
             self.toggle_syntax_button.removeFromParent()
         except TypeError:
@@ -604,6 +605,7 @@
             pass
         entry.bubble.edit(edit)
         if edit:
+            entry.entry_dialog.setWidth('80%')
             if isinstance(entry.bubble, richtext.RichTextEditor):
                 image = '<a class="richTextIcon">A</a>'
                 title = _('Switch to raw text edition')
--- a/browser_side/richtext.py	Wed Mar 26 17:53:02 2014 +0100
+++ b/browser_side/richtext.py	Wed Mar 26 13:39:08 2014 +0100
@@ -161,6 +161,7 @@
             self.syntax_label = Label(_("Syntax: %s") % syntax)
             self.syntax_label.addStyleName("richTextSyntaxLabel")
             self.toolbar.add(self.syntax_label)
+            self.toolbar.setCellWidth(self.syntax_label, "100%")
             self.getFlexCellFormatter().setColSpan(self.toolbar_offset + count, 0, 2)
             self.setWidget(self.toolbar_offset + count, 0, self.toolbar)
             count += 1
--- a/public/libervia.css	Wed Mar 26 17:53:02 2014 +0100
+++ b/public/libervia.css	Wed Mar 26 13:39:08 2014 +0100
@@ -885,7 +885,6 @@
 
 .bubble textarea{
     width: 100%;
-    min-width: 300px;
 }
 
 .mb_entry_timestamp {
@@ -1262,6 +1261,11 @@
 .richTextEditor {
 }
 
+.richTextEditor tbody {
+    width: 100%;
+    display: table;
+}
+
 .richMessageEditor {
     width: 100%;
     margin: 9px 18px;
@@ -1279,6 +1283,8 @@
 }
 
 .richTextToolbar {
+    white-space: nowrap;
+    width: 100%;
 }
 
 .richTextArea {