Made mce_settings class variable in TinyMCE widget a copy of default settings instead of reference.
authorPawel Solyga <Pawel.Solyga@gmail.com>
Tue, 30 Sep 2008 12:59:59 +0000
changeset 211 ec26682053df
parent 210 d05444cf4641
child 212 8e208e326adb
Made mce_settings class variable in TinyMCE widget a copy of default settings instead of reference.
app/soc/views/helpers/custom_widgets.py
--- a/app/soc/views/helpers/custom_widgets.py	Tue Sep 30 12:47:05 2008 +0000
+++ b/app/soc/views/helpers/custom_widgets.py	Tue Sep 30 12:59:59 2008 +0000
@@ -49,7 +49,7 @@
                          'theme_advanced_toolbar_location': "top",
                          'theme_advanced_toolbar_align': "center"}
 
-    mce_settings = DEF_MCE_SETTINGS
+    mce_settings = DEF_MCE_SETTINGS.copy()
 
     TINY_MCE_HTML_FMT = u'''\
 <textarea %(attrs)s>%(value)s</textarea>
@@ -64,7 +64,7 @@
         value = ''
       value = smart_unicode(value)
       final_attrs = self.build_attrs(attrs, name=name)
-
+      
       self.mce_settings['elements'] = "id_%s" % name
         
       # convert mce_settings from dict to JSON