You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lenya.apache.org by ra...@apache.org on 2010/11/24 18:57:05 UTC
svn commit: r1038730 - in /lenya/branches/BRANCH_2_0_X/src:
modules/tinymce/config/
modules/tinymce/java/src/org/apache/lenya/cms/editors/tinymce/
modules/tinymce/resources/i18n/ modules/tinymce/resources/javascript/
modules/tinymce/resources/tinymce/j...
Author: rainer
Date: Wed Nov 24 17:57:04 2010
New Revision: 1038730
URL: http://svn.apache.org/viewvc?rev=1038730&view=rev
Log:
TinyMCE Integration:
Add TinyMCE module to the default publication,
allow a larger editing window for small documents by adding the
autoresize plugin,
grey out TinyMCE menu entry when editor is not installed, by checking
for the existence of the tiny_mce.js file,
some cleanup in the cmsui* resources.
Modified:
lenya/branches/BRANCH_2_0_X/src/modules/tinymce/config/menu.xml
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/resources/i18n/cmsui.xml (contents, props changed)
lenya/branches/BRANCH_2_0_X/src/modules/tinymce/resources/i18n/cmsui_de.xml (contents, props changed)
lenya/branches/BRANCH_2_0_X/src/modules/tinymce/resources/i18n/cmsui_fr.xml
lenya/branches/BRANCH_2_0_X/src/modules/tinymce/resources/javascript/tiny_config.js
lenya/branches/BRANCH_2_0_X/src/modules/tinymce/resources/tinymce/jscripts/tiny_mce/plugins/unloadhandler/langs/fr.js
lenya/branches/BRANCH_2_0_X/src/pubs/default/config/publication.xml
Modified: lenya/branches/BRANCH_2_0_X/src/modules/tinymce/config/menu.xml
URL: http://svn.apache.org/viewvc/lenya/branches/BRANCH_2_0_X/src/modules/tinymce/config/menu.xml?rev=1038730&r1=1038729&r2=1038730&view=diff
==============================================================================
--- lenya/branches/BRANCH_2_0_X/src/modules/tinymce/config/menu.xml (original)
+++ lenya/branches/BRANCH_2_0_X/src/modules/tinymce/config/menu.xml Wed Nov 24 17:57:04 2010
@@ -22,10 +22,8 @@
xmlns="http://apache.org/cocoon/lenya/menubar/1.0">
<menus>
<menu i18n:attr="name" name="Edit">
- <!-- <block areas="authoring" resourceTypes="xhtml homepage"> -->
- <block areas="authoring" resourceTypes="xhtml">
- <item uc:usecase="tinymce.edit" href="?"><i18n:text>With TinyMCE</i18n:text></item>
- <!-- <item wf:event="edit" uc:usecase="tinymce.edit" href="?"><i18n:text>With TinyMCE</i18n:text></item> -->
+ <block areas="authoring" resourceTypes="xhtml homepage">
+ <item wf:event="edit" uc:usecase="tinymce.edit" href="?"><i18n:text>With TinyMCE</i18n:text></item>
</block>
</menu>
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=1038730&r1=1038729&r2=1038730&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 Wed Nov 24 17:57:04 2010
@@ -52,6 +52,8 @@ import org.xml.sax.SAXException;
public class TinyMce extends DocumentUsecase {
+ private final String tinymceCodeURI = "fallback://lenya/modules/tinymce/resources/tinymce/jscripts/tiny_mce/tiny_mce.js";
+
/**
* @see org.apache.lenya.cms.usecase.AbstractUsecase#getNodesToLock()
*/
@@ -76,6 +78,9 @@ public class TinyMce extends DocumentUse
*/
protected void doCheckPreconditions() throws Exception {
super.doCheckPreconditions();
+ if (!SourceUtil.exists(tinymceCodeURI, this.manager)) {
+ addErrorMessage("tinymce-not-installed");
+ }
UsecaseWorkflowHelper.checkWorkflow(this.manager, this, getEvent(), getSourceDocument(),
getLogger());
if (!ServletHelper.isUploadEnabled(this.manager)) {
Modified: lenya/branches/BRANCH_2_0_X/src/modules/tinymce/resources/i18n/cmsui.xml
URL: http://svn.apache.org/viewvc/lenya/branches/BRANCH_2_0_X/src/modules/tinymce/resources/i18n/cmsui.xml?rev=1038730&r1=1038729&r2=1038730&view=diff
==============================================================================
--- lenya/branches/BRANCH_2_0_X/src/modules/tinymce/resources/i18n/cmsui.xml (original)
+++ lenya/branches/BRANCH_2_0_X/src/modules/tinymce/resources/i18n/cmsui.xml Wed Nov 24 17:57:04 2010
@@ -1,23 +1,24 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- Licensed to the Apache Software Foundation (ASF) under one or more
- contributor license agreements. See the NOTICE file distributed with
- this work for additional information regarding copyright ownership.
- The ASF licenses this file to You under the Apache License, Version 2.0
- (the "License"); you may not use this file except in compliance with
- the License. You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
--->
-
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
+
<catalogue xml:lang="en" xmlns:xhtml="http://www.w3.org/1999/xhtml"
- xmlns="http://apache.org/cocoon/i18n/2.1">
+ xmlns="http://apache.org/cocoon/i18n/2.1">
<message key="tinymce.edit">Edit with TinyMCE</message>
- <message key="With TinyMCE">With TinyMCE</message>
-</catalogue>
+ <message key="With TinyMCE">With TinyMCE</message>
+ <message key="tinymce-not-installed">TinyMCE is not installed</message>
+</catalogue>
Propchange: lenya/branches/BRANCH_2_0_X/src/modules/tinymce/resources/i18n/cmsui.xml
------------------------------------------------------------------------------
svn:eol-style = native
Modified: lenya/branches/BRANCH_2_0_X/src/modules/tinymce/resources/i18n/cmsui_de.xml
URL: http://svn.apache.org/viewvc/lenya/branches/BRANCH_2_0_X/src/modules/tinymce/resources/i18n/cmsui_de.xml?rev=1038730&r1=1038729&r2=1038730&view=diff
==============================================================================
--- lenya/branches/BRANCH_2_0_X/src/modules/tinymce/resources/i18n/cmsui_de.xml (original)
+++ lenya/branches/BRANCH_2_0_X/src/modules/tinymce/resources/i18n/cmsui_de.xml Wed Nov 24 17:57:04 2010
@@ -1,23 +1,24 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- Licensed to the Apache Software Foundation (ASF) under one or more
- contributor license agreements. See the NOTICE file distributed with
- this work for additional information regarding copyright ownership.
- The ASF licenses this file to You under the Apache License, Version 2.0
- (the "License"); you may not use this file except in compliance with
- the License. You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
--->
-
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
+
<catalogue xml:lang="de" xmlns:xhtml="http://www.w3.org/1999/xhtml"
- xmlns="http://apache.org/cocoon/i18n/2.1">
- <message key="tinymce.edit">Mit TinyMCE bearbeiten</message>
+ xmlns="http://apache.org/cocoon/i18n/2.1">
+ <message key="tinymce.edit">Mit TinyMCE bearbeiten</message>
<message key="With TinyMCE">Mit TinyMCE</message>
-</catalogue>
+ <message key="tinymce-not-installed">TinyMCE ist nicht installiert</message>
+</catalogue>
Propchange: lenya/branches/BRANCH_2_0_X/src/modules/tinymce/resources/i18n/cmsui_de.xml
------------------------------------------------------------------------------
svn:eol-style = native
Modified: lenya/branches/BRANCH_2_0_X/src/modules/tinymce/resources/i18n/cmsui_fr.xml
URL: http://svn.apache.org/viewvc/lenya/branches/BRANCH_2_0_X/src/modules/tinymce/resources/i18n/cmsui_fr.xml?rev=1038730&r1=1038729&r2=1038730&view=diff
==============================================================================
--- lenya/branches/BRANCH_2_0_X/src/modules/tinymce/resources/i18n/cmsui_fr.xml (original)
+++ lenya/branches/BRANCH_2_0_X/src/modules/tinymce/resources/i18n/cmsui_fr.xml Wed Nov 24 17:57:04 2010
@@ -16,8 +16,9 @@
limitations under the License.
-->
-<catalogue xml:lang="de" xmlns:xhtml="http://www.w3.org/1999/xhtml"
+<catalogue xml:lang="fr" xmlns:xhtml="http://www.w3.org/1999/xhtml"
xmlns="http://apache.org/cocoon/i18n/2.1">
<message key="tinymce.edit">Rédacteur TinyMCE</message>
<message key="With TinyMCE">Avec TinyMCE</message>
+ <message key="tinymce-not-installed">TinyMCE n'est pas installé</message>
</catalogue>
Modified: lenya/branches/BRANCH_2_0_X/src/modules/tinymce/resources/javascript/tiny_config.js
URL: http://svn.apache.org/viewvc/lenya/branches/BRANCH_2_0_X/src/modules/tinymce/resources/javascript/tiny_config.js?rev=1038730&r1=1038729&r2=1038730&view=diff
==============================================================================
--- lenya/branches/BRANCH_2_0_X/src/modules/tinymce/resources/javascript/tiny_config.js (original)
+++ lenya/branches/BRANCH_2_0_X/src/modules/tinymce/resources/javascript/tiny_config.js Wed Nov 24 17:57:04 2010
@@ -52,8 +52,8 @@ config = {
/* enable plugins for custom save function, fullscreen editing
and search-and-replace. */
- //plugins : "save,fullscreen,searchreplace,table,contextmenu,simplebrowser,xhtmlxtras",
- plugins : "searchreplace,table,contextmenu,simplebrowser,unloadhandler",
+ //plugins : "save,fullscreen,searchreplace,table,contextmenu,autoresize,simplebrowser,xhtmlxtras",
+ plugins : "searchreplace,table,contextmenu,autoresize,simplebrowser,unloadhandler",
/* grey out the "save" button unless there are unsaved changes: */
//save_enablewhendirty : false,
Modified: lenya/branches/BRANCH_2_0_X/src/modules/tinymce/resources/tinymce/jscripts/tiny_mce/plugins/unloadhandler/langs/fr.js
URL: http://svn.apache.org/viewvc/lenya/branches/BRANCH_2_0_X/src/modules/tinymce/resources/tinymce/jscripts/tiny_mce/plugins/unloadhandler/langs/fr.js?rev=1038730&r1=1038729&r2=1038730&view=diff
==============================================================================
--- lenya/branches/BRANCH_2_0_X/src/modules/tinymce/resources/tinymce/jscripts/tiny_mce/plugins/unloadhandler/langs/fr.js (original)
+++ lenya/branches/BRANCH_2_0_X/src/modules/tinymce/resources/tinymce/jscripts/tiny_mce/plugins/unloadhandler/langs/fr.js Wed Nov 24 17:57:04 2010
@@ -18,6 +18,6 @@
// FR lang variables
tinyMCE.addI18n('fr.unloadhandler',{
- unload_msg : 'Attention: si vous sortez de l'éditeur en cliquant sur OK modifications seront perdues et le document sera laissée «checked out».'
+ unload_msg : 'Attention: si vous sortez de l'éditeur en cliquant sur OK modifications seront perdues et le document restera extrait.'
});
}
Modified: lenya/branches/BRANCH_2_0_X/src/pubs/default/config/publication.xml
URL: http://svn.apache.org/viewvc/lenya/branches/BRANCH_2_0_X/src/pubs/default/config/publication.xml?rev=1038730&r1=1038729&r2=1038730&view=diff
==============================================================================
--- lenya/branches/BRANCH_2_0_X/src/pubs/default/config/publication.xml (original)
+++ lenya/branches/BRANCH_2_0_X/src/pubs/default/config/publication.xml Wed Nov 24 17:57:04 2010
@@ -87,6 +87,7 @@
<module name="usecasedocument"/>
<module name="monitoring"/>
<module name="navigation"/>
+ <module name="tinymce"/>
</modules>
<!-- TODO: The goal is to have a blog module ;-) -->
<!--
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@lenya.apache.org
For additional commands, e-mail: commits-help@lenya.apache.org