You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@roller.apache.org by sn...@apache.org on 2009/09/27 05:11:43 UTC
svn commit: r819248 [1/8] - in
/roller/trunk/apps/weblogger/web/roller-ui/authoring/editors: ./
xinha-0.95/ xinha-0.95/examples/ xinha-0.95/images/ xinha-0.95/images/de/
xinha-0.95/images/fr/ xinha-0.95/lang/ xinha-0.95/modules/
xinha-0.95/modules/Colo...
Author: snoopdave
Date: Sun Sep 27 03:11:38 2009
New Revision: 819248
URL: http://svn.apache.org/viewvc?rev=819248&view=rev
Log:
Upgrades to Xinha 0.95
https://issues.apache.org/jira/browse/ROL-1834
Fixes problem where Xinha was making absolute URLs relative
https://issues.apache.org/jira/browse/ROL-1782
Added:
roller/trunk/apps/weblogger/web/roller-ui/authoring/editors/xinha-0.95/
roller/trunk/apps/weblogger/web/roller-ui/authoring/editors/xinha-0.95/Xinha.css
roller/trunk/apps/weblogger/web/roller-ui/authoring/editors/xinha-0.95/XinhaCore.js
roller/trunk/apps/weblogger/web/roller-ui/authoring/editors/xinha-0.95/XinhaLoader.js
roller/trunk/apps/weblogger/web/roller-ui/authoring/editors/xinha-0.95/XinhaLoader_readme.txt
roller/trunk/apps/weblogger/web/roller-ui/authoring/editors/xinha-0.95/compression_readme.txt
roller/trunk/apps/weblogger/web/roller-ui/authoring/editors/xinha-0.95/examples/
roller/trunk/apps/weblogger/web/roller-ui/authoring/editors/xinha-0.95/examples/full_example.css
roller/trunk/apps/weblogger/web/roller-ui/authoring/editors/xinha-0.95/htmlarea.js
roller/trunk/apps/weblogger/web/roller-ui/authoring/editors/xinha-0.95/images/
roller/trunk/apps/weblogger/web/roller-ui/authoring/editors/xinha-0.95/images/de/
roller/trunk/apps/weblogger/web/roller-ui/authoring/editors/xinha-0.95/images/de/bold.gif (with props)
roller/trunk/apps/weblogger/web/roller-ui/authoring/editors/xinha-0.95/images/de/italic.gif (with props)
roller/trunk/apps/weblogger/web/roller-ui/authoring/editors/xinha-0.95/images/de/underline.gif (with props)
roller/trunk/apps/weblogger/web/roller-ui/authoring/editors/xinha-0.95/images/ed_about.gif (with props)
roller/trunk/apps/weblogger/web/roller-ui/authoring/editors/xinha-0.95/images/ed_align.gif (with props)
roller/trunk/apps/weblogger/web/roller-ui/authoring/editors/xinha-0.95/images/ed_align_center.gif (with props)
roller/trunk/apps/weblogger/web/roller-ui/authoring/editors/xinha-0.95/images/ed_align_justify.gif (with props)
roller/trunk/apps/weblogger/web/roller-ui/authoring/editors/xinha-0.95/images/ed_align_left.gif (with props)
roller/trunk/apps/weblogger/web/roller-ui/authoring/editors/xinha-0.95/images/ed_align_right.gif (with props)
roller/trunk/apps/weblogger/web/roller-ui/authoring/editors/xinha-0.95/images/ed_blank.gif (with props)
roller/trunk/apps/weblogger/web/roller-ui/authoring/editors/xinha-0.95/images/ed_buttons_main.gif (with props)
roller/trunk/apps/weblogger/web/roller-ui/authoring/editors/xinha-0.95/images/ed_charmap.gif (with props)
roller/trunk/apps/weblogger/web/roller-ui/authoring/editors/xinha-0.95/images/ed_clearfonts.gif (with props)
roller/trunk/apps/weblogger/web/roller-ui/authoring/editors/xinha-0.95/images/ed_color_bg.gif (with props)
roller/trunk/apps/weblogger/web/roller-ui/authoring/editors/xinha-0.95/images/ed_color_fg.gif (with props)
roller/trunk/apps/weblogger/web/roller-ui/authoring/editors/xinha-0.95/images/ed_copy.gif (with props)
roller/trunk/apps/weblogger/web/roller-ui/authoring/editors/xinha-0.95/images/ed_custom.gif (with props)
roller/trunk/apps/weblogger/web/roller-ui/authoring/editors/xinha-0.95/images/ed_cut.gif (with props)
roller/trunk/apps/weblogger/web/roller-ui/authoring/editors/xinha-0.95/images/ed_delete.gif (with props)
roller/trunk/apps/weblogger/web/roller-ui/authoring/editors/xinha-0.95/images/ed_format_bold.gif (with props)
roller/trunk/apps/weblogger/web/roller-ui/authoring/editors/xinha-0.95/images/ed_format_italic.gif (with props)
roller/trunk/apps/weblogger/web/roller-ui/authoring/editors/xinha-0.95/images/ed_format_strike.gif (with props)
roller/trunk/apps/weblogger/web/roller-ui/authoring/editors/xinha-0.95/images/ed_format_sub.gif (with props)
roller/trunk/apps/weblogger/web/roller-ui/authoring/editors/xinha-0.95/images/ed_format_sup.gif (with props)
roller/trunk/apps/weblogger/web/roller-ui/authoring/editors/xinha-0.95/images/ed_format_underline.gif (with props)
roller/trunk/apps/weblogger/web/roller-ui/authoring/editors/xinha-0.95/images/ed_help.gif (with props)
roller/trunk/apps/weblogger/web/roller-ui/authoring/editors/xinha-0.95/images/ed_hr.gif (with props)
roller/trunk/apps/weblogger/web/roller-ui/authoring/editors/xinha-0.95/images/ed_html.gif (with props)
roller/trunk/apps/weblogger/web/roller-ui/authoring/editors/xinha-0.95/images/ed_image.gif (with props)
roller/trunk/apps/weblogger/web/roller-ui/authoring/editors/xinha-0.95/images/ed_indent_less.gif (with props)
roller/trunk/apps/weblogger/web/roller-ui/authoring/editors/xinha-0.95/images/ed_indent_more.gif (with props)
roller/trunk/apps/weblogger/web/roller-ui/authoring/editors/xinha-0.95/images/ed_killword.gif (with props)
roller/trunk/apps/weblogger/web/roller-ui/authoring/editors/xinha-0.95/images/ed_left_to_right.gif (with props)
roller/trunk/apps/weblogger/web/roller-ui/authoring/editors/xinha-0.95/images/ed_link.gif (with props)
roller/trunk/apps/weblogger/web/roller-ui/authoring/editors/xinha-0.95/images/ed_list_bullet.gif (with props)
roller/trunk/apps/weblogger/web/roller-ui/authoring/editors/xinha-0.95/images/ed_list_num.gif (with props)
roller/trunk/apps/weblogger/web/roller-ui/authoring/editors/xinha-0.95/images/ed_overwrite.gif (with props)
roller/trunk/apps/weblogger/web/roller-ui/authoring/editors/xinha-0.95/images/ed_paste.gif (with props)
roller/trunk/apps/weblogger/web/roller-ui/authoring/editors/xinha-0.95/images/ed_print.gif (with props)
roller/trunk/apps/weblogger/web/roller-ui/authoring/editors/xinha-0.95/images/ed_redo.gif (with props)
roller/trunk/apps/weblogger/web/roller-ui/authoring/editors/xinha-0.95/images/ed_right_to_left.gif (with props)
roller/trunk/apps/weblogger/web/roller-ui/authoring/editors/xinha-0.95/images/ed_rmformat.gif (with props)
roller/trunk/apps/weblogger/web/roller-ui/authoring/editors/xinha-0.95/images/ed_save.gif (with props)
roller/trunk/apps/weblogger/web/roller-ui/authoring/editors/xinha-0.95/images/ed_save.png (with props)
roller/trunk/apps/weblogger/web/roller-ui/authoring/editors/xinha-0.95/images/ed_saveas.gif (with props)
roller/trunk/apps/weblogger/web/roller-ui/authoring/editors/xinha-0.95/images/ed_selectall.gif (with props)
roller/trunk/apps/weblogger/web/roller-ui/authoring/editors/xinha-0.95/images/ed_show_border.gif (with props)
roller/trunk/apps/weblogger/web/roller-ui/authoring/editors/xinha-0.95/images/ed_splitblock.gif (with props)
roller/trunk/apps/weblogger/web/roller-ui/authoring/editors/xinha-0.95/images/ed_splitcel.gif (with props)
roller/trunk/apps/weblogger/web/roller-ui/authoring/editors/xinha-0.95/images/ed_undo.gif (with props)
roller/trunk/apps/weblogger/web/roller-ui/authoring/editors/xinha-0.95/images/ed_word_cleaner.gif (with props)
roller/trunk/apps/weblogger/web/roller-ui/authoring/editors/xinha-0.95/images/fr/
roller/trunk/apps/weblogger/web/roller-ui/authoring/editors/xinha-0.95/images/fr/bold.gif (with props)
roller/trunk/apps/weblogger/web/roller-ui/authoring/editors/xinha-0.95/images/fr/strikethrough.gif (with props)
roller/trunk/apps/weblogger/web/roller-ui/authoring/editors/xinha-0.95/images/fr/underline.gif (with props)
roller/trunk/apps/weblogger/web/roller-ui/authoring/editors/xinha-0.95/images/fullscreen_maximize.gif (with props)
roller/trunk/apps/weblogger/web/roller-ui/authoring/editors/xinha-0.95/images/fullscreen_minimize.gif (with props)
roller/trunk/apps/weblogger/web/roller-ui/authoring/editors/xinha-0.95/images/insert_table.gif (with props)
roller/trunk/apps/weblogger/web/roller-ui/authoring/editors/xinha-0.95/images/insertfilelink.gif (with props)
roller/trunk/apps/weblogger/web/roller-ui/authoring/editors/xinha-0.95/images/insertmacro.png (with props)
roller/trunk/apps/weblogger/web/roller-ui/authoring/editors/xinha-0.95/images/tidy.gif (with props)
roller/trunk/apps/weblogger/web/roller-ui/authoring/editors/xinha-0.95/images/toggle_borders.gif (with props)
roller/trunk/apps/weblogger/web/roller-ui/authoring/editors/xinha-0.95/images/xinha_logo.gif (with props)
roller/trunk/apps/weblogger/web/roller-ui/authoring/editors/xinha-0.95/lang/
roller/trunk/apps/weblogger/web/roller-ui/authoring/editors/xinha-0.95/lang/b5.js
roller/trunk/apps/weblogger/web/roller-ui/authoring/editors/xinha-0.95/lang/ch.js
roller/trunk/apps/weblogger/web/roller-ui/authoring/editors/xinha-0.95/lang/cz.js
roller/trunk/apps/weblogger/web/roller-ui/authoring/editors/xinha-0.95/lang/da.js
roller/trunk/apps/weblogger/web/roller-ui/authoring/editors/xinha-0.95/lang/de.js
roller/trunk/apps/weblogger/web/roller-ui/authoring/editors/xinha-0.95/lang/ee.js
roller/trunk/apps/weblogger/web/roller-ui/authoring/editors/xinha-0.95/lang/el.js
roller/trunk/apps/weblogger/web/roller-ui/authoring/editors/xinha-0.95/lang/es.js
roller/trunk/apps/weblogger/web/roller-ui/authoring/editors/xinha-0.95/lang/eu.js
roller/trunk/apps/weblogger/web/roller-ui/authoring/editors/xinha-0.95/lang/fa.js
roller/trunk/apps/weblogger/web/roller-ui/authoring/editors/xinha-0.95/lang/fi.js
roller/trunk/apps/weblogger/web/roller-ui/authoring/editors/xinha-0.95/lang/fr.js
roller/trunk/apps/weblogger/web/roller-ui/authoring/editors/xinha-0.95/lang/gb.js
roller/trunk/apps/weblogger/web/roller-ui/authoring/editors/xinha-0.95/lang/he.js
roller/trunk/apps/weblogger/web/roller-ui/authoring/editors/xinha-0.95/lang/hu.js
roller/trunk/apps/weblogger/web/roller-ui/authoring/editors/xinha-0.95/lang/it.js
roller/trunk/apps/weblogger/web/roller-ui/authoring/editors/xinha-0.95/lang/ja.js
roller/trunk/apps/weblogger/web/roller-ui/authoring/editors/xinha-0.95/lang/lt.js
roller/trunk/apps/weblogger/web/roller-ui/authoring/editors/xinha-0.95/lang/lv.js
roller/trunk/apps/weblogger/web/roller-ui/authoring/editors/xinha-0.95/lang/nb.js
roller/trunk/apps/weblogger/web/roller-ui/authoring/editors/xinha-0.95/lang/nl.js
roller/trunk/apps/weblogger/web/roller-ui/authoring/editors/xinha-0.95/lang/pl.js
roller/trunk/apps/weblogger/web/roller-ui/authoring/editors/xinha-0.95/lang/pt_br.js
roller/trunk/apps/weblogger/web/roller-ui/authoring/editors/xinha-0.95/lang/ro.js
roller/trunk/apps/weblogger/web/roller-ui/authoring/editors/xinha-0.95/lang/ru.js
roller/trunk/apps/weblogger/web/roller-ui/authoring/editors/xinha-0.95/lang/sh.js
roller/trunk/apps/weblogger/web/roller-ui/authoring/editors/xinha-0.95/lang/si.js
roller/trunk/apps/weblogger/web/roller-ui/authoring/editors/xinha-0.95/lang/sr.js
roller/trunk/apps/weblogger/web/roller-ui/authoring/editors/xinha-0.95/lang/sv.js
roller/trunk/apps/weblogger/web/roller-ui/authoring/editors/xinha-0.95/lang/th.js
roller/trunk/apps/weblogger/web/roller-ui/authoring/editors/xinha-0.95/lang/vn.js
roller/trunk/apps/weblogger/web/roller-ui/authoring/editors/xinha-0.95/license.txt
roller/trunk/apps/weblogger/web/roller-ui/authoring/editors/xinha-0.95/modules/
roller/trunk/apps/weblogger/web/roller-ui/authoring/editors/xinha-0.95/modules/ColorPicker/
roller/trunk/apps/weblogger/web/roller-ui/authoring/editors/xinha-0.95/modules/ColorPicker/ColorPicker.js
roller/trunk/apps/weblogger/web/roller-ui/authoring/editors/xinha-0.95/modules/ColorPicker/lang/
roller/trunk/apps/weblogger/web/roller-ui/authoring/editors/xinha-0.95/modules/ColorPicker/lang/pt_br.js
roller/trunk/apps/weblogger/web/roller-ui/authoring/editors/xinha-0.95/modules/CreateLink/
roller/trunk/apps/weblogger/web/roller-ui/authoring/editors/xinha-0.95/modules/CreateLink/lang/
roller/trunk/apps/weblogger/web/roller-ui/authoring/editors/xinha-0.95/modules/CreateLink/lang/pt_br.js
roller/trunk/apps/weblogger/web/roller-ui/authoring/editors/xinha-0.95/modules/CreateLink/link.html
roller/trunk/apps/weblogger/web/roller-ui/authoring/editors/xinha-0.95/modules/CreateLink/link.js
roller/trunk/apps/weblogger/web/roller-ui/authoring/editors/xinha-0.95/modules/Dialogs/
roller/trunk/apps/weblogger/web/roller-ui/authoring/editors/xinha-0.95/modules/Dialogs/dialog.js
roller/trunk/apps/weblogger/web/roller-ui/authoring/editors/xinha-0.95/modules/Dialogs/inline-dialog.js
roller/trunk/apps/weblogger/web/roller-ui/authoring/editors/xinha-0.95/modules/Dialogs/panel-dialog.js
roller/trunk/apps/weblogger/web/roller-ui/authoring/editors/xinha-0.95/modules/Dialogs/popupwin.js
roller/trunk/apps/weblogger/web/roller-ui/authoring/editors/xinha-0.95/modules/FullScreen/
roller/trunk/apps/weblogger/web/roller-ui/authoring/editors/xinha-0.95/modules/FullScreen/full-screen.js
roller/trunk/apps/weblogger/web/roller-ui/authoring/editors/xinha-0.95/modules/FullScreen/lang/
roller/trunk/apps/weblogger/web/roller-ui/authoring/editors/xinha-0.95/modules/FullScreen/lang/de.js
roller/trunk/apps/weblogger/web/roller-ui/authoring/editors/xinha-0.95/modules/FullScreen/lang/fr.js
roller/trunk/apps/weblogger/web/roller-ui/authoring/editors/xinha-0.95/modules/FullScreen/lang/ja.js
roller/trunk/apps/weblogger/web/roller-ui/authoring/editors/xinha-0.95/modules/FullScreen/lang/nb.js
roller/trunk/apps/weblogger/web/roller-ui/authoring/editors/xinha-0.95/modules/FullScreen/lang/pl.js
roller/trunk/apps/weblogger/web/roller-ui/authoring/editors/xinha-0.95/modules/FullScreen/lang/pt_br.js
roller/trunk/apps/weblogger/web/roller-ui/authoring/editors/xinha-0.95/modules/FullScreen/lang/ru.js
roller/trunk/apps/weblogger/web/roller-ui/authoring/editors/xinha-0.95/modules/FullScreen/lang/sv.js
roller/trunk/apps/weblogger/web/roller-ui/authoring/editors/xinha-0.95/modules/Gecko/
roller/trunk/apps/weblogger/web/roller-ui/authoring/editors/xinha-0.95/modules/Gecko/Gecko.js
roller/trunk/apps/weblogger/web/roller-ui/authoring/editors/xinha-0.95/modules/Gecko/paraHandlerBest.js
roller/trunk/apps/weblogger/web/roller-ui/authoring/editors/xinha-0.95/modules/GetHtml/
roller/trunk/apps/weblogger/web/roller-ui/authoring/editors/xinha-0.95/modules/GetHtml/DOMwalk.js
roller/trunk/apps/weblogger/web/roller-ui/authoring/editors/xinha-0.95/modules/GetHtml/TransformInnerHTML.js
roller/trunk/apps/weblogger/web/roller-ui/authoring/editors/xinha-0.95/modules/GetHtml/lang/
roller/trunk/apps/weblogger/web/roller-ui/authoring/editors/xinha-0.95/modules/GetHtml/lang/pt_br.js
roller/trunk/apps/weblogger/web/roller-ui/authoring/editors/xinha-0.95/modules/InsertImage/
roller/trunk/apps/weblogger/web/roller-ui/authoring/editors/xinha-0.95/modules/InsertImage/insert_image.html
roller/trunk/apps/weblogger/web/roller-ui/authoring/editors/xinha-0.95/modules/InsertImage/insert_image.js
roller/trunk/apps/weblogger/web/roller-ui/authoring/editors/xinha-0.95/modules/InsertTable/
roller/trunk/apps/weblogger/web/roller-ui/authoring/editors/xinha-0.95/modules/InsertTable/insert_table.html
roller/trunk/apps/weblogger/web/roller-ui/authoring/editors/xinha-0.95/modules/InsertTable/insert_table.js
roller/trunk/apps/weblogger/web/roller-ui/authoring/editors/xinha-0.95/modules/InternetExplorer/
roller/trunk/apps/weblogger/web/roller-ui/authoring/editors/xinha-0.95/modules/InternetExplorer/InternetExplorer.js
roller/trunk/apps/weblogger/web/roller-ui/authoring/editors/xinha-0.95/modules/Opera/
roller/trunk/apps/weblogger/web/roller-ui/authoring/editors/xinha-0.95/modules/Opera/Opera.js
roller/trunk/apps/weblogger/web/roller-ui/authoring/editors/xinha-0.95/modules/WebKit/
roller/trunk/apps/weblogger/web/roller-ui/authoring/editors/xinha-0.95/modules/WebKit/WebKit.js
roller/trunk/apps/weblogger/web/roller-ui/authoring/editors/xinha-0.95/popups/
roller/trunk/apps/weblogger/web/roller-ui/authoring/editors/xinha-0.95/popups/about.html
roller/trunk/apps/weblogger/web/roller-ui/authoring/editors/xinha-0.95/popups/blank.html
roller/trunk/apps/weblogger/web/roller-ui/authoring/editors/xinha-0.95/popups/editor_help.html
roller/trunk/apps/weblogger/web/roller-ui/authoring/editors/xinha-0.95/popups/popup.css
roller/trunk/apps/weblogger/web/roller-ui/authoring/editors/xinha-0.95/popups/popup.js
roller/trunk/apps/weblogger/web/roller-ui/authoring/editors/xinha-0.95/popups/select_color.html
roller/trunk/apps/weblogger/web/roller-ui/authoring/editors/xinha-0.95/release-notes.txt
roller/trunk/apps/weblogger/web/roller-ui/authoring/editors/xinha-0.95/skins/
roller/trunk/apps/weblogger/web/roller-ui/authoring/editors/xinha-0.95/skins/blue-look/
roller/trunk/apps/weblogger/web/roller-ui/authoring/editors/xinha-0.95/skins/blue-look/button-background.png (with props)
roller/trunk/apps/weblogger/web/roller-ui/authoring/editors/xinha-0.95/skins/blue-look/separator.gif (with props)
roller/trunk/apps/weblogger/web/roller-ui/authoring/editors/xinha-0.95/skins/blue-look/skin.css
roller/trunk/apps/weblogger/web/roller-ui/authoring/editors/xinha-0.95/skins/green-look/
roller/trunk/apps/weblogger/web/roller-ui/authoring/editors/xinha-0.95/skins/green-look/button-background.gif (with props)
roller/trunk/apps/weblogger/web/roller-ui/authoring/editors/xinha-0.95/skins/green-look/separator.gif (with props)
roller/trunk/apps/weblogger/web/roller-ui/authoring/editors/xinha-0.95/skins/green-look/skin.css
roller/trunk/apps/weblogger/web/roller-ui/authoring/editors/xinha-0.95/skins/silva/
roller/trunk/apps/weblogger/web/roller-ui/authoring/editors/xinha-0.95/skins/silva/dialog.jpg (with props)
roller/trunk/apps/weblogger/web/roller-ui/authoring/editors/xinha-0.95/skins/silva/html.gif (with props)
roller/trunk/apps/weblogger/web/roller-ui/authoring/editors/xinha-0.95/skins/silva/skin.css
roller/trunk/apps/weblogger/web/roller-ui/authoring/editors/xinha-0.95/skins/silva/statusbar.png (with props)
roller/trunk/apps/weblogger/web/roller-ui/authoring/editors/xinha-0.95/skins/silva/toolbar.png (with props)
Modified:
roller/trunk/apps/weblogger/web/roller-ui/authoring/editors/editor-xinha.jsp
Modified: roller/trunk/apps/weblogger/web/roller-ui/authoring/editors/editor-xinha.jsp
URL: http://svn.apache.org/viewvc/roller/trunk/apps/weblogger/web/roller-ui/authoring/editors/editor-xinha.jsp?rev=819248&r1=819247&r2=819248&view=diff
==============================================================================
--- roller/trunk/apps/weblogger/web/roller-ui/authoring/editors/editor-xinha.jsp (original)
+++ roller/trunk/apps/weblogger/web/roller-ui/authoring/editors/editor-xinha.jsp Sun Sep 27 03:11:38 2009
@@ -16,29 +16,156 @@
directory of this distribution.
--%>
<%@ include file="/WEB-INF/jsps/taglibs-struts2.jsp" %>
-<script type="text/javascript" src="<s:url value="/roller-ui/scripts/scriptaculous/prototype.js"/>" ></script>
+
+
+<%-- URLs used by this page --%>
+
+<s:url var="xinhaHome" value="/roller-ui/authoring/editors/xinha-0.95"></s:url>
+
+<s:url var="mediaFileImageChooser" action="mediaFileImageChooser" namespace="overlay">
+ <s:param name="weblog" value="%{actionWeblog.handle}" />
+</s:url>
+
+
+<script type="text/javascript">
+ // (preferably absolute) URL (including trailing slash) where Xinha is installed
+ _editor_url = '<s:property value="xinhaHome" />';
+ _editor_lang = "en"; // And the language we need to use in the editor.
+ _editor_skin = "blue-look"; // If you want use a skin, add the name (of the folder) here
+</script>
+<script type="text/javascript" src="<s:property value="xinhaHome" />/XinhaCore.js"></script>
+
+
+<%-- ********************************************************************* --%>
+<%-- Xinha config (see also: http://trac.xinha.org/wiki/NewbieGuide) --%>
+
+<script type="text/javascript">
+ xinha_editors = null;
+ xinha_init = null;
+ xinha_config = null;
+ xinha_plugins = null;
+
+ xinha_init = xinha_init ? xinha_init : function() {
+
+ xinha_editors = xinha_editors ? xinha_editors : [
+ 'xe_content', 'xe_summary'
+ ];
+
+ xinha_plugins = xinha_plugins ? xinha_plugins :[];
+ if(!Xinha.loadPlugins(xinha_plugins, xinha_init)) return;
+
+ xinha_config = xinha_config ? xinha_config() : new Xinha.Config();
+ xinha_config.pageStyleSheets = [ _editor_url + "examples/full_example.css" ];
+ xinha_config.toolbar =
+ [
+ ["popupeditor"],
+ ["separator","formatblock","fontname","fontsize","bold","italic","underline","strikethrough"],
+ ["separator","forecolor","hilitecolor","textindicator"],
+ ["separator","subscript","superscript"],
+ ["linebreak","separator","justifyleft","justifycenter","justifyright","justifyfull"],
+ ["separator","insertorderedlist","insertunorderedlist","outdent","indent"],
+ ["separator","inserthorizontalrule","createlink","insertimage","inserttable"],
+ ["linebreak","separator","undo","redo","selectall","print"], (Xinha.is_gecko ? [] : ["cut","copy","paste","overwrite","saveas"]),
+ ["separator","killword","clearfonts","removeformat","toggleborders","splitblock","lefttoright", "righttoleft"],
+ ["separator","htmlmode","showhelp","about"]
+ ];
+
+ // turn off Xinha's URL stripping default. Blog entries need absolute URLs,
+ // otherwise links will be broken in RSS/Atom feeds.
+ xinha_config.stripBaseHref = false;
+
+ xinha_editors = Xinha.makeEditors(xinha_editors, xinha_config, xinha_plugins);
+ xinha_editors.xe_content.config.height = '300px';
+ xinha_editors.xe_summary.config.height = '200px';
+
+ Xinha.startEditors(xinha_editors);
+ }
+
+ Xinha._addEvent(window,'load', xinha_init);
+</script>
+
+
+<%-- ********************************************************************* --%>
+<%-- Editor event handling, on close, on add image, etc. --%>
<script type="text/javascript">
-function editorCleanup() {
- document.getElementById('xe_content').value = xinha_editors.xe_content.getHTML().trim();
- document.getElementById('xe_summary').value = xinha_editors.xe_summary.getHTML().trim();
-}
-// (preferably absolute) URL (including trailing slash) where Xinha is installed
-_editor_url = '<s:url value="/roller-ui/authoring/editors/xinha/" />'
+ YAHOO.namespace("mediaFileEditor");
+
+ function init() {
-// And the language we need to use in the editor.
-_editor_lang = "en";
+ YAHOO.mediaFileEditor.lightbox = new YAHOO.widget.Panel(
+ "mediafile_edit_lightbox", {
+ modal: true,
+ width: "600px",
+ height: "600px",
+ visible: false,
+ fixedcenter: true,
+ constraintoviewport: true
+ }
+ );
+ YAHOO.mediaFileEditor.lightbox.render(document.body);
+ }
+ YAHOO.util.Event.addListener(window, "load", init);
+
+ function onClickAddImage(){
+ $("#mediaFileEditor").attr('src','<s:property value="%{mediaFileImageChooser}" />');
+ YAHOO.mediaFileEditor.lightbox.show();
+ }
+
+ function onClose() {
+ $("#mediaFileEditor").attr('src','about:blank');
+ YAHOO.mediaFileEditor.lightbox.hide();
+ }
+
+ function onSelectImage(name, url) {
+ $("#mediaFileEditor").attr('src','about:blank');
+ YAHOO.mediaFileEditor.lightbox.hide();
+
+ xinha_editors.xe_content.insertHTML(
+ '<a href="' + url + '"><img src="' + url + '?t=true" alt="' + name+ '"></img></a>');
+ }
</script>
-<script type="text/javascript" src='<s:url value="/roller-ui/authoring/editors/xinha/htmlarea.js" />'></script>
-<script type="text/javascript" src='<s:url value="/roller-ui/authoring/editors/xinha/my_config.js" />'></script>
-<noscript><p><b>Javascript must be enabled to use this form.</b></p></noscript>
-<%-- ===================================================================== --%>
+<script type="text/javascript">
+ function editorCleanup() {
+ document.getElementById('xe_content').value = xinha_editors.xe_content.getHTML().trim();
+ document.getElementById('xe_summary').value = xinha_editors.xe_summary.getHTML().trim();
+ }
+</script>
+
+
+<%-- ********************************************************************* --%>
+<%-- Text editors --%>
+
+<p class="toplabel">
+ <span style="float:left;"><s:text name="weblogEdit.content" /></span>
+ <span style="font-weight:normal;float:right;">
+ <a href="#" onClick="onClickAddImage();">Add Image</a>
+ </span>
+</p>
+
<b><s:text name="weblogEdit.content" /></b><br />
<s:textarea id="xe_content" name="bean.text" rows="25" cols="50" cssStyle="width: 100%" />
-<%-- ===================================================================== --%>
+
<b><s:text name="weblogEdit.summary" /></b><br />
<s:textarea id="xe_summary" name="bean.summary" rows="10" cols="50" cssStyle="width: 100%" />
-
+
+
+<%-- ********************************************************************* --%>
+<%-- Lightbox for popping up image chooser --%>
+
+<div id="mediafile_edit_lightbox" style="visibility:hidden">
+ <div class="hd"><s:text name="mediaFileChooser.popupTitle" /></div>
+ <div class="bd">
+ <iframe id="mediaFileEditor"
+ style="visibility:inherit"
+ height="100%"
+ width="100%"
+ frameborder="no"
+ scrolling="auto">
+ </iframe>
+ </div>
+ <div class="ft"></div>
+</div>
Added: roller/trunk/apps/weblogger/web/roller-ui/authoring/editors/xinha-0.95/Xinha.css
URL: http://svn.apache.org/viewvc/roller/trunk/apps/weblogger/web/roller-ui/authoring/editors/xinha-0.95/Xinha.css?rev=819248&view=auto
==============================================================================
--- roller/trunk/apps/weblogger/web/roller-ui/authoring/editors/xinha-0.95/Xinha.css (added)
+++ roller/trunk/apps/weblogger/web/roller-ui/authoring/editors/xinha-0.95/Xinha.css Sun Sep 27 03:11:38 2009
@@ -0,0 +1,273 @@
+.htmlarea { background: #fff; }
+.htmlarea td { margin:0;padding:0; }
+
+.htmlarea .toolbarRow {
+ width:1px;
+}
+
+.htmlarea .toolbar {
+ cursor: default;
+ background: ButtonFace;
+ padding: 3px;
+ border: 1px solid;
+ border-color: ButtonHighlight ButtonShadow ButtonShadow ButtonHighlight;
+}
+.htmlarea .toolbar table { margin: 0; font-family: tahoma,verdana,sans-serif; font-size: 11px; }
+.htmlarea .toolbar img { border: none; vertical-align: top; }
+.htmlarea .toolbar .label { padding: 0px 3px; }
+
+.htmlarea .toolbar .button {
+ background: ButtonFace;
+ color: ButtonText;
+ border: 1px solid ButtonFace;
+ padding: 1px;
+ margin: 0px;
+ width: 18px;
+ height: 18px;
+}
+.htmlarea .toolbar a.button:hover {
+ border: 1px solid;
+ border-color: ButtonHighlight ButtonShadow ButtonShadow ButtonHighlight;
+}
+.htmlarea .toolbar a.buttonDisabled:hover {
+ border-color: ButtonFace;
+}
+.htmlarea .toolbar .buttonActive,
+.htmlarea .toolbar .buttonPressed
+{
+ padding: 2px 0px 0px 2px;
+ border: 1px solid;
+ border-color: ButtonShadow ButtonHighlight ButtonHighlight ButtonShadow;
+}
+.htmlarea .toolbar .buttonPressed {
+ background: ButtonHighlight;
+}
+.htmlarea .toolbar .indicator {
+ padding: 0px 3px;
+ overflow: hidden;
+ width: 20px;
+ text-align: center;
+ cursor: default;
+ border: 1px solid ButtonShadow;
+}
+
+.htmlarea .toolbar .buttonDisabled img {
+ filter: gray() alpha(opacity = 25);
+ -moz-opacity: 0.25;
+ opacity: 0.25;
+}
+
+.htmlarea .toolbar .separator {
+ /*position: relative;*/
+ margin:0 3px;
+ border-left: 1px solid ButtonShadow;
+ border-right: 1px solid ButtonHighlight;
+ width: 0px;
+ height: 18px;
+ padding: 0px;
+}
+
+.htmlarea .toolbar .space { width: 5px; }
+
+.htmlarea .toolbar select, .htmlarea .toolbar option { font: 11px Tahoma,Verdana,sans-serif;}
+
+.htmlarea .toolbar select,
+.htmlarea .toolbar select:hover,
+.htmlarea .toolbar select:active {
+ position:relative;
+ top:-2px;
+ margin-bottom:-2px;
+ color: ButtonText;
+}
+
+.htmlarea iframe.xinha_iframe, .htmlarea textarea.xinha_textarea
+{
+ border: none; /*1px solid;*/
+}
+
+.htmlarea .statusBar {
+ border: 1px solid;
+ border-color: ButtonShadow ButtonHighlight ButtonHighlight ButtonShadow;
+ padding: 2px 4px;
+ background-color: ButtonFace;
+ color: ButtonText;
+ font: 11px Tahoma,Verdana,sans-serif;
+ height:16px;
+}
+
+.htmlarea .statusBar .statusBarTree a {
+ padding: 2px 5px;
+ color: #00f;
+}
+
+.htmlarea .statusBar .statusBarTree a:visited { color: #00f; }
+.htmlarea .statusBar .statusBarTree a:hover {
+ background-color: Highlight;
+ color: HighlightText;
+ padding: 1px 4px;
+ border: 1px solid HighlightText;
+}
+
+
+/* popup dialogs */
+
+.dialog {
+ color: ButtonText;
+ background: ButtonFace;
+}
+
+.dialog .content { padding: 2px; }
+
+.dialog, .dialog button, .dialog input, .dialog select, .dialog textarea, .dialog table {
+ font: 11px Tahoma,Verdana,sans-serif;
+}
+
+.dialog table { border-collapse: collapse; }
+
+.dialog .title, .dialog h1
+{
+ background: #008;
+ color: #ff8;
+ border-bottom: 1px solid #000;
+ padding: 1px 0px 2px 5px;
+ font-size: 12px;
+ font-weight: bold;
+ cursor: default;
+}
+.dialog h1 { margin:0px;}
+.dialog .title .button {
+ float: right;
+ border: 1px solid #66a;
+ padding: 0px 1px 0px 2px;
+ margin-right: 1px;
+ color: #fff;
+ text-align: center;
+}
+
+.dialog .title .button-hilite { border-color: #88f; background: #44c; }
+
+.dialog button {
+ width: 5em;
+ padding: 0px;
+}
+
+.dialog .buttonColor {
+ width :1em;
+ padding: 1px;
+ cursor: default;
+ border: 1px solid;
+ border-color: ButtonHighlight ButtonShadow ButtonShadow ButtonHighlight;
+}
+
+.dialog .buttonColor .chooser, .dialog .buttonColor .nocolor {
+ height: 0.6em;
+ border: 1px solid;
+ padding: 0px 1em;
+ border-color: ButtonShadow ButtonHighlight ButtonHighlight ButtonShadow;
+}
+
+.dialog .buttonClick {
+ border-color: ButtonShadow ButtonHighlight ButtonHighlight ButtonShadow;
+}
+.dialog .buttonColor-hilite {
+ border-color: ButtonShadow ButtonHighlight ButtonHighlight ButtonShadow;
+}
+
+.dialog .buttonColor .nocolor { padding: 0px; }
+.dialog .buttonColor .nocolor-hilite { background-color: #fff; color: #f00; }
+
+.dialog .label { text-align: right; width: 6em; }
+.dialog .value input { width: 100%; }
+.dialog .buttons { text-align: right; padding: 2px 4px 0px 4px; }
+
+.dialog legend { font-weight: bold; }
+.dialog fieldset table { margin: 2px 0px; }
+
+.popupwin {
+ padding: 0px;
+ margin: 0px;
+}
+
+.popupwin .title {
+ background: #fff;
+ color: #000;
+ font-weight: bold;
+ font-size: 120%;
+ padding: 3px 10px;
+ margin-bottom: 10px;
+ border-bottom: 1px solid black;
+ letter-spacing: 2px;
+}
+
+form { margin: 0px; border: none; }
+
+
+/** Panels **/
+.htmlarea .panels.top
+{
+ border-bottom : 1px solid;
+ border-color: ButtonShadow;
+}
+
+.htmlarea .panels.right
+{
+ border-left : 1px solid;
+ border-color: ButtonShadow;
+}
+
+.htmlarea .panels.left
+{
+ border-right : 1px solid;
+ border-color: ButtonShadow;
+}
+
+.htmlarea .panels.bottom
+{
+ border-top : 1px solid;
+ border-color: ButtonShadow;
+}
+
+.htmlarea .panel h1 {
+ background: ButtonFace;
+ border: 1px solid;
+ border-color: ButtonHighlight ButtonShadow ButtonShadow ButtonHighlight;
+ margin: 0px;
+ padding: 0px;
+ font-size:100%;
+ font-weight:bold;
+ padding: 2px;
+ clear:left;
+
+}
+
+.htmlarea .panel { overflow:hidden; }
+.htmlarea .panels.left .panel { border-right:none; border-left:none; }
+.htmlarea .panels.left h1 { border-right:none; }
+.htmlarea .panels.right .panel { border-right:none; border-left:none; }
+.htmlarea .panels.left h1 { border-left:none; }
+.htmlarea { border: 1px solid black; }
+
+.loading
+{
+ font-family:sans-serif;
+ position:absolute;
+ z-index:998;
+ text-align:center;
+ width:212px;
+ padding: 55px 0 5px 0;
+ border:2px solid #ccc;
+ /* border-color: ButtonHighlight ButtonShadow ButtonShadow ButtonHighlight;*/
+ background: url(images/xinha_logo.gif) no-repeat #fff center 5px;
+}
+.loading_main
+{
+ font-size:11px;
+ color:#000;
+
+}
+.loading_sub
+{
+ font-size:9px;
+ color:#666;
+ text-align:center;
+}