diff browser_side/richtext.py @ 433:bbdbee25123a

import constants.Const as C (according to the coding rules)
author souliane <souliane@mailoo.org>
date Thu, 01 May 2014 11:29:09 +0200
parents 8ecc5a7062e4
children
line wrap: on
line diff
--- a/browser_side/richtext.py	Sun Apr 27 18:53:37 2014 +0200
+++ b/browser_side/richtext.py	Thu May 01 11:29:09 2014 +0200
@@ -29,7 +29,7 @@
 from pyjamas.ui.KeyboardListener import KeyboardHandler
 from __pyjamas__ import doc
 
-from constants import Const
+from constants import Const as C
 from dialog import ConfirmDialog, InfoDialog
 from base_panels import TitlePanel, BaseTextEditor, HTMLTextEditor
 from list_manager import ListManager
@@ -199,14 +199,14 @@
                 self.display.addStyleName('richTextWysiwyg')
                 self.display.edit(True)
             content = self.getContent()
-            if content['text'] and content['syntax'] != Const.SYNTAX_XHTML:
-                self.host.bridge.call('syntaxConvert', syntaxConvertCb, content['text'], content['syntax'], Const.SYNTAX_XHTML)
+            if content['text'] and content['syntax'] != C.SYNTAX_XHTML:
+                self.host.bridge.call('syntaxConvert', syntaxConvertCb, content['text'], content['syntax'], C.SYNTAX_XHTML)
             else:
                 syntaxConvertCb(content['text'])
         else:
             syntaxConvertCb = lambda text: self.textarea.setText(text)
             text = self.display.getContent()['text']
-            if text and self.toolbar.syntax != Const.SYNTAX_XHTML:
+            if text and self.toolbar.syntax != C.SYNTAX_XHTML:
                 self.host.bridge.call('syntaxConvert', syntaxConvertCb, text)
             else:
                 syntaxConvertCb(text)
@@ -266,7 +266,7 @@
         assert(hasattr(self, 'textarea'))
         assert(hasattr(self, 'toolbar'))
         if self.wysiwyg:
-            content = {'text': self.display.getContent()['text'], 'syntax': Const.SYNTAX_XHTML}
+            content = {'text': self.display.getContent()['text'], 'syntax': C.SYNTAX_XHTML}
         else:
             content = {'text': self.strproc(self.textarea.getText()), 'syntax': self.toolbar.syntax}
         if hasattr(self, 'title_panel'):