You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lenya.apache.org by ch...@apache.org on 2006/12/05 14:25:11 UTC
svn commit: r482640 - in /lenya/trunk/src/modules/tinymce: ./ config/
resources/javascript/ resources/tinymce/ resources/tinymce/jscripts/
resources/tinymce/jscripts/tiny_mce/
resources/tinymce/jscripts/tiny_mce/plugins/
resources/tinymce/jscripts/tiny...
Author: chestnut
Date: Tue Dec 5 05:25:08 2006
New Revision: 482640
URL: http://svn.apache.org/viewvc?view=rev&rev=482640
Log:
Added internal linking functionality, should be standardized with other editors, but it is a start
Added:
lenya/trunk/src/modules/tinymce/resources/tinymce/
lenya/trunk/src/modules/tinymce/resources/tinymce/jscripts/
lenya/trunk/src/modules/tinymce/resources/tinymce/jscripts/tiny_mce/
lenya/trunk/src/modules/tinymce/resources/tinymce/jscripts/tiny_mce/plugins/
lenya/trunk/src/modules/tinymce/resources/tinymce/jscripts/tiny_mce/plugins/simplebrowser/
lenya/trunk/src/modules/tinymce/resources/tinymce/jscripts/tiny_mce/plugins/simplebrowser/editor_plugin.js (with props)
lenya/trunk/src/modules/tinymce/resources/tinymce/jscripts/tiny_mce/plugins/simplebrowser/editor_plugin_src.js (with props)
lenya/trunk/src/modules/tinymce/resources/tinymce/jscripts/tiny_mce/plugins/simplebrowser/langs/
lenya/trunk/src/modules/tinymce/resources/tinymce/jscripts/tiny_mce/plugins/simplebrowser/langs/en.js (with props)
lenya/trunk/src/modules/tinymce/xslt/link.xsl (with props)
Modified:
lenya/trunk/src/modules/tinymce/config/menu.xsp
lenya/trunk/src/modules/tinymce/resources/javascript/insertLink.js
lenya/trunk/src/modules/tinymce/resources/javascript/tiny_config.js
lenya/trunk/src/modules/tinymce/sitemap.xmap
Modified: lenya/trunk/src/modules/tinymce/config/menu.xsp
URL: http://svn.apache.org/viewvc/lenya/trunk/src/modules/tinymce/config/menu.xsp?view=diff&rev=482640&r1=482639&r2=482640
==============================================================================
--- lenya/trunk/src/modules/tinymce/config/menu.xsp (original)
+++ lenya/trunk/src/modules/tinymce/config/menu.xsp Tue Dec 5 05:25:08 2006
@@ -32,9 +32,9 @@
<menu i18n:attr="name" name="Edit">
<xsp:logic>
String doctype = <input:get-attribute module="page-envelope" as="string" name="document-type"/>;
- if ("xhtml".equals(doctype)) {
+ if ("xhtml".equals(doctype) || "homepage".equals(doctype)) {
<block info="false">
- <item wf:event="edit" uc:usecase="tinymce.edit" href="?"><i18n:text>With TinyMCE (experimental)</i18n:text></item>
+ <item wf:event="edit" uc:usecase="tinymce.edit" href="?"><i18n:text>With TinyMCE</i18n:text></item>
</block>
}
</xsp:logic>
Modified: lenya/trunk/src/modules/tinymce/resources/javascript/insertLink.js
URL: http://svn.apache.org/viewvc/lenya/trunk/src/modules/tinymce/resources/javascript/insertLink.js?view=diff&rev=482640&r1=482639&r2=482640
==============================================================================
--- lenya/trunk/src/modules/tinymce/resources/javascript/insertLink.js (original)
+++ lenya/trunk/src/modules/tinymce/resources/javascript/insertLink.js Tue Dec 5 05:25:08 2006
@@ -1,18 +1,53 @@
/*
- 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.
+* 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.
*/
-// not yet implemented
+function insertLink() {
+ var title = document.forms["link"].title.value;
+ var prefix = '/' + PUBLICATION_ID + '/' + AREA;
+ var url = document.forms["link"].url.value;
+ if (url.charAt(0) == "/") {
+ // prepend hostname etc for internal links
+ url = prefix + url;
+ }
+ window.top.opener.TinyMCE_SimpleBrowserPlugin.browserCallback(escape(url)) ;
+ window.top.close() ;
+}
+
+function setLink(src) {
+ url = src;
+ document.forms["link"].url.value = url;
+}
+
+function LinkTree(doc, treeElement) {
+ this.doc = doc;
+ this.treeElement = treeElement;
+ this.selected = null;
+}
+
+LinkTree.prototype = new NavTree;
+
+LinkTree.prototype.handleItemClick = function(item, event) {
+ setLink(item.href);
+}
+
+function buildTree() {
+ var placeholder = document.getElementById('tree');
+ var tree = new LinkTree(document, placeholder);
+ tree.init(PUBLICATION_ID);
+ tree.render();
+ tree.loadInitialTree(AREA, DOCUMENT_ID);
+}
Modified: lenya/trunk/src/modules/tinymce/resources/javascript/tiny_config.js
URL: http://svn.apache.org/viewvc/lenya/trunk/src/modules/tinymce/resources/javascript/tiny_config.js?view=diff&rev=482640&r1=482639&r2=482640
==============================================================================
--- lenya/trunk/src/modules/tinymce/resources/javascript/tiny_config.js (original)
+++ lenya/trunk/src/modules/tinymce/resources/javascript/tiny_config.js Tue Dec 5 05:25:08 2006
@@ -4,6 +4,8 @@
http://tinymce.moxiecode.com/tinymce/docs/reference_configuration.html
*/
+ currentURL = location.href.replace(/\?.*$/,"");
+ //alert(currentURL);
config = {
/* enable customizable theme */
@@ -18,10 +20,18 @@
/* enable plugins for custom save function, fullscreen editing
and search-and-replace. */
- plugins : "save,fullscreen,searchreplace,table,contextmenu",
+ plugins : "save,fullscreen,searchreplace,table,contextmenu,simplebrowser",
+
+ plugin_simplebrowser_width : '800', //default
+ plugin_simplebrowser_height : '600', //default
+
+ plugin_simplebrowser_browselinkurl : currentURL + '?lenya.module=tinymce&lenya.step=link-show&language=en',
+ plugin_simplebrowser_browseimageurl : '',
+ plugin_simplebrowser_browseflashurl : '',
+
/* grey out the "save" button unless there are unsaved changes: */
- save_enablewhendirty : true,
+ save_enablewhendirty : false,
/* some special settings for fullscreen mode (they override the
settings further down) */
Added: lenya/trunk/src/modules/tinymce/resources/tinymce/jscripts/tiny_mce/plugins/simplebrowser/editor_plugin.js
URL: http://svn.apache.org/viewvc/lenya/trunk/src/modules/tinymce/resources/tinymce/jscripts/tiny_mce/plugins/simplebrowser/editor_plugin.js?view=auto&rev=482640
==============================================================================
--- lenya/trunk/src/modules/tinymce/resources/tinymce/jscripts/tiny_mce/plugins/simplebrowser/editor_plugin.js (added)
+++ lenya/trunk/src/modules/tinymce/resources/tinymce/jscripts/tiny_mce/plugins/simplebrowser/editor_plugin.js Tue Dec 5 05:25:08 2006
@@ -0,0 +1,14 @@
+tinyMCE.importPluginLanguagePack('simplebrowser','en');
+
+var TinyMCE_SimpleBrowserPlugin={options:{},getInfo:function(){
+return{longname:'Simple Browser plugin',
+ author:'',
+ authorurl:'',
+ infourl:'',
+ version:""};
+},initInstance:function(inst){
+ tinyMCE.settings['file_browser_callback']="TinyMCE_SimpleBrowserPlugin_browse";
+ TinyMCE_SimpleBrowserPlugin.options={width:tinyMCE.getParam("plugin_simplebrowser_width",'800'),height:tinyMCE.getParam("plugin_simplebrowser_height",'600'),browseimageurl:tinyMCE.getParam("plugin_simplebrowser_browseimageurl",false),browselinkurl:tinyMCE.getParam("plugin_simplebrowser_browselinkurl",false),browseflashurl:tinyMCE.getParam("plugin_simplebrowser_browseflashurl",false)}},browse:function(field_name,current_url,type,win){switch(type.toLowerCase()){case'image':if(TinyMCE_SimpleBrowserPlugin.options['browseimageurl']){TinyMCE_SimpleBrowserPlugin.openServerBrowser(field_name,current_url,type,win,TinyMCE_SimpleBrowserPlugin.options['browseimageurl']);}else{alert("Image browser URL not set.");}break;case'flash':if(TinyMCE_SimpleBrowserPlugin.options['browseflashurl']){TinyMCE_SimpleBrowserPlugin.openServerBrowser(field_name,current_url,type,win,TinyMCE_SimpleBrowserPlugin.options['browseflashurl']);
+ }else{
+ alert("Flash browser URL not set.");}break;default:if(TinyMCE_SimpleBrowserPlugin.options['browselinkurl']){TinyMCE_SimpleBrowserPlugin.openServerBrowser(field_name,current_url,type,win,TinyMCE_SimpleBrowserPlugin.options['browselinkurl']);}else{alert("Link browser URL not set.");}}},openServerBrowser:function(field_name,current_url,link_type,win,browse_url){TinyMCE_SimpleBrowserPlugin.options['field']=field_name;TinyMCE_SimpleBrowserPlugin.options['curl']=current_url;TinyMCE_SimpleBrowserPlugin.options['type']=link_type;TinyMCE_SimpleBrowserPlugin.options['target']=win;var sOptions="toolbar=no,status=no,resizable=yes,dependent=yes";sOptions+=",width="+TinyMCE_SimpleBrowserPlugin.options['width'];sOptions+=",height="+TinyMCE_SimpleBrowserPlugin.options['height'];if(tinyMCE.isMSIE){var oWindow=window.open(browse_url,"TinyMCESimpleBrowserWindow",sOptions);oWindow.opener=window;}else{window.open(browse_url,"TinyMCESimpleBrowserWindow",sOptions);}},browserCallback:function(r
eturnValue){if(!returnValue)return;TinyMCE_SimpleBrowserPlugin.options['target'].document.forms[0].elements[TinyMCE_SimpleBrowserPlugin.options['field']].value=returnValue;}};function TinyMCE_SimpleBrowserPlugin_browse(field_name,current_url,type,win){TinyMCE_SimpleBrowserPlugin.browse(field_name,current_url,type,win)};tinyMCE.addPlugin("simplebrowser",TinyMCE_SimpleBrowserPlugin);
+
\ No newline at end of file
Propchange: lenya/trunk/src/modules/tinymce/resources/tinymce/jscripts/tiny_mce/plugins/simplebrowser/editor_plugin.js
------------------------------------------------------------------------------
svn:eol-style = native
Added: lenya/trunk/src/modules/tinymce/resources/tinymce/jscripts/tiny_mce/plugins/simplebrowser/editor_plugin_src.js
URL: http://svn.apache.org/viewvc/lenya/trunk/src/modules/tinymce/resources/tinymce/jscripts/tiny_mce/plugins/simplebrowser/editor_plugin_src.js?view=auto&rev=482640
==============================================================================
--- lenya/trunk/src/modules/tinymce/resources/tinymce/jscripts/tiny_mce/plugins/simplebrowser/editor_plugin_src.js (added)
+++ lenya/trunk/src/modules/tinymce/resources/tinymce/jscripts/tiny_mce/plugins/simplebrowser/editor_plugin_src.js Tue Dec 5 05:25:08 2006
@@ -0,0 +1,92 @@
+/*
+ * Andrew Tetlaw - 2006/02 - for TinyMCE 2.0.3 and above
+ * A port of the FCKEditor file browser as a TinyMCE plugin.
+ * http://tetlaw.id.au/view/blog/fckeditor-file-browser-plugin-for-tinymce-editor/
+ */
+
+tinyMCE.importPluginLanguagePack('simplebrowser', 'en');
+
+var TinyMCE_SimpleBrowserPlugin = {
+ options : {},
+ getInfo : function() {
+ return {
+ longname : 'Simple Browser plugin',
+ author : 'Andrew Tetlaw',
+ authorurl : 'http://tetlaw.id.au',
+ infourl : 'http://tetlaw.id.au/view/blog/fckeditor-file-browser-plugin-for-tinymce-editor/',
+ version : "2.1"
+ };
+ },
+
+ initInstance : function(inst) {
+ // You can take out plugin specific parameters
+ //alert("Initialization parameter:" + tinyMCE.getParam("template_someparam", false));
+ tinyMCE.settings['file_browser_callback'] = "TinyMCE_SimpleBrowserPlugin_browse";
+ TinyMCE_SimpleBrowserPlugin.options = {
+ width : tinyMCE.getParam("plugin_simplebrowser_width", '800'),
+ height : tinyMCE.getParam("plugin_simplebrowser_height", '600'),
+ browseimageurl : tinyMCE.getParam("plugin_simplebrowser_browseimageurl", false),
+ browselinkurl : tinyMCE.getParam("plugin_simplebrowser_browselinkurl", false),
+ browseflashurl : tinyMCE.getParam("plugin_simplebrowser_browseflashurl", false)
+ }
+ },
+
+ browse : function(field_name, current_url, type, win) {
+ switch(type.toLowerCase()) {
+ case 'image':
+ if(TinyMCE_SimpleBrowserPlugin.options['browseimageurl']) {
+ TinyMCE_SimpleBrowserPlugin.openServerBrowser(field_name, current_url, type, win, TinyMCE_SimpleBrowserPlugin.options['browseimageurl']);
+ } else {
+ alert("Image browser URL not set.");
+ }
+ break;
+ case 'flash':
+ if(TinyMCE_SimpleBrowserPlugin.options['browseflashurl']) {
+ TinyMCE_SimpleBrowserPlugin.openServerBrowser(field_name, current_url, type, win, TinyMCE_SimpleBrowserPlugin.options['browseflashurl']);
+ } else {
+ alert("Flash browser URL not set.");
+ }
+ break;
+ default:
+ if(TinyMCE_SimpleBrowserPlugin.options['browselinkurl']) {
+ TinyMCE_SimpleBrowserPlugin.openServerBrowser(field_name, current_url, type, win, TinyMCE_SimpleBrowserPlugin.options['browselinkurl']);
+ } else {
+ alert("Link browser URL not set.");
+ }
+ }
+ },
+
+ openServerBrowser : function(field_name, current_url, link_type, win, browse_url)
+ {
+ TinyMCE_SimpleBrowserPlugin.options['field'] = field_name;
+ TinyMCE_SimpleBrowserPlugin.options['curl'] = current_url;
+ TinyMCE_SimpleBrowserPlugin.options['type'] = link_type;
+ TinyMCE_SimpleBrowserPlugin.options['target'] = win;
+
+ var sOptions = "toolbar=no,status=no,resizable=yes,dependent=yes";
+ sOptions += ",width=" + TinyMCE_SimpleBrowserPlugin.options['width'];
+ sOptions += ",height=" + TinyMCE_SimpleBrowserPlugin.options['height'];
+
+ if (tinyMCE.isMSIE) {
+ // The following change has been made otherwise IE will open the file
+ // browser on a different server session (on some cases):
+ // http://support.microsoft.com/default.aspx?scid=kb;en-us;831678
+ // by Simone Chiaretta.
+ var oWindow = window.open(browse_url, "TinyMCESimpleBrowserWindow", sOptions ) ;
+ oWindow.opener = window;
+ } else {
+ window.open(browse_url, "TinyMCESimpleBrowserWindow", sOptions );
+ }
+ },
+
+ browserCallback : function(returnValue) {
+ if(!returnValue) return;
+ TinyMCE_SimpleBrowserPlugin.options['target'].document.forms[0].elements[TinyMCE_SimpleBrowserPlugin.options['field']].value = returnValue;
+ }
+};
+
+function TinyMCE_SimpleBrowserPlugin_browse(field_name, current_url, type, win) {
+ TinyMCE_SimpleBrowserPlugin.browse(field_name, current_url, type, win)
+};
+
+tinyMCE.addPlugin("simplebrowser", TinyMCE_SimpleBrowserPlugin);
\ No newline at end of file
Propchange: lenya/trunk/src/modules/tinymce/resources/tinymce/jscripts/tiny_mce/plugins/simplebrowser/editor_plugin_src.js
------------------------------------------------------------------------------
svn:eol-style = native
Added: lenya/trunk/src/modules/tinymce/resources/tinymce/jscripts/tiny_mce/plugins/simplebrowser/langs/en.js
URL: http://svn.apache.org/viewvc/lenya/trunk/src/modules/tinymce/resources/tinymce/jscripts/tiny_mce/plugins/simplebrowser/langs/en.js?view=auto&rev=482640
==============================================================================
--- lenya/trunk/src/modules/tinymce/resources/tinymce/jscripts/tiny_mce/plugins/simplebrowser/langs/en.js (added)
+++ lenya/trunk/src/modules/tinymce/resources/tinymce/jscripts/tiny_mce/plugins/simplebrowser/langs/en.js Tue Dec 5 05:25:08 2006
@@ -0,0 +1 @@
+tinyMCE.addToLang('simplebrowser',{});
Propchange: lenya/trunk/src/modules/tinymce/resources/tinymce/jscripts/tiny_mce/plugins/simplebrowser/langs/en.js
------------------------------------------------------------------------------
svn:eol-style = native
Modified: lenya/trunk/src/modules/tinymce/sitemap.xmap
URL: http://svn.apache.org/viewvc/lenya/trunk/src/modules/tinymce/sitemap.xmap?view=diff&rev=482640&r1=482639&r2=482640
==============================================================================
--- lenya/trunk/src/modules/tinymce/sitemap.xmap (original)
+++ lenya/trunk/src/modules/tinymce/sitemap.xmap Tue Dec 5 05:25:08 2006
@@ -60,6 +60,25 @@
</map:pipeline>
<map:pipeline type="profile-noncaching">
+
+ <map:match pattern="link-show" type="step">
+ <map:generate src="context://lenya/content/util/empty.xml"/>
+ <map:transform src="fallback://lenya/modules/tinymce/xslt/link.xsl" label="content">
+ <map:parameter name="infoarea" value="true"/>
+ <map:parameter name="contextprefix" value="{request:contextPath}"/>
+ <map:parameter name="publicationid" value="{page-envelope:publication-id}"/>
+ <map:parameter name="area" value="authoring"/>
+ <map:parameter name="tab" value="en"/>
+ <map:parameter name="chosenlanguage" value="{page-envelope:document-language}"/>
+ <map:parameter name="documentid" value="{page-envelope:document-id}"/>
+ <map:parameter name="documenturl" value="/{page-envelope:document-url}"/>
+ <map:parameter name="documentextension" value="{page-envelope:document-extension}"/>
+ <map:parameter name="defaultlanguage" value="{page-envelope:default-language}"/>
+ <map:parameter name="languages" value="{page-envelope:publication-languages-csv}"/>
+ </map:transform>
+ <map:call resource="style-cms-page"/>
+ <map:serialize />
+ </map:match>
<!-- this is the view of the usecase (see config/cocoon-xconf/usecases.xconf) -->
Added: lenya/trunk/src/modules/tinymce/xslt/link.xsl
URL: http://svn.apache.org/viewvc/lenya/trunk/src/modules/tinymce/xslt/link.xsl?view=auto&rev=482640
==============================================================================
--- lenya/trunk/src/modules/tinymce/xslt/link.xsl (added)
+++ lenya/trunk/src/modules/tinymce/xslt/link.xsl Tue Dec 5 05:25:08 2006
@@ -0,0 +1,178 @@
+<?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.
+-->
+
+<xsl:stylesheet version="1.0"
+ xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+ xmlns="http://www.w3.org/1999/xhtml"
+ xmlns:xhtml="http://www.w3.org/1999/xhtml"
+ xmlns:page="http://apache.org/cocoon/lenya/cms-page/1.0"
+ xmlns:i18n="http://apache.org/cocoon/i18n/2.1"
+ xmlns:usecase="http://apache.org/cocoon/lenya/usecase/1.0"
+ >
+
+<xsl:param name="contextprefix"/>
+<xsl:param name="publicationid"/>
+<xsl:param name="area"/>
+<xsl:param name="tab"/>
+<xsl:param name="documentid"/>
+<xsl:param name="documentextension"/>
+<xsl:param name="documenturl"/>
+<xsl:param name="languages"/>
+<xsl:param name="chosenlanguage"/>
+<xsl:param name="defaultlanguage"/>
+
+<xsl:variable name="extension"><xsl:if test="$documentextension != ''">.</xsl:if><xsl:value-of select="$documentextension"/></xsl:variable>
+
+<xsl:template match="/">
+ <page:page>
+ <page:title>Insert Link</page:title>
+ <page:body>
+ <script type="text/javascript" src="{$contextprefix}/modules/sitetree/javascript/tree.js"> </script>
+ <script type="text/javascript" src="{$contextprefix}/modules/sitetree/javascript/lenyatree.js"> </script>
+ <script type="text/javascript" src="{$contextprefix}/modules/sitetree/javascript/navtree.js"> </script>
+ <script type="text/javascript" src="{$contextprefix}/modules/tinymce/javascript/insertLink.js"> </script>
+ <script type="text/javascript" >
+ AREA = "<xsl:value-of select="$area"/>";
+ DOCUMENT_ID = "<xsl:value-of select="$documentid"/>";
+ CONTEXT_PREFIX = "<xsl:value-of select="$contextprefix"/>";
+ PUBLICATION_ID = "<xsl:value-of select="$publicationid"/>";
+ CHOSEN_LANGUAGE = "<xsl:value-of select="$chosenlanguage"/>";
+ DEFAULT_LANGUAGE = "<xsl:value-of select="$defaultlanguage"/>";
+ IMAGE_PATH = "<xsl:value-of select="$contextprefix"/>/lenya/images/tree/";
+ CUT_DOCUMENT_ID = '';
+ ALL_AREAS = "authoring"
+ PIPELINE_PATH = '/authoring/sitetree-fragment.xml'
+ </script>
+ <table border="0" cellpadding="0" cellspacing="0" width="100%">
+<tr>
+<td valign="top" width="50%">
+ <div id="lenya-info-treecanvas">
+<!-- Build the tree. -->
+ <table border="0" cellpadding="0" cellspacing="0">
+ <tr>
+ <xsl:call-template name="languagetabs">
+ <xsl:with-param name="tablanguages">
+ <xsl:value-of select="$languages"/>
+ </xsl:with-param>
+ </xsl:call-template>
+ </tr>
+ </table>
+
+ <div id="lenya-info-tree">
+ <div id="tree">
+ <script type="text/javascript">
+ buildTree();
+ </script>
+ </div>
+ </div>
+</div>
+</td>
+<td>
+ <form action="" name="link" id="link" onsubmit="insertLink()">
+ <table class="lenya-table-noborder">
+ <tr>
+ <td colspan="2" class="lenya-form-caption">You can either click on a node in the tree for an internal link or enter a link in the URL field. </td>
+ </tr>
+ <tr>
+ <td colspan="2"> </td>
+ </tr>
+ <tr>
+ <td class="lenya-form-caption">URL:</td>
+ <td>
+ <input class="lenya-form-element"
+ type="text"
+ name="url"/>
+ </td>
+ </tr>
+ <tr>
+ <td class="lenya-form-caption">Title:</td>
+ <td>
+ <input class="lenya-form-element"
+ type="text"
+ name="title"/>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2"> </td>
+ </tr>
+ <tr>
+ <td/>
+ <td> <input type="submit"
+ value="Insert" name="input-insert"/>
+ </td>
+ </tr>
+ </table>
+ </form>
+</td>
+</tr></table>
+ </page:body>
+ </page:page>
+</xsl:template>
+
+
+<xsl:template name="selecttab">
+ <xsl:text>?lenya.usecase=</xsl:text>
+ <xsl:choose>
+ <xsl:when test="$tab"><xsl:value-of select="$tab"/></xsl:when>
+ <xsl:otherwise>bxe</xsl:otherwise>
+ </xsl:choose>
+ <xsl:text>&lenya.step=link-show</xsl:text>
+</xsl:template>
+
+
+<xsl:template name="languagetabs">
+ <xsl:param name="tablanguages"/>
+ <xsl:choose>
+ <xsl:when test="not(contains($tablanguages,','))">
+ <xsl:call-template name="languagetab">
+ <xsl:with-param name="tablanguage">
+ <xsl:value-of select="$tablanguages"/>
+ </xsl:with-param>
+ </xsl:call-template>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:variable name="head" select="substring-before($tablanguages,',')" />
+ <xsl:variable name="tail" select="substring-after($tablanguages,',')" />
+ <xsl:call-template name="languagetab">
+ <xsl:with-param name="tablanguage" select="$head"/>
+ </xsl:call-template>
+ <xsl:call-template name="languagetabs">
+ <xsl:with-param name="tablanguages" select="$tail"/>
+ </xsl:call-template>
+ </xsl:otherwise>
+ </xsl:choose>
+</xsl:template>
+
+
+<xsl:template name="languagetab">
+ <xsl:param name="tablanguage"/>
+ <td><a id="{$tablanguage}">
+ <xsl:call-template name="activate">
+ <xsl:with-param name="tablanguage" select="$tablanguage"/>
+ </xsl:call-template>
+ </a></td>
+</xsl:template>
+
+
+<xsl:template name="activate">
+ <xsl:param name="tablanguage"/>
+ <xsl:attribute name="href"><xsl:value-of select="$contextprefix"/>/<xsl:value-of select="$publicationid"/>/<xsl:value-of select="$area"/><xsl:value-of select="$documentid"/>_<xsl:value-of select="$tablanguage"/><xsl:value-of select="$extension"/>?lenya.module=bxe&lenya.step=link-show</xsl:attribute>
+ <xsl:attribute name="class">lenya-tablink<xsl:choose><xsl:when test="$chosenlanguage = $tablanguage">-active</xsl:when><xsl:otherwise/></xsl:choose></xsl:attribute><xsl:value-of select="$tablanguage"/>
+</xsl:template>
+
+</xsl:stylesheet>
\ No newline at end of file
Propchange: lenya/trunk/src/modules/tinymce/xslt/link.xsl
------------------------------------------------------------------------------
svn:eol-style = native
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@lenya.apache.org
For additional commands, e-mail: commits-help@lenya.apache.org