You are not logged in Log in Join
You are here: Home » Members » hewei » Zope RPMs for RedHat » Plone Product RPMs » CMFBoard » CMFBoard-2.1.2-dual-wysiwygeditor.patch » View File

Log in
Name

Password

 

CMFBoard-2.1.2-dual-wysiwygeditor.patch

File details
Size
4 K
File type
text/plain

File contents

--- CMFBoard/skins/cmfboard/forum_contact_admin_form.cpt.orig	2004-05-02 05:30:36.000000000 +0800
+++ CMFBoard/skins/cmfboard/forum_contact_admin_form.cpt	2004-07-03 00:53:43.000000000 +0800
@@ -54,6 +54,7 @@
 	
 	  <div class="field"
 	    tal:define="error errors/text|nothing;
+            text_format string:text/plain;
 	    text python:request.get('text',''); cooked_text text"
 	    tal:attributes="class python:test(error, 'field error', 'field')">
 	  
@@ -64,6 +65,7 @@
       
 	    <tal:block condition="python:wysiwyg_editor and wysiwyg_editor!='None'"
 	      define="inputname  string:text;
+              dummy python:request.set('text_format', text_format);
 	      formname   string:edit_form;
 	      inputvalue text;
 	      cooked_inputvalue cooked_text;
@@ -78,11 +80,9 @@
 		tal:content="text"></textarea>
 	    </tal:block>
 
-	  <tal:block tal:define="text_format string:text/plain">
 	    <metal:block metal:use-macro="here/forum_message_edit_widgets/macros/message_format">
 	    </metal:block>
-	  </tal:block>
-	</div>
+	  </div>
 
 	  <div class="formControls">
 	    <input class="context" type="submit" 
--- CMFBoard/skins/cmfboard/forum_message_edit_widgets.pt.orig	2004-06-07 12:37:36.000000000 +0800
+++ CMFBoard/skins/cmfboard/forum_message_edit_widgets.pt	2004-07-05 14:35:12.000000000 +0800
@@ -50,6 +50,7 @@
       </div>
 
       <select id="text_text_format" name="text_text_format"
+	onchange="switchEditingMode(options[selectedIndex].value=='text/html')"
 	tal:attributes="tabindex tabindex/next">
 	<option i18n:translate="" tal:repeat="item python:[
 	  ('text/plain', 'Plain Text'),
@@ -79,14 +80,30 @@
 	
 	<tal:editor condition="python:wysiwyg_editor and wysiwyg_editor!='None'"
 	  define="inputname  string:text;
+	  dummy python:request.set('text_format',request.get('text_text_format', text_format));
 	  formname   string:edit_form;
 	  inputvalue text;
+          cols string:60;
+          rows string:10;
+          width string:599px;
+          height string:240px;
 	  cooked_inputvalue text;
 	  tabindex tabindex/next;">
 	  <metal:block
 	    metal:use-macro="here/wysiwyg_support/macros/wysiwygEditorBox">
 	  </metal:block>
-	  <input type="hidden" name="text_text_format" value="text/html"/>
+          <script language="javascript"><!--
+              function switchEditingMode(wysiwyg) {
+                 var wizards = document.getElementById('wizards');
+                 if (wysiwyg) {
+                    if (wizards.style.display != 'none') wizards.style.display='none';
+                 } else {
+                    if (wizards.style.display == 'none') wizards.style.display='block';
+                 }
+                 switchEditor(wysiwyg);
+              }
+           //-->
+           </script>
 	</tal:editor>
 	    
 	<tal:block condition="python:not(wysiwyg_editor and wysiwyg_editor!='None')">
@@ -94,17 +111,21 @@
 	    tal:attributes="tabindex tabindex/next" 
 	    style="font-size:small;height:25em;width:100%"
 	    tal:content="text"></textarea>
+          <script language="javascript"><!--
+              function switchEditingMode(wysiwyg) {
+              }
+          //-->
+          </script>
+	</tal:block>
 	  <metal:block
 	    metal:use-macro="here/forum_message_edit_widgets/macros/message_format">
 	  </metal:block>
-	</tal:block>
       </div>
     </metal:define>
 
 
     <metal:define define-macro="wizards">
-      <div class="field" tal:condition="python:(not wysiwyg_editor
-	or wysiwyg_editor=='None') and data['show_wizards']">
+      <div id="wizards" class="field" tal:condition="python:data['show_wizards']">
 	  
 	<label i18n:translate="label_emoticons">Emotion icons</label>
 	<div class="forumEmoticons">
@@ -166,9 +187,7 @@
 
     <metal:define define-macro="iconsWizard">
       <div class="field" tal:condition="data/show_message_icons">
-	<div class="formHelp" i18n:translate="label_message_icon">
-	  Message icon
-	</div>
+	<label i18n:translate="label_message_icon">Message icon</label>
 	    
 	<div tal:define="sel request/message_icon|message_icon;"
 	  class="forumMessageIcons">