diff src/browser/sat_browser/richtext.py @ 716:3b91225b457a

server + browser side: blogging refactoring (draft), huge commit sorry: /!\ everything is not working yet, group blog is not working for now - adaptation to backend changes - frontend commons part of blog have been moved to QuickFrontend - (editors) button "WYSIWYG edition" renamed to "preview" - (editors) Shift + [ENTER] is now used to send a text message, [ENTER] to finish a ligne normally - (editors) fixed modifiers handling - global simplification, resulting of the refactoring - with backend refactoring, we are now using PEP again, XEP-0277 compatibility is restored \o/
author Goffi <goffi@goffi.org>
date Sun, 16 Aug 2015 01:51:12 +0200
parents 9877607c719a
children fe3c2357a8c9
line wrap: on
line diff
--- a/src/browser/sat_browser/richtext.py	Tue Jul 28 22:22:10 2015 +0200
+++ b/src/browser/sat_browser/richtext.py	Sun Aug 16 01:51:12 2015 +0200
@@ -19,6 +19,8 @@
 
 from sat_frontends.tools import composition
 from sat.core.i18n import _
+from sat.core.log import getLogger
+log = getLogger(__name__)
 
 from pyjamas.ui.TextArea import TextArea
 from pyjamas.ui.Button import Button
@@ -157,7 +159,7 @@
             self.toolbar.addStyleName(self.style['toolbar'])
             for key in composition.RICH_SYNTAXES[syntax].keys():
                 self.addToolbarButton(syntax, key)
-            self.wysiwyg_button = CheckBox(_('WYSIWYG edition'))
+            self.wysiwyg_button = CheckBox(_('preview'))
             wysiywgCb = lambda sender: self.setWysiwyg(sender.getChecked())
             self.wysiwyg_button.addClickListener(wysiywgCb)
             self.toolbar.add(self.wysiwyg_button)
@@ -436,6 +438,7 @@
     def __syncToUniBox(self, recipients=None, emptyText=False):
         """Synchronize to unibox if a maximum of one recipient is set.
         @return True if the sync could be done, False otherwise"""
+        # FIXME: To be removed (unibox doesn't exist anymore)
         if not self.host.uni_box:
             return
         setText = lambda: self.host.uni_box.setText("" if emptyText else self.getContent()['text'])
@@ -536,4 +539,4 @@
 
     def onKeyDown(self, sender=None, keycode=None, modifiers=None):
         for listener in self._parent.edit_listeners:
-            listener(self, keycode)
+            listener(self, keycode, modifiers) # FIXME: edit_listeners must either be removed, or send an action instead of keycode/modifiers