You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lenya.apache.org by Apache Wiki <wi...@apache.org> on 2005/11/15 22:46:30 UTC
[Lenya Wiki] Update of "HowToIntegrateFCKEditor" by StephenVarga
Dear Wiki user,
You have subscribed to a wiki page or wiki category on "Lenya Wiki" for change notification.
The following page has been changed by StephenVarga:
http://wiki.apache.org/lenya/HowToIntegrateFCKEditor
------------------------------------------------------------------------------
}}}
- d. After the open step add the save step:
+ d. After the open step add the edit step:
{{{
- <map:match type="step" pattern="save">
+ <map:match type="step" pattern="edit">
+
- <map:act type="request-parameter-exists">
+ <map:select type="request-parameter">
+
+ <!-- get the hid param from aggregate.xsl-->
+ <map:parameter name="parameter-name" value="hidParam"/>
+
+ <!-- do my conditional testing -->
+ <map:when test="cancelButton">
+ <!--this redirect shoots me back to authoring-->
+ <map:redirect-to uri="{page-envelope:context-prefix}/{page-envelope:publication-id}/authoring/{page-envelope:document-id}.html?lenya.usecase=checkin&lenya.step=checkin&backup=false"/>
+ </map:when>
+
+ <map:when test="saveIcon">
- <map:act type="frededitorsave">
+ <map:act type="frededitorsave">
- <map:parameter name="file" value="../../pubs/{page-envelope:publication-id}/work/frededitor/authoring/{page-envelope:document-id}.xml"/>
+ <map:parameter name="file" value="../../pubs/{page-envelope:publication-id}/work/frededitor/authoring/{page-envelope:document-id}.xml"/>
- <map:parameter name="schema" value="../../pubs/{page-envelope:publication-id}/config/doctypes/schemas/{page-envelope:document-type}.rng"/>
+ <map:parameter name="schema" value="../../pubs/{page-envelope:publication-id}/config/doctypes/schemas/{page-envelope:document-type}.rng"/>
- <map:generate src="../../pubs/{page-envelope:publication-id}/content/authoring/{page-envelope:document-path}"/>
+ <map:generate src="../../pubs/{page-envelope:publication-id}/content/authoring/{page-envelope:document-path}"/>
- <map:call resource="style-cms-page"/>
+ <map:call resource="style-cms-page"/>
- </map:act>
+ </map:act>
- <map:call function="editDocument">
+ <map:call function="editDocument">
- <map:parameter name="sourceUri" value="cocoon:/request2document"/>
+ <map:parameter name="sourceUri" value="cocoon:/request2document"/>
- <map:parameter name="useBuffer" value="false"/>
+ <map:parameter name="useBuffer" value="false"/>
- <map:parameter name="noStatus" value="false"/>
+ <map:parameter name="noStatus" value="false"/>
+
+ <!--this redirect shoots me back into Fred-->
- <map:parameter name="redirectUrl" value="{request:requestURI}"/>
+ <map:parameter name="redirectUrl" value="{request:requestURI}"/>
- </map:call>
+ </map:call>
+ </map:when>
+
+ <map:when test="saveButton">
+ <map:act type="frededitorsave">
+ <map:parameter name="file" value="../../pubs/{page-envelope:publication-id}/work/frededitor/authoring/{page-envelope:document-id}.xml"/>
+ <map:parameter name="schema" value="../../pubs/{page-envelope:publication-id}/config/doctypes/schemas/{page-envelope:document-type}.rng"/>
+ <map:generate src="../../pubs/{page-envelope:publication-id}/content/authoring/{page-envelope:document-path}"/>
+ <map:call resource="style-cms-page"/>
- </map:act>
+ </map:act>
+ <map:call function="editDocument">
+ <map:parameter name="sourceUri" value="cocoon:/request2document"/>
+ <map:parameter name="useBuffer" value="false"/>
+ <map:parameter name="noStatus" value="false"/>
+
+ <!--this redirect shoots me back into Fred-->
+ <map:parameter name="redirectUrl" value="{request:requestURI}"/>
+
+ </map:call>
+ </map:when>
+ </map:select>
- </map:match>
+ </map:match>
}}}
9. Add the following line to `lenya/pubs/pubname/config/menus/generic.xsp` after
@@ -257, +290 @@
<body onload="invoke();">
- <form id="myform" action="{$docname}_{$language}.html?lenya.usecase=fckeditor&lenya.step=save" method="POST">
+ <form name="daForm" id="myform" action="{$docname}_{$language}.html?lenya.usecase=fckeditor&lenya.step=edit" method="POST">
+
+ <input type="hidden" name="hidParam" value="saveIcon"/>
+
<textarea name="content" id="content">
<xsl:copy-of select="xhtml:html/xhtml:body/node()"/>
</textarea>
+ <input type="submit" value="Cancel / Exit" name="cancel" onclick="document.daForm.hidParam.value='cancelButton';"/>
+ <input type="submit" value="Save" name="saving" onclick="document.daForm.hidParam.value='saveButton';"/>
+
</form>
</body>
</html>
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lenya.apache.org
For additional commands, e-mail: dev-help@lenya.apache.org