svn commit: r1026829 - in /lenya/branches/BRANCH_2_0_X/src/modules/tinymce: java/src/org/apache/lenya/cms/editors/tinymce/TinyMce.java sitemap.xmap
[email protected] Sun, 24 Oct 2010 16:07:58 -0000
| Newsgroups | gmane.comp.cms.lenya.cvs |
|---|---|
| Message-ID | <[email protected]> |
Author: rainer
Date: Sun Oct 24 16:07:58 2010
New Revision: 1026829
URL: http://svn.apache.org/viewvc?rev=1026829&view=rev
Log:
Better TinyMCE Integration:
- Generate error if uploads are disabled (similar to oneform, see
https://issues.apache.org/bugzilla/show_bug.cgi?id=44947
- sitemap improvements:
add forgotten xslt parameter when falling back to default language,
use only country part of locale to find JavaScript language file
i.e. look for de.js, not for de_DE.js
Modified:
lenya/branches/BRANCH_2_0_X/src/modules/tinymce/java/src/org/apache/lenya/cms/editors/tinymce/TinyMce.java
lenya/branches/BRANCH_2_0_X/src/modules/tinymce/sitemap.xmap
Modified: lenya/branches/BRANCH_2_0_X/src/modules/tinymce/java/src/org/apache/lenya/cms/editors/tinymce/TinyMce.java
URL: http://svn.apache.org/viewvc/lenya/branches/BRANCH_2_0_X/src/modules/tinymce/java/src/org/apache/lenya/cms/editors/tinymce/TinyMce.java?rev=1026829&r1=1026828&r2=1026829&view=diff
==============================================================================
--- lenya/branches/BRANCH_2_0_X/src/modules/tinymce/java/src/org/apache/lenya/cms/editors/tinymce/TinyMce.java (original)
+++ lenya/branches/BRANCH_2_0_X/src/modules/tinymce/java/src/org/apache/lenya/cms/editors/tinymce/TinyMce.java Sun Oct 24 16:07:58 2010
@@ -36,6 +36,7 @@ import org.apache.lenya.cms.usecase.Usec
import org.apache.lenya.cms.usecase.xml.UsecaseErrorHandler;
import org.apache.lenya.cms.workflow.WorkflowUtil;
import org.apache.lenya.cms.workflow.usecases.UsecaseWorkflowHelper;
+import org.apache.lenya.util.ServletHelper;
import org.apache.lenya.xml.DocumentHelper;
import org.apache.lenya.xml.Schema;
import org.apache.lenya.xml.ValidationUtil;
@@ -77,6 +78,10 @@ public class TinyMce extends DocumentUse
super.doCheckPreconditions();
UsecaseWorkflowHelper.checkWorkflow(this.manager, this, getEvent(), getSourceDocument(),
getLogger());
+ if (!ServletHelper.isUploadEnabled(this.manager)) {
+ addErrorMessage("upload-disabled");
+ }
+
}
/**
Modified: lenya/branches/BRANCH_2_0_X/src/modules/tinymce/sitemap.xmap
URL: http://svn.apache.org/viewvc/lenya/branches/BRANCH_2_0_X/src/modules/tinymce/sitemap.xmap?rev=1026829&r1=1026828&r2=1026829&view=diff
==============================================================================
--- lenya/branches/BRANCH_2_0_X/src/modules/tinymce/sitemap.xmap (original)
+++ lenya/branches/BRANCH_2_0_X/src/modules/tinymce/sitemap.xmap Sun Oct 24 16:07:58 2010
@@ -75,7 +75,7 @@
<!-- Check for language pack to render TinyMCE according to the
requested locale. If it does not exist, fall back to English. -->
<map:select type="resource-exists">
- <map:when test="fallback://lenya/modules/tinymce/resources/tinymce/jscripts/tiny_mce/langs/{request:locale}.js">
+ <map:when test="fallback://lenya/modules/tinymce/resources/tinymce/jscripts/tiny_mce/langs/{request:locale/language}.js">
<map:transform src="fallback://lenya/modules/tinymce/xslt/page2edit.xsl">
<!-- the proxy path is set manually, since the document has already been
though the proxy transformer in the publication sitemap, and we can't
@@ -95,6 +95,7 @@
<map:parameter name="usecaseName" value="{request-param:lenya.usecase}"/>
<map:parameter name="publicationId" value="{page-envelope:publication-id}"/>
<map:parameter name="locale" value="en"/>
+ <map:parameter name="content" value="{request-param:tinymce.content}"/>
</map:transform>
</map:otherwise>
</map:select>