Templatized the invocation of TinyMCE so it can be
authorArt Cancro <ajc@citadel.org>
Wed, 23 May 2007 12:55:17 +0000 (12:55 +0000)
committerArt Cancro <ajc@citadel.org>
Wed, 23 May 2007 12:55:17 +0000 (12:55 +0000)
site customized (or even completely replaced) if desired

webcit/messages.c
webcit/static/richedit.html [new file with mode: 0644]

index 6c19be0ce54559689d2ce91d43f8bb103f804f9d..7d1ace54cf65283ba65760dcb0fc2a49ff4cd093 100644 (file)
@@ -3132,22 +3132,10 @@ void display_enter(void)
        wprintf("</textarea>");
 
        /**
-        * The following script embeds the TinyMCE richedit control, and automatically
+        * The following template embeds the TinyMCE richedit control, and automatically
         * transforms the textarea into a richedit textarea.
         */
-       wprintf(
-               "<script language=\"javascript\" type=\"text/javascript\" src=\"tiny_mce/tiny_mce.js\"></script>\n"
-               "<script language=\"javascript\" type=\"text/javascript\">"
-               "tinyMCE.init({"
-               "       mode : \"textareas\", width : \"100%%\", browsers : \"msie,gecko\", "
-               "       theme : \"advanced\", plugins : \"iespell\", "
-               "       theme_advanced_buttons1 : \"bold, italic, underline, strikethrough, justifyleft, justifycenter, justifyright, justifyfull, bullist, numlist, cut, copy, paste, link, image, help, forecolor, iespell, code\", "
-               "       theme_advanced_buttons2 : \"\", "
-               "       theme_advanced_buttons3 : \"\", "
-               "       content_css : \"static/webcit-tinymce.css\" "
-               "});"
-               "</script>\n"
-       );
+       do_template("richedit");
 
        /** Enumerate any attachments which are already in place... */
        wprintf("<div style=\"float: left; \"><img src=\"static/diskette_24x.gif\" border=0 ");
@@ -3172,7 +3160,6 @@ void display_enter(void)
                "<input type=\"submit\" name=\"attach_button\" value=\"%s\">\n", _("Add"));
        wprintf("</div>");
 
-       /** Seth asked for these to be at the top *and* bottom... (removed) */
        wprintf("<div class=\"send_edit_msg\">");
        wprintf("<input type=\"submit\" name=\"send_button\" value=\"");
        if (recipient_required) {
diff --git a/webcit/static/richedit.html b/webcit/static/richedit.html
new file mode 100644 (file)
index 0000000..f69b7f0
--- /dev/null
@@ -0,0 +1,14 @@
+<script language="javascript" type="text/javascript" src="tiny_mce/tiny_mce.js"></script>
+<script language="javascript" type="text/javascript">
+tinyMCE.init({
+       mode : "textareas",
+       width : "100%",
+       browsers : "msie,gecko",
+       theme : "advanced",
+       plugins : "iespell",
+       theme_advanced_buttons1 : "bold, italic, underline, strikethrough, justifyleft, justifycenter, justifyright, justifyfull, bullist, numlist, cut, copy, paste, link, image, help, forecolor, iespell, code",
+       theme_advanced_buttons2 : "",
+       theme_advanced_buttons3 : "",
+       content_css : "static/webcit-tinymce.css"
+});
+</script>