changeset 412:9977de10b7da

browser_side: editors do not listen for <escape> + display WYSIWIG in upper case
author souliane <souliane@mailoo.org>
date Wed, 19 Mar 2014 20:27:46 +0100
parents a0256b81d367
children 7a8991cda2fa
files browser_side/base_panels.py browser_side/richtext.py
diffstat 2 files changed, 4 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/browser_side/base_panels.py	Tue Mar 18 19:18:16 2014 +0100
+++ b/browser_side/base_panels.py	Wed Mar 19 20:27:46 2014 +0100
@@ -29,7 +29,7 @@
 from pyjamas.ui.StackPanel import StackPanel
 from pyjamas.ui.TextArea import TextArea
 from pyjamas.ui.Event import BUTTON_LEFT, BUTTON_MIDDLE, BUTTON_RIGHT
-from pyjamas.ui.KeyboardListener import KEY_ENTER, KEY_ESCAPE, KEY_SHIFT, KeyboardHandler
+from pyjamas.ui.KeyboardListener import KEY_ENTER, KEY_SHIFT, KeyboardHandler
 from pyjamas.ui.FocusListener import FocusHandler
 from pyjamas.ui.ClickListener import ClickHandler
 from pyjamas import DOM
@@ -530,7 +530,7 @@
         if keycode == KEY_SHIFT or self.__shift_down:  # allow input a new line with <shift> + <enter>
             self.__shift_down = True
             return
-        if keycode in (KEY_ENTER, KEY_ESCAPE):  # finish the edition
+        if keycode == KEY_ENTER:  # finish the edition
             self.textarea.setFocus(False)
             if not self.options['listen_focus']:
                 self.edit(False)
--- a/browser_side/richtext.py	Tue Mar 18 19:18:16 2014 +0100
+++ b/browser_side/richtext.py	Wed Mar 19 20:27:46 2014 +0100
@@ -57,7 +57,7 @@
         self.__readOptions(options)
         self.style = {'main': 'richTextEditor',
                       'title': 'richTextTitle',
-                      'toolbar': 'richTextToolbaar',
+                      'toolbar': 'richTextToolbar',
                       'textarea': 'richTextArea'}
         if isinstance(style, dict):
             self.style.update(style)
@@ -154,7 +154,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(_('WYSIWYG edition'))
             wysiywgCb = lambda sender: self.setWysiwyg(sender.getChecked())
             self.wysiwyg_button.addClickListener(wysiywgCb)
             self.toolbar.add(self.wysiwyg_button)