You are viewing a plain text version of this content. The canonical link for it is here.
Posted to graffito-commits@incubator.apache.org by cl...@apache.org on 2005/02/22 22:53:32 UTC

svn commit: r154904 - in incubator/graffito/trunk/applications/browser/src: java/org/apache/portals/graffito/portlets/ java/org/apache/portals/graffito/portlets/util/ java/org/apache/portals/graffito/util/ webapp/WEB-INF/ webapp/WEB-INF/velocity/ webapp/WEB-INF/view/folder/ webapp/kupu/ webapp/kupu/kupudrawers/ webapp/kupu/kupuimages/ webapp/kupu/kupupopups/

Author: clombart
Date: Tue Feb 22 14:53:29 2005
New Revision: 154904

URL: http://svn.apache.org/viewcvs?view=rev&rev=154904
Log:
Continue to work on the Graffito Browser portlet : 
* Add the Kupu editor (XHTML editor)

Added:
    incubator/graffito/trunk/applications/browser/src/java/org/apache/portals/graffito/portlets/util/GraffitoTools.java
Removed:
    incubator/graffito/trunk/applications/browser/src/java/org/apache/portals/graffito/util/
    incubator/graffito/trunk/applications/browser/src/webapp/kupu/kupudrawers/
    incubator/graffito/trunk/applications/browser/src/webapp/kupu/kupuimages/
    incubator/graffito/trunk/applications/browser/src/webapp/kupu/kupupopups/
Modified:
    incubator/graffito/trunk/applications/browser/src/java/org/apache/portals/graffito/portlets/BrowserPortlet.java
    incubator/graffito/trunk/applications/browser/src/java/org/apache/portals/graffito/portlets/GenericTabVelocityPortlet.java
    incubator/graffito/trunk/applications/browser/src/webapp/WEB-INF/portlet.xml
    incubator/graffito/trunk/applications/browser/src/webapp/WEB-INF/velocity/graffito-macros.vm
    incubator/graffito/trunk/applications/browser/src/webapp/WEB-INF/view/folder/folder-browser.vm
    incubator/graffito/trunk/applications/browser/src/webapp/WEB-INF/web.xml
    incubator/graffito/trunk/applications/browser/src/webapp/kupu/kupu.vm
    incubator/graffito/trunk/applications/browser/src/webapp/kupu/kupuinit_form.js
    incubator/graffito/trunk/applications/browser/src/webapp/kupu/kupustart_form.js

Modified: incubator/graffito/trunk/applications/browser/src/java/org/apache/portals/graffito/portlets/BrowserPortlet.java
URL: http://svn.apache.org/viewcvs/incubator/graffito/trunk/applications/browser/src/java/org/apache/portals/graffito/portlets/BrowserPortlet.java?view=diff&r1=154903&r2=154904
==============================================================================
--- incubator/graffito/trunk/applications/browser/src/java/org/apache/portals/graffito/portlets/BrowserPortlet.java (original)
+++ incubator/graffito/trunk/applications/browser/src/java/org/apache/portals/graffito/portlets/BrowserPortlet.java Tue Feb 22 14:53:29 2005
@@ -418,7 +418,7 @@
             Document document = (Document) browserInfo.getCurrentCmsObject();
 
             //Other attributes has been initialised in the method createDocumentStep2
-            String content = request.getParameter("content");
+            String content = request.getParameter("content");            
             try
             {
                 document.getContent().setContent(content.getBytes(request.getCharacterEncoding()));
@@ -602,11 +602,6 @@
             {
                 request.setAttribute(PARAM_VIEW_PAGE, "/WEB-INF/view/document/document-text-html-view.vm");
 
-            }
-            else
-            {
-                request.setAttribute("uri", cmsObject.getUri());                
-                request.setAttribute(PARAM_VIEW_PAGE, "/viewer");
             }
 
         }

Modified: incubator/graffito/trunk/applications/browser/src/java/org/apache/portals/graffito/portlets/GenericTabVelocityPortlet.java
URL: http://svn.apache.org/viewcvs/incubator/graffito/trunk/applications/browser/src/java/org/apache/portals/graffito/portlets/GenericTabVelocityPortlet.java?view=diff&r1=154903&r2=154904
==============================================================================
--- incubator/graffito/trunk/applications/browser/src/java/org/apache/portals/graffito/portlets/GenericTabVelocityPortlet.java (original)
+++ incubator/graffito/trunk/applications/browser/src/java/org/apache/portals/graffito/portlets/GenericTabVelocityPortlet.java Tue Feb 22 14:53:29 2005
@@ -30,7 +30,7 @@
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
 import org.apache.portals.bridges.velocity.GenericVelocityPortlet;
-import org.apache.portals.graffito.util.GraffitoTools;
+import org.apache.portals.graffito.portlets.util.GraffitoTools;
 import org.apache.velocity.context.Context;
 
 /**
@@ -43,7 +43,12 @@
 {
 
     private static final String TAB_CONFIG = "TabConfig";        
+    private static final String VIEWER_SERVLET = "ViewerServlet";
+    private static final String PUT_SERVLET = "PutServlet";
+    
     protected HashMap tabs = new HashMap();
+    protected String viewerServlet;
+    protected String putServlet;
     
     protected Log log = LogFactory.getLog(GenericTabVelocityPortlet.class);
 
@@ -70,6 +75,19 @@
         {
             throw new PortletException("Impossible to read the tab xml file : " + xmlFile );            
         }
+        
+        viewerServlet = config.getInitParameter(VIEWER_SERVLET);
+        if (null == viewerServlet)
+        {
+            throw new PortletException("Portlet init parameter ViewerServlet not found");
+        }
+         
+        putServlet = config.getInitParameter(PUT_SERVLET);
+        if (null == putServlet)
+        {
+            throw new PortletException("Portlet init parameter PutServlet not found");
+        }
+        
                 
     }
 
@@ -81,7 +99,8 @@
         
         Context velocityContext = this.getContext(request);
         velocityContext.put("tabs", tabs);   
-        velocityContext.put("graffitoTools", new GraffitoTools());
+        velocityContext.put("graffitoTools", new GraffitoTools(request.getContextPath() + "/" + viewerServlet, 
+                                                               request.getContextPath() + "/" + putServlet));
         
         super.doView(request, response);
     }
@@ -93,7 +112,8 @@
     {
         Context velocityContext = this.getContext(request);
         velocityContext.put("tabs", tabs); 
-        velocityContext.put("graffitoTools", new GraffitoTools());
+        velocityContext.put("graffitoTools", new GraffitoTools(request.getContextPath() + "/" + viewerServlet, 
+                                                               request.getContextPath() + "/" + putServlet));
         super.doEdit(request, response);
     }
 

Added: incubator/graffito/trunk/applications/browser/src/java/org/apache/portals/graffito/portlets/util/GraffitoTools.java
URL: http://svn.apache.org/viewcvs/incubator/graffito/trunk/applications/browser/src/java/org/apache/portals/graffito/portlets/util/GraffitoTools.java?view=auto&rev=154904
==============================================================================
--- incubator/graffito/trunk/applications/browser/src/java/org/apache/portals/graffito/portlets/util/GraffitoTools.java (added)
+++ incubator/graffito/trunk/applications/browser/src/java/org/apache/portals/graffito/portlets/util/GraffitoTools.java Tue Feb 22 14:53:29 2005
@@ -0,0 +1,107 @@
+/*
+ * Copyright 2000-2004 The Apache Software Foundation.
+ * 
+ * Licensed 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.
+ */
+package org.apache.portals.graffito.portlets.util;
+
+import java.util.ArrayList;
+
+import org.apache.portals.graffito.model.CmsObject;
+import org.apache.portals.graffito.model.Document;
+import org.apache.portals.graffito.model.Folder;
+
+/**
+ *
+ * Velocity tools used in the Graffito velocity templates 
+ * 
+ * @author <a href="mailto:christophe.lombart@sword-technologies.com">Lombart Christophe </a>
+ * @version $Id: Exp $
+ */
+public class GraffitoTools
+{
+      private String graffitoViewerServlet;
+      private String graffitoPutServlet;
+      
+      /**
+       * Constructor 
+       * 
+       * @param graffitoViewerName The Graffito Viewer Servlet. 
+       *        This servlet reference can be used in the href to display binary documents like PDF, ...
+       * 
+       * @param graffitoPutServlet The Graffito Put Servlet.
+       * 		This servlet reference can be used in a web editor to send back a document stream via an HTTP PUT
+       */
+      public GraffitoTools(String graffitoViewerServlet, String graffitoPutServlet)
+      {
+           this.graffitoViewerServlet = graffitoViewerServlet;
+           this.graffitoPutServlet = graffitoPutServlet;
+      }
+      
+      public Folder[] getParents(CmsObject cmsObject)
+      {
+          ArrayList parents = new ArrayList();
+          Folder parent = cmsObject.getParentFolder();
+          while (parent != null)
+          {
+              parents.add(0,parent);
+              parent = parent.getParentFolder();
+          }
+          
+          if (parents.size() == 0)
+          {
+              return null; 
+          }
+          
+          return (Folder[]) parents.toArray(new Folder[parents.size()]);
+          
+      }
+      
+      /**
+       * This method can be used in a velocity template to check if a document has to be view with the 
+       * Graffito servlet viewer or not. HTML and text document can be display direclty in the portlet.
+       * Other content types (PDF, Open office documents, Ms Word, ...) require the Graffito viewer servlet. 
+       * 
+       * @param document the document to check
+       * @return true if the Graffito servlet viewer is required
+       */
+      public boolean requireGraffitoViewer(Document document)
+      {
+          
+          if (document.getContentType().equals("text/plain") || document.getContentType().equals("text/html"))
+          {
+              return false;
+          }
+          
+          return true;
+      }       
+      
+      /**
+       * 
+       * @return The Graffito Viewer Servlet (used for binary documents)
+       */
+      public String getViewerServlet()
+      {
+          return graffitoViewerServlet;
+      }
+      
+      /**
+       * 
+       * @return The Graffito Put Servlet (used for binary documents)
+       */
+      public String getPutServlet()
+      {
+          return graffitoPutServlet;
+      }
+      
+}

Modified: incubator/graffito/trunk/applications/browser/src/webapp/WEB-INF/portlet.xml
URL: http://svn.apache.org/viewcvs/incubator/graffito/trunk/applications/browser/src/webapp/WEB-INF/portlet.xml?view=diff&r1=154903&r2=154904
==============================================================================
--- incubator/graffito/trunk/applications/browser/src/webapp/WEB-INF/portlet.xml (original)
+++ incubator/graffito/trunk/applications/browser/src/webapp/WEB-INF/portlet.xml Tue Feb 22 14:53:29 2005
@@ -39,7 +39,15 @@
 		<init-param>
 			<name>TabConfig</name>
 			<value>/WEB-INF/tabs/tabs.xml</value>
-		</init-param>
+		</init-param>		
+		<init-param>
+			<name>ViewerServlet</name>
+			<value>viewer</value>
+		</init-param>		
+		<init-param>
+			<name>PutServlet</name>
+			<value>contentupdate</value>
+		</init-param>				
 		<init-param>
 			<name>DocumentTypes</name>
 			<value>document.type.upload,document.type.text,document.type.html,document.type.news</value>

Modified: incubator/graffito/trunk/applications/browser/src/webapp/WEB-INF/velocity/graffito-macros.vm
URL: http://svn.apache.org/viewcvs/incubator/graffito/trunk/applications/browser/src/webapp/WEB-INF/velocity/graffito-macros.vm?view=diff&r1=154903&r2=154904
==============================================================================
--- incubator/graffito/trunk/applications/browser/src/webapp/WEB-INF/velocity/graffito-macros.vm (original)
+++ incubator/graffito/trunk/applications/browser/src/webapp/WEB-INF/velocity/graffito-macros.vm Tue Feb 22 14:53:29 2005
@@ -116,11 +116,11 @@
 	#end
 #end
 
-#macro (documentLink $document $renderResponse)
+#macro (documentLink $document $graffitoTools $renderResponse)
 	
 	#if ($graffitoTools.requireGraffitoViewer($document))
 			<font class="portlet-menu-item">
-				<a href="/graffito-browser/viewer?uri=$document.getUri()">$document.getTitle()</a>
+				<a href="$graffitoTools.getViewerServlet()?uri=$document.getUri()">$document.getTitle()</a>
 			</font>			
 	#else
 			<font class="portlet-menu-item">

Modified: incubator/graffito/trunk/applications/browser/src/webapp/WEB-INF/view/folder/folder-browser.vm
URL: http://svn.apache.org/viewcvs/incubator/graffito/trunk/applications/browser/src/webapp/WEB-INF/view/folder/folder-browser.vm?view=diff&r1=154903&r2=154904
==============================================================================
--- incubator/graffito/trunk/applications/browser/src/webapp/WEB-INF/view/folder/folder-browser.vm (original)
+++ incubator/graffito/trunk/applications/browser/src/webapp/WEB-INF/view/folder/folder-browser.vm Tue Feb 22 14:53:29 2005
@@ -50,10 +50,10 @@
 
 	#set ($documents = $browserInfo.getDocuments())	
 	#if($documents.size() > 0)	
-		<div class="portlet-menu">$MESSAGES.getString('div.documents')</div>
+		<!-- div class="portlet-menu">$MESSAGES.getString('div.documents')</div -->
 
 		#foreach ($document in $documents)			
-			#documentLink($document $renderResponse)
+			#documentLink($document $graffitoTools $renderResponse)
 		#end	
 	#end
 #end

Modified: incubator/graffito/trunk/applications/browser/src/webapp/WEB-INF/web.xml
URL: http://svn.apache.org/viewcvs/incubator/graffito/trunk/applications/browser/src/webapp/WEB-INF/web.xml?view=diff&r1=154903&r2=154904
==============================================================================
--- incubator/graffito/trunk/applications/browser/src/webapp/WEB-INF/web.xml (original)
+++ incubator/graffito/trunk/applications/browser/src/webapp/WEB-INF/web.xml Tue Feb 22 14:53:29 2005
@@ -14,20 +14,17 @@
 See the License for the specific language governing permissions and
 limitations under the License.
 -->
-<!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
-                         "http://java.sun.com/dtd/web-app_2_3.dtd">
+<!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN" "http://java.sun.com/dtd/web-app_2_3.dtd">
 <web-app>
-  <display-name>Graffito Browser</display-name>
-  <description>Graffito Browser Application</description>
-
-  <servlet>
-    <servlet-name>JetspeedContainer</servlet-name>
-    <display-name>Jetspeed Container</display-name>
-    <description>MVC Servlet for Jetspeed Portlet Applications</description>
-    <servlet-class>org.apache.jetspeed.container.JetspeedContainerServlet</servlet-class>
-  </servlet>
-
-  	<!-- Define Velocity Servlet -->
+	<display-name>Graffito Browser</display-name>
+	<description>Graffito Browser Application</description>
+	<servlet>
+		<servlet-name>JetspeedContainer</servlet-name>
+		<display-name>Jetspeed Container</display-name>
+		<description>MVC Servlet for Jetspeed Portlet Applications</description>
+		<servlet-class>org.apache.jetspeed.container.JetspeedContainerServlet</servlet-class>
+	</servlet>
+	<!-- Define Velocity Servlet -->
 	<servlet>
 		<servlet-name>velocity</servlet-name>
 		<servlet-class>org.apache.portals.bridges.velocity.BridgesVelocityViewServlet</servlet-class>
@@ -41,33 +38,23 @@
 		</init-param>
 		<load-on-startup>10</load-on-startup>
 	</servlet>
-
 	<!-- Define Velocity Servlet -->
 	<servlet>
 		<servlet-name>viewer</servlet-name>
 		<servlet-class>org.apache.portals.graffito.servlets.GraffitoViewerServlet</servlet-class>
 		<load-on-startup>10</load-on-startup>
 	</servlet>
-		
-    <!-- Map *.vm files to Velocity  -->
+	<!-- Map *.vm files to Velocity  -->
 	<servlet-mapping>
 		<servlet-name>velocity</servlet-name>
 		<url-pattern>*.vm</url-pattern>
-	</servlet-mapping>	
-
+	</servlet-mapping>
 	<servlet-mapping>
 		<servlet-name>viewer</servlet-name>
 		<url-pattern>/viewer</url-pattern>
 	</servlet-mapping>
-
-  <servlet-mapping>
-     <servlet-name>
-        JetspeedContainer
-     </servlet-name>
-     <url-pattern>
-       /container/*
-     </url-pattern>
-  </servlet-mapping>
-  
-  
-</web-app>
+	<servlet-mapping>
+		<servlet-name> JetspeedContainer </servlet-name>
+		<url-pattern> /container/* </url-pattern>
+	</servlet-mapping>
+</web-app>
\ No newline at end of file

Modified: incubator/graffito/trunk/applications/browser/src/webapp/kupu/kupu.vm
URL: http://svn.apache.org/viewcvs/incubator/graffito/trunk/applications/browser/src/webapp/kupu/kupu.vm?view=diff&r1=154903&r2=154904
==============================================================================
--- incubator/graffito/trunk/applications/browser/src/webapp/kupu/kupu.vm (original)
+++ incubator/graffito/trunk/applications/browser/src/webapp/kupu/kupu.vm Tue Feb 22 14:53:29 2005
@@ -1,373 +1,372 @@
-<?xml version="1.0"?>
-
-#set ($MESSAGES = $portletConfig.getResourceBundle($renderRequest.Locale))
-#set ($document = $browserInfo.getCurrentCmsObject())
-
-<html xmlns="http://www.w3.org/1999/xhtml">
-  <head>
-    <title>Test Editor</title>
-    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
-    <link href="/graffito-browser/kupu/kupustyles.css" rel="stylesheet" type="text/css"/>
-    <link href="/graffito-browser/kupu/kupudrawerstyles.css" rel="stylesheet" type="text/css"/>
-    <script type="text/javascript" src="/graffito-browser/kupu/sarissa.js"> </script>
-    <script type="text/javascript" src="/graffito-browser/kupu/kupuhelpers.js"> </script>
-    <script type="text/javascript" src="/graffito-browser/kupu/kupueditor.js"> </script>
-    <script type="text/javascript" src="/graffito-browser/kupu/kupubasetools.js"> </script>
-    <script type="text/javascript" src="/graffito-browser/kupu/kupuloggers.js"> </script>
-    <script type="text/javascript" src="/graffito-browser/kupu/kupucontentfilters.js"> </script>
-    <script type="text/javascript" src="/graffito-browser/kupu/kupucontextmenu.js"> </script>
-    <script type="text/javascript" src="/graffito-browser/kupu/kupuinit.js"> </script>
-    <script type="text/javascript" src="/graffito-browser/kupu/kupustart.js"> </script>
-    <script type="text/javascript" src="/graffito-browser/kupu/kupusaveonpart.js"> </script>
-    <script type="text/javascript" src="/graffito-browser/kupu/kupusourceedit.js"> </script>
-    <script type="text/javascript" src="/graffito-browser/kupu/kupudrawers.js"> </script>
-  </head>
-  <body onload="kupu = startKupu()">	
-    <h1>Kupu Editor Test Page</h1>
-    <div style="display: none;">
-      <xml id="kupuconfig">
-        <kupuconfig>
-          <dst>fulldoc.html</dst>
-          <use_css>1</use_css>
-          <reload_after_save>0</reload_after_save>
-          <strict_output>1</strict_output>
-          <content_type>application/xhtml+xml</content_type>
-          <compatible_singletons>1</compatible_singletons>
-          <table_classes>
-            <class>plain</class>
-            <class>listing</class>
-            <class>grid</class>
-            <class>data</class>
-          </table_classes>
-          <image_xsl_uri>/graffito-browser/kupu/kupudrawers/drawer.xsl</image_xsl_uri>
-          <link_xsl_uri>/graffito-browser/kupu/kupudrawers/drawer.xsl</link_xsl_uri>
-          <image_libraries_uri>/graffito-browser/kupu/kupudrawers/imagelibrary.xml</image_libraries_uri>
-          <link_libraries_uri>/graffito-browser/kupu/kupudrawers/linklibrary.xml</link_libraries_uri>
-          <search_images_uri> </search_images_uri>
-          <search_links_uri> </search_links_uri>
-        </kupuconfig>
-      </xml>
-    </div>
-    <div class="kupu-fulleditor">
-      <div class="kupu-tb" id="toolbar">
-        <span id="kupu-tb-buttons">
-          <span class="kupu-tb-buttongroup" style="float: right" id="kupu-logo">
-            <button type="button" class="kupu-logo" title="Kupu 1.2rc1" accesskey="k" onclick="window.open('http://kupu.oscom.org');">&#xA0;</button>
-          </span>
-          <select id="kupu-tb-styles">
-            <option xmlns:i18n="http://xml.zope.org/namespaces/i18n" value="P" i18n:translate="paragraph-normal">
-        Normal
-      </option>
-            <option value="H1"><span xmlns:i18n="http://xml.zope.org/namespaces/i18n" i18n:translate="heading">Heading</span> 1
-      </option>
-            <option value="H2"><span xmlns:i18n="http://xml.zope.org/namespaces/i18n" i18n:translate="heading">Heading</span> 2
-      </option>
-            <option value="H3"><span xmlns:i18n="http://xml.zope.org/namespaces/i18n" i18n:translate="heading">Heading</span> 3
-      </option>
-            <option value="H4"><span xmlns:i18n="http://xml.zope.org/namespaces/i18n" i18n:translate="heading">Heading</span> 4
-      </option>
-            <option value="H5"><span xmlns:i18n="http://xml.zope.org/namespaces/i18n" i18n:translate="heading">Heading</span> 5
-      </option>
-            <option value="H6"><span xmlns:i18n="http://xml.zope.org/namespaces/i18n" i18n:translate="heading">Heading</span> 6
-      </option>
-            <option xmlns:i18n="http://xml.zope.org/namespaces/i18n" value="PRE" i18n:translate="paragraph-formatted">
-        Formatted
-      </option>
-          </select>
-          <span class="kupu-tb-buttongroup">
-            <button xmlns:i18n="http://xml.zope.org/namespaces/i18n" type="button" class="kupu-save" id="kupu-save-button" title="save: alt-s" i18n:attributes="title" accesskey="s">&#xA0;</button>
-          </span>
-          <span class="kupu-tb-buttongroup" id="kupu-bg-basicmarkup">
-            <button xmlns:i18n="http://xml.zope.org/namespaces/i18n" type="button" class="kupu-bold" id="kupu-bold-button" title="bold: alt-b" i18n:attributes="title" accesskey="b">&#xA0;</button>
-            <button xmlns:i18n="http://xml.zope.org/namespaces/i18n" type="button" class="kupu-italic" id="kupu-italic-button" title="italic: alt-i" i18n:attributes="title" accesskey="i">&#xA0;</button>
-            <button xmlns:i18n="http://xml.zope.org/namespaces/i18n" type="button" class="kupu-underline" id="kupu-underline-button" title="underline: alt-u" i18n:attributes="title" accesskey="u">&#xA0;</button>
-          </span>
-          <span class="kupu-tb-buttongroup" id="kupu-bg-subsuper">
-            <button xmlns:i18n="http://xml.zope.org/namespaces/i18n" type="button" class="kupu-subscript" id="kupu-subscript-button" title="subscript: alt--" i18n:attributes="title" accesskey="-">&#xA0;</button>
-            <button xmlns:i18n="http://xml.zope.org/namespaces/i18n" type="button" class="kupu-superscript" id="kupu-superscript-button" title="superscript: alt-+" i18n:attributes="title" accesskey="+">&#xA0;</button>
-          </span>
-          <span class="kupu-tb-buttongroup">
-            <button xmlns:i18n="http://xml.zope.org/namespaces/i18n" type="button" class="kupu-forecolor" id="kupu-forecolor-button" title="text color: alt-f" i18n:attributes="title" accesskey="f">&#xA0;</button>
-            <button xmlns:i18n="http://xml.zope.org/namespaces/i18n" type="button" class="kupu-hilitecolor" id="kupu-hilitecolor-button" title="background color: alt-h" i18n:attributes="title" accesskey="h">&#xA0;</button>
-          </span>
-          <span class="kupu-tb-buttongroup" id="kupu-bg-justify">
-            <button xmlns:i18n="http://xml.zope.org/namespaces/i18n" type="button" class="kupu-justifyleft" id="kupu-justifyleft-button" title="left justify: alt-l" i18n:attributes="title" accesskey="l">&#xA0;</button>
-            <button xmlns:i18n="http://xml.zope.org/namespaces/i18n" type="button" class="kupu-justifycenter" id="kupu-justifycenter-button" title="center justify: alt-c" i18n:attributes="title" accesskey="c">&#xA0;</button>
-            <button xmlns:i18n="http://xml.zope.org/namespaces/i18n" type="button" class="kupu-justifyright" id="kupu-justifyright-button" title="right justify: alt-r" i18n:attributes="title" accesskey="r">&#xA0;</button>
-          </span>
-          <span class="kupu-tb-buttongroup" id="kupu-bg-list">
-            <button xmlns:i18n="http://xml.zope.org/namespaces/i18n" type="button" class="kupu-insertorderedlist" title="numbered list: alt-#" id="kupu-list-ol-addbutton" i18n:attributes="title" accesskey="#">&#xA0;</button>
-            <button xmlns:i18n="http://xml.zope.org/namespaces/i18n" type="button" class="kupu-insertunorderedlist" title="unordered list: alt-*" id="kupu-list-ul-addbutton" i18n:attributes="title" accesskey="*">&#xA0;</button>
-          </span>
-          <span class="kupu-tb-buttongroup" id="kupu-bg-definitionlist">
-            <button xmlns:i18n="http://xml.zope.org/namespaces/i18n" type="button" class="kupu-insertdefinitionlist" title="definition list: alt-=" id="kupu-list-dl-addbutton" i18n:attributes="title" accesskey="=">&#xA0;</button>
-          </span>
-          <span class="kupu-tb-buttongroup" id="kupu-bg-indent">
-            <button xmlns:i18n="http://xml.zope.org/namespaces/i18n" type="button" class="kupu-outdent" id="kupu-outdent-button" title="outdent: alt-&lt;" i18n:attributes="title" accesskey="&lt;">&#xA0;</button>
-            <button xmlns:i18n="http://xml.zope.org/namespaces/i18n" type="button" class="kupu-indent" id="kupu-indent-button" title="indent: alt-&gt;" i18n:attributes="title" accesskey="&gt;">&#xA0;</button>
-          </span>
-          <span class="kupu-tb-buttongroup">
-            <button xmlns:i18n="http://xml.zope.org/namespaces/i18n" type="button" class="kupu-image" id="kupu-imagelibdrawer-button" title="image" i18n:attributes="title">&#xA0;</button>
-            <button xmlns:i18n="http://xml.zope.org/namespaces/i18n" type="button" class="kupu-inthyperlink" id="kupu-linklibdrawer-button" title="internal link" i18n:attributes="title">&#xA0;</button>
-            <button xmlns:i18n="http://xml.zope.org/namespaces/i18n" type="button" class="kupu-exthyperlink" id="kupu-linkdrawer-button" title="external link" i18n:attributes="title">&#xA0;</button>
-            <button xmlns:i18n="http://xml.zope.org/namespaces/i18n" type="button" class="kupu-table" id="kupu-tabledrawer-button" title="table" i18n:attributes="title">&#xA0;</button>
-          </span>
-          <span class="kupu-tb-buttongroup" id="kupu-bg-remove">
-            <button xmlns:i18n="http://xml.zope.org/namespaces/i18n" type="button" class="kupu-removeimage invisible" id="kupu-removeimage-button" title="Remove image" i18n:attributes="title">&#xA0;</button>
-            <button xmlns:i18n="http://xml.zope.org/namespaces/i18n" type="button" class="kupu-removelink invisible" id="kupu-removelink-button" title="Remove link" i18n:attributes="title">&#xA0;</button>
-          </span>
-          <span class="kupu-tb-buttongroup" id="kupu-bg-undo">
-            <button xmlns:i18n="http://xml.zope.org/namespaces/i18n" type="button" class="kupu-undo" id="kupu-undo-button" title="undo: alt-z" i18n:attributes="title" accesskey="z">&#xA0;</button>
-            <button xmlns:i18n="http://xml.zope.org/namespaces/i18n" type="button" class="kupu-redo" id="kupu-redo-button" title="redo: alt-y" i18n:attributes="title" accesskey="y">&#xA0;</button>
-          </span>
-          <span class="kupu-tb-buttongroup" id="kupu-source">
-            <button xmlns:i18n="http://xml.zope.org/namespaces/i18n" type="button" class="kupu-source" id="kupu-source-button" title="edit HTML code" i18n:attributes="title">&#xA0;</button>
-          </span>
-        </span>
-        <select id="kupu-ulstyles">
-          <option xmlns:i18n="http://xml.zope.org/namespaces/i18n" value="disc" i18n:translate="list-disc">&#x25CF;</option>
-          <option xmlns:i18n="http://xml.zope.org/namespaces/i18n" value="square" i18n:translate="list-square">&#x25A0;</option>
-          <option xmlns:i18n="http://xml.zope.org/namespaces/i18n" value="circle" i18n:translate="list-circle">&#x25CB;</option>
-          <option xmlns:i18n="http://xml.zope.org/namespaces/i18n" value="none" i18n:translate="list-nobullet">no bullet</option>
-        </select>
-        <select id="kupu-olstyles">
-          <option xmlns:i18n="http://xml.zope.org/namespaces/i18n" value="decimal" i18n:translate="list-decimal">1</option>
-          <option xmlns:i18n="http://xml.zope.org/namespaces/i18n" value="upper-roman" i18n:translate="list-upperroman">I</option>
-          <option xmlns:i18n="http://xml.zope.org/namespaces/i18n" value="lower-roman" i18n:translate="list-lowerroman">i</option>
-          <option xmlns:i18n="http://xml.zope.org/namespaces/i18n" value="upper-alpha" i18n:translate="list-upperalpha">A</option>
-          <option xmlns:i18n="http://xml.zope.org/namespaces/i18n" value="lower-alpha" i18n:translate="list-loweralpha">a</option>
-        </select>
-        <div style="display:block;">
-          <div id="kupu-librarydrawer" class="kupu-drawer">
-      </div>
-        </div>
-        <div id="kupu-linkdrawer" class="kupu-drawer">
-          <h1 xmlns:i18n="http://xml.zope.org/namespaces/i18n" i18n:translate="">External Link</h1>
-          <div id="kupu-linkdrawer-addlink" class="kupu-panels">
-            <table>
-              <tr>
-                <td>
-                  <div class="kupu-toolbox-label"><span xmlns:i18n="http://xml.zope.org/namespaces/i18n" i18n:translate="items-matching-keyword">
-            Link the highlighted text to this URL
-          </span>:
-        </div>
-                  <input id="kupu-linkdrawer-input" class="kupu-toolbox-st" type="text"/>
-                </td>
-                <td class="kupu-preview-button">
-                  <button type="button" onclick="drawertool.current_drawer.preview()">Preview</button>
-                </td>
-              </tr>
-              <tr>
-                <td colspan="2" align="center">
-                  <iframe frameborder="1" scrolling="auto" width="440" height="198" id="kupu-linkdrawer-preview" src="kupublank.html">
-        </iframe>
-                </td>
-              </tr>
-            </table>
-            <div class="kupu-dialogbuttons">
-              <button type="button" onclick="drawertool.current_drawer.save()">Ok</button>
-              <button type="button" onclick="drawertool.closeDrawer()">Cancel</button>
-            </div>
-          </div>
-        </div>
-        <div id="kupu-tabledrawer" class="kupu-drawer">
-          <h1>Table</h1>
-          <div class="kupu-panels">
-            <table width="99%">
-              <tr class="kupu-panelsrow">
-                <td class="kupu-panel">
-                  <table width="100%">
-                    <tbody>
-                      <tr>
-                        <td class="kupu-toolbox-label">Table Class</td>
-                        <td width="50%">
-                          <select id="kupu-tabledrawer-classchooser" onchange="drawertool.current_drawer.tool.setTableClass(this.options[this.selectedIndex].value)">
-                            <option value="plain">Plain</option>
-                            <option value="listing">Listing</option>
-                            <option value="grid">Grid</option>
-                            <option value="data">Data</option>
-                          </select>
-                        </td>
-                      </tr>
-                      <tr>
-                        <td colspan="2" class="">
-                          <div id="kupu-tabledrawer-addtable">
-                            <table width="100%">
-                              <tr>
-                                <td class="kupu-toolbox-label" width="50%">Rows</td>
-                                <td>
-                                  <input type="text" id="kupu-tabledrawer-newrows"/>
-                                </td>
-                              </tr>
-                              <tr>
-                                <td class="kupu-toolbox-label">Columns</td>
-                                <td>
-                                  <input type="text" id="kupu-tabledrawer-newcols"/>
-                                </td>
-                              </tr>
-                              <tr>
-                                <td class="kupu-toolbox-label">Headings</td>
-                                <td class="kupu-toolbox-label">
-                                  <input name="kupu-tabledrawer-makeheader" id="kupu-tabledrawer-makeheader" type="checkbox"/>
-                                  <label for="kupu-tabledrawer-makeheader">Create</label>
-                                </td>
-                              </tr>
-                              <tr>
-                                <td colspan="2" style="text-align: center">
-                                  <button type="button" onclick="drawertool.current_drawer.createTable()">Add Table</button>
-                                </td>
-                              </tr>
-                              <tr>
-                                <td colspan="2" style="text-align: center">
-                                  <button type="button" onclick="drawertool.current_drawer.tool.fixAllTables()">Fix All Tables</button>
-                                </td>
-                              </tr>
-                            </table>
-                          </div>
-                          <div id="kupu-tabledrawer-edittable">
-                            <table width="100%">
-                              <tr>
-                                <td width="50%">Current column alignment</td>
-                                <td>
-                                  <select id="kupu-tabledrawer-alignchooser" onchange="drawertool.current_drawer.tool.setColumnAlign(this.options[this.selectedIndex].value)">
-                                    <option value="left">Left</option>
-                                    <option value="center">Center</option>
-                                    <option value="right">Right</option>
-                                  </select>
-                                </td>
-                              </tr>
-                              <tr>
-                                <td>Column</td>
-                                <td>
-                                  <button type="button" id="kupu-tabledrawer-addcolumn-button" onclick="drawertool.current_drawer.tool.addTableColumn()">Add</button>
-                                  <button type="button" id="kupu-tabledrawer-delcolumn-button" onclick="drawertool.current_drawer.tool.delTableColumn()">Remove</button>
-                                </td>
-                              </tr>
-                              <tr>
-                                <td>Row</td>
-                                <td>
-                                  <button type="button" id="kupu-tabledrawer-addrow-button" onclick="drawertool.current_drawer.tool.addTableRow()">Add</button>
-                                  <button type="button" id="kupu-tabledrawer-delrow-button" onclick="drawertool.current_drawer.tool.delTableRow()">Remove</button>
-                                </td>
-                              </tr>
-                              <tr>
-                                <td>Fix Table</td>
-                                <td>
-                                  <button type="button" id="kupu-tabledrawer-addrow-button" onclick="drawertool.current_drawer.tool.fixTable()">Fix</button>
-                                </td>
-                              </tr>
-                            </table>
-                          </div>
-                        </td>
-                      </tr>
-                    </tbody>
-                  </table>
-                </td>
-              </tr>
-            </table>
-            <div class="kupu-dialogbuttons">
-              <button type="button" onclick="drawertool.closeDrawer()">Close</button>
-            </div>
-          </div>
-        </div>
-      </div>
-      <div xmlns="" class="kupu-toolboxes">
-        <div class="kupu-toolbox" id="kupu-toolbox-properties">
-          <h1>Properties</h1>
-          <div class="kupu-toolbox-label">Title:</div>
-          <input class="wide" id="kupu-properties-title"/>
-          <div class="kupu-toolbox-label">Description:</div>
-          <textarea class="wide" id="kupu-properties-description"> </textarea>
-        </div>
-        <div class="kupu-toolbox" id="kupu-toolbox-links">
-          <h1 xmlns:i18n="http://xml.zope.org/namespaces/i18n" i18n:translate="links">Links</h1>
-          <div id="kupu-toolbox-addlink">
-            <div class="kupu-toolbox-label">
-              <span xmlns:i18n="http://xml.zope.org/namespaces/i18n" i18n:translate="items-matching-keyword">
-            Link the highlighted text to this URL:
-          </span>
-            </div>
-            <input id="kupu-link-input" class="wide" type="text"/>
-            <div class="kupu-toolbox-buttons">
-              <button type="button" id="kupu-link-button" class="kupu-toolbox-action">Make Link</button>
-            </div>
-          </div>
-        </div>
-        <div class="kupu-toolbox" id="kupu-toolbox-images">
-          <h1 xmlns:i18n="http://xml.zope.org/namespaces/i18n" i18n:translate="images">Images</h1>
-          <div class="kupu-toolbox-label">
-            <span xmlns:i18n="http://xml.zope.org/namespaces/i18n" i18n:translate="">
-                Insert image at the following URL:
-              </span>
-          </div>
-          <input id="kupu-image-input" value="kupuimages/kupu_icon.gif" class="wide" type="text"/>
-          <span xmlns:i18n="http://xml.zope.org/namespaces/i18n" i18n:translate="">
-              Image float:
-            </span>
-          <select class="wide" id="kupu-image-float-select">
-            <option value="none">No float</option>
-            <option value="left">Left</option>
-            <option value="right">Right</option>
-          </select>
-          <div class="kupu-toolbox-buttons">
-            <button type="button" id="kupu-image-addbutton" class="kupu-toolbox-action">Insert Image</button>
-          </div>
-        </div>
-        <div class="kupu-toolbox" id="kupu-toolbox-tables">
-          <h1 xmlns:i18n="http://xml.zope.org/namespaces/i18n" i18n:translate="table-inspector">Tables</h1>
-          <div class="kupu-toolbox-label">Table Class:
-        <select class="wide" id="kupu-table-classchooser"> </select>
-      </div>
-          <div id="kupu-toolbox-addtable">
-            <div class="kupu-toolbox-label">Rows:</div>
-            <input class="wide" type="text" id="kupu-table-newrows"/>
-            <div class="kupu-toolbox-label">Columns:</div>
-            <input class="wide" type="text" id="kupu-table-newcols"/>
-            <div class="kupu-toolbox-label">
-          Headings:
-          <input name="kupu-table-makeheader" id="kupu-table-makeheader" type="checkbox"/>
-          <label for="kupu-table-makeheader">Create</label>
-        </div>
-            <div class="kupu-toolbox-buttons">
-              <button type="button" id="kupu-table-fixall-button">Fix Table</button>
-              <button type="button" id="kupu-table-addtable-button">Add Table</button>
-            </div>
-          </div>
-          <div id="kupu-toolbox-edittable">
-            <div class="kupu-toolbox-label">Col Align:
-            <select class="wide" id="kupu-table-alignchooser"><option value="left">Left</option><option value="center">Center</option><option value="right">Right</option></select>
-          </div>
-            <div class="kupu-toolbox-buttons">
-              <br/>
-              <button type="button" id="kupu-table-addcolumn-button">Add Column</button>
-              <button type="button" id="kupu-table-delcolumn-button">Remove Column</button>
-              <br/>
-              <button type="button" id="kupu-table-addrow-button">Add Row</button>
-              <button type="button" id="kupu-table-delrow-button">Remove Row</button>
-              <button type="button" id="kupu-table-fix-button">Fix</button>
-            </div>
-          </div>
-        </div>
-        <div class="kupu-toolbox" id="kupu-toolbox-debug">
-          <h1 xmlns:i18n="http://xml.zope.org/namespaces/i18n" i18n:translate="debug-log">Debug Log</h1>
-          <div id="kupu-toolbox-debuglog" class="kupu-toolbox-label">
-      </div>
-        </div>
-      </div>
-      <table id="kupu-colorchooser" cellpadding="0" cellspacing="0" style="position: fixed; border-style: solid; border-color: black; border-width: 1px;">
-    </table>
-      <div class="kupu-editorframe">
-		#if($document.getUri())
-			#set($src= "/graffito-browser/viewer?uri=$document.getUri()")
-		#else
-			#set($src= "")
-		#end
-        <form>
-          <iframe id="kupu-editor" frameborder="0" src="$!src" scrolling="auto">
-        </iframe>
-          <textarea class="kupu-editor-textarea" id="kupu-editor-textarea"> </textarea>
-        </form>
-      </div>
-    </div>
-  </body>
-</html>
+
+#set ($MESSAGES = $portletConfig.getResourceBundle($renderRequest.Locale))
+#set ($document = $browserInfo.getCurrentCmsObject())
+
+
+<html xmlns="http://www.w3.org/1999/xhtml">
+  <head>
+    <title>Test Editor</title>
+    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
+    <link href="$renderRequest.getContextPath()/kupu/kupustyles.css" rel="stylesheet" type="text/css"/>
+    <link href="$renderRequest.getContextPath()/kupu/kupudrawerstyles.css" rel="stylesheet" type="text/css"/>
+    <script type="text/javascript" src="$renderRequest.getContextPath()/kupu/sarissa.js"> </script>
+    <script type="text/javascript" src="$renderRequest.getContextPath()/kupu/kupuhelpers.js"> </script>
+    <script type="text/javascript" src="$renderRequest.getContextPath()/kupu/kupueditor.js"> </script>
+    <script type="text/javascript" src="$renderRequest.getContextPath()/kupu/kupubasetools.js"> </script>
+    <script type="text/javascript" src="$renderRequest.getContextPath()/kupu/kupuloggers.js"> </script>
+    <script type="text/javascript" src="$renderRequest.getContextPath()/kupu/kupucontentfilters.js"> </script>
+    <script type="text/javascript" src="$renderRequest.getContextPath()/kupu/kupucontextmenu.js"> </script>
+    <script type="text/javascript" src="$renderRequest.getContextPath()/kupu/kupuinit_form.js"> </script>
+    <script type="text/javascript" src="$renderRequest.getContextPath()/kupu/kupustart_form.js"> </script>
+    <script type="text/javascript" src="$renderRequest.getContextPath()/kupu/kupusourceedit.js"> </script>
+    <script type="text/javascript" src="$renderRequest.getContextPath()/kupu/kupudrawers.js"> </script>
+  </head>
+  <body onload="kupu = startKupu()">    
+    <div class="portlet-menu">$MESSAGES.getString('div.newdocument') #cmsPath($browserInfo.getCurrentServer() $browserInfo.getFolderPath() $renderResponse $MESSAGES ) </div>	
+    <form action="$renderResponse.createActionURL()" method="POST">
+      <div style="display: none;">
+        <xml id="kupuconfig">
+          <kupuconfig>
+            <dst></dst>
+            <use_css>1</use_css>
+            <reload_after_save>0</reload_after_save>
+            <strict_output>1</strict_output>
+            <content_type>application/xhtml+xml</content_type>
+            <compatible_singletons>1</compatible_singletons>
+            <table_classes>
+              <class>plain</class>
+              <class>listing</class>
+              <class>grid</class>
+              <class>data</class>
+            </table_classes>
+            <image_xsl_uri>kupudrawers/drawer.xsl</image_xsl_uri>
+            <link_xsl_uri>kupudrawers/drawer.xsl</link_xsl_uri>
+            <image_libraries_uri>kupudrawers/imagelibrary.xml</image_libraries_uri>
+            <link_libraries_uri>kupudrawers/linklibrary.xml</link_libraries_uri>
+            <search_images_uri> </search_images_uri>
+            <search_links_uri> </search_links_uri>
+          </kupuconfig>
+        </xml>
+      </div>
+      <div class="kupu-fulleditor">
+        <div class="kupu-tb" id="toolbar">
+          <span id="kupu-tb-buttons">
+            <span class="kupu-tb-buttongroup" style="float: right" id="kupu-logo">
+              <button type="button" class="kupu-logo" title="Kupu 1.2rc1" accesskey="k" onclick="window.open('http://kupu.oscom.org');">&#xA0;</button>
+            </span>
+            <select id="kupu-tb-styles">
+              <option xmlns:i18n="http://xml.zope.org/namespaces/i18n" value="P" i18n:translate="paragraph-normal">
+        Normal
+      </option>
+              <option value="H1"><span xmlns:i18n="http://xml.zope.org/namespaces/i18n" i18n:translate="heading">Heading</span> 1
+      </option>
+              <option value="H2"><span xmlns:i18n="http://xml.zope.org/namespaces/i18n" i18n:translate="heading">Heading</span> 2
+      </option>
+              <option value="H3"><span xmlns:i18n="http://xml.zope.org/namespaces/i18n" i18n:translate="heading">Heading</span> 3
+      </option>
+              <option value="H4"><span xmlns:i18n="http://xml.zope.org/namespaces/i18n" i18n:translate="heading">Heading</span> 4
+      </option>
+              <option value="H5"><span xmlns:i18n="http://xml.zope.org/namespaces/i18n" i18n:translate="heading">Heading</span> 5
+      </option>
+              <option value="H6"><span xmlns:i18n="http://xml.zope.org/namespaces/i18n" i18n:translate="heading">Heading</span> 6
+      </option>
+              <option xmlns:i18n="http://xml.zope.org/namespaces/i18n" value="PRE" i18n:translate="paragraph-formatted">
+        Formatted
+      </option>
+            </select>
+            <span class="kupu-tb-buttongroup">
+              <button xmlns:i18n="http://xml.zope.org/namespaces/i18n" type="button" class="kupu-save" id="kupu-save-button" title="Save" i18n:attributes="title" accesskey="s">&#xA0;</button>
+            </span>
+            <span class="kupu-tb-buttongroup" id="kupu-bg-basicmarkup">
+              <button xmlns:i18n="http://xml.zope.org/namespaces/i18n" type="button" class="kupu-bold" id="kupu-bold-button" title="bold: alt-b" i18n:attributes="title" accesskey="b">&#xA0;</button>
+              <button xmlns:i18n="http://xml.zope.org/namespaces/i18n" type="button" class="kupu-italic" id="kupu-italic-button" title="italic: alt-i" i18n:attributes="title" accesskey="i">&#xA0;</button>
+              <button xmlns:i18n="http://xml.zope.org/namespaces/i18n" type="button" class="kupu-underline" id="kupu-underline-button" title="underline: alt-u" i18n:attributes="title" accesskey="u">&#xA0;</button>
+            </span>
+            <span class="kupu-tb-buttongroup" id="kupu-bg-subsuper">
+              <button xmlns:i18n="http://xml.zope.org/namespaces/i18n" type="button" class="kupu-subscript" id="kupu-subscript-button" title="subscript: alt--" i18n:attributes="title" accesskey="-">&#xA0;</button>
+              <button xmlns:i18n="http://xml.zope.org/namespaces/i18n" type="button" class="kupu-superscript" id="kupu-superscript-button" title="superscript: alt-+" i18n:attributes="title" accesskey="+">&#xA0;</button>
+            </span>
+            <span class="kupu-tb-buttongroup">
+              <button xmlns:i18n="http://xml.zope.org/namespaces/i18n" type="button" class="kupu-forecolor" id="kupu-forecolor-button" title="text color: alt-f" i18n:attributes="title" accesskey="f">&#xA0;</button>
+              <button xmlns:i18n="http://xml.zope.org/namespaces/i18n" type="button" class="kupu-hilitecolor" id="kupu-hilitecolor-button" title="background color: alt-h" i18n:attributes="title" accesskey="h">&#xA0;</button>
+            </span>
+            <span class="kupu-tb-buttongroup" id="kupu-bg-justify">
+              <button xmlns:i18n="http://xml.zope.org/namespaces/i18n" type="button" class="kupu-justifyleft" id="kupu-justifyleft-button" title="left justify: alt-l" i18n:attributes="title" accesskey="l">&#xA0;</button>
+              <button xmlns:i18n="http://xml.zope.org/namespaces/i18n" type="button" class="kupu-justifycenter" id="kupu-justifycenter-button" title="center justify: alt-c" i18n:attributes="title" accesskey="c">&#xA0;</button>
+              <button xmlns:i18n="http://xml.zope.org/namespaces/i18n" type="button" class="kupu-justifyright" id="kupu-justifyright-button" title="right justify: alt-r" i18n:attributes="title" accesskey="r">&#xA0;</button>
+            </span>
+            <span class="kupu-tb-buttongroup" id="kupu-bg-list">
+              <button xmlns:i18n="http://xml.zope.org/namespaces/i18n" type="button" class="kupu-insertorderedlist" title="numbered list: alt-#" id="kupu-list-ol-addbutton" i18n:attributes="title" accesskey="#">&#xA0;</button>
+              <button xmlns:i18n="http://xml.zope.org/namespaces/i18n" type="button" class="kupu-insertunorderedlist" title="unordered list: alt-*" id="kupu-list-ul-addbutton" i18n:attributes="title" accesskey="*">&#xA0;</button>
+            </span>
+            <span class="kupu-tb-buttongroup" id="kupu-bg-definitionlist">
+              <button xmlns:i18n="http://xml.zope.org/namespaces/i18n" type="button" class="kupu-insertdefinitionlist" title="definition list: alt-=" id="kupu-list-dl-addbutton" i18n:attributes="title" accesskey="=">&#xA0;</button>
+            </span>
+            <span class="kupu-tb-buttongroup" id="kupu-bg-indent">
+              <button xmlns:i18n="http://xml.zope.org/namespaces/i18n" type="button" class="kupu-outdent" id="kupu-outdent-button" title="outdent: alt-&lt;" i18n:attributes="title" accesskey="&lt;">&#xA0;</button>
+              <button xmlns:i18n="http://xml.zope.org/namespaces/i18n" type="button" class="kupu-indent" id="kupu-indent-button" title="indent: alt-&gt;" i18n:attributes="title" accesskey="&gt;">&#xA0;</button>
+            </span>
+            <span class="kupu-tb-buttongroup">
+              <button xmlns:i18n="http://xml.zope.org/namespaces/i18n" type="button" class="kupu-image" id="kupu-imagelibdrawer-button" title="image" i18n:attributes="title">&#xA0;</button>
+              <button xmlns:i18n="http://xml.zope.org/namespaces/i18n" type="button" class="kupu-inthyperlink" id="kupu-linklibdrawer-button" title="internal link" i18n:attributes="title">&#xA0;</button>
+              <button xmlns:i18n="http://xml.zope.org/namespaces/i18n" type="button" class="kupu-exthyperlink" id="kupu-linkdrawer-button" title="external link" i18n:attributes="title">&#xA0;</button>
+              <button xmlns:i18n="http://xml.zope.org/namespaces/i18n" type="button" class="kupu-table" id="kupu-tabledrawer-button" title="table" i18n:attributes="title">&#xA0;</button>
+            </span>
+            <span class="kupu-tb-buttongroup" id="kupu-bg-remove">
+              <button xmlns:i18n="http://xml.zope.org/namespaces/i18n" type="button" class="kupu-removeimage invisible" id="kupu-removeimage-button" title="Remove image" i18n:attributes="title">&#xA0;</button>
+              <button xmlns:i18n="http://xml.zope.org/namespaces/i18n" type="button" class="kupu-removelink invisible" id="kupu-removelink-button" title="Remove link" i18n:attributes="title">&#xA0;</button>
+            </span>
+            <span class="kupu-tb-buttongroup" id="kupu-bg-undo">
+              <button xmlns:i18n="http://xml.zope.org/namespaces/i18n" type="button" class="kupu-undo" id="kupu-undo-button" title="undo: alt-z" i18n:attributes="title" accesskey="z">&#xA0;</button>
+              <button xmlns:i18n="http://xml.zope.org/namespaces/i18n" type="button" class="kupu-redo" id="kupu-redo-button" title="redo: alt-y" i18n:attributes="title" accesskey="y">&#xA0;</button>
+            </span>
+            <span class="kupu-tb-buttongroup" id="kupu-source">
+              <button xmlns:i18n="http://xml.zope.org/namespaces/i18n" type="button" class="kupu-source" id="kupu-source-button" title="edit HTML code" i18n:attributes="title">&#xA0;</button>
+            </span>
+          </span>
+          <select id="kupu-ulstyles">
+            <option xmlns:i18n="http://xml.zope.org/namespaces/i18n" value="disc" i18n:translate="list-disc">&#x25CF;</option>
+            <option xmlns:i18n="http://xml.zope.org/namespaces/i18n" value="square" i18n:translate="list-square">&#x25A0;</option>
+            <option xmlns:i18n="http://xml.zope.org/namespaces/i18n" value="circle" i18n:translate="list-circle">&#x25CB;</option>
+            <option xmlns:i18n="http://xml.zope.org/namespaces/i18n" value="none" i18n:translate="list-nobullet">no bullet</option>
+          </select>
+          <select id="kupu-olstyles">
+            <option xmlns:i18n="http://xml.zope.org/namespaces/i18n" value="decimal" i18n:translate="list-decimal">1</option>
+            <option xmlns:i18n="http://xml.zope.org/namespaces/i18n" value="upper-roman" i18n:translate="list-upperroman">I</option>
+            <option xmlns:i18n="http://xml.zope.org/namespaces/i18n" value="lower-roman" i18n:translate="list-lowerroman">i</option>
+            <option xmlns:i18n="http://xml.zope.org/namespaces/i18n" value="upper-alpha" i18n:translate="list-upperalpha">A</option>
+            <option xmlns:i18n="http://xml.zope.org/namespaces/i18n" value="lower-alpha" i18n:translate="list-loweralpha">a</option>
+          </select>
+          <div style="display:block;">
+            <div id="kupu-librarydrawer" class="kupu-drawer">
+      </div>
+          </div>
+          <div id="kupu-linkdrawer" class="kupu-drawer">
+            <h1 xmlns:i18n="http://xml.zope.org/namespaces/i18n" i18n:translate="">External Link</h1>
+            <div id="kupu-linkdrawer-addlink" class="kupu-panels">
+              <table>
+                <tr>
+                  <td>
+                    <div class="kupu-toolbox-label"><span xmlns:i18n="http://xml.zope.org/namespaces/i18n" i18n:translate="items-matching-keyword">
+            Link the highlighted text to this URL
+          </span>:
+        </div>
+                    <input id="kupu-linkdrawer-input" class="kupu-toolbox-st" type="text"/>
+                  </td>
+                  <td class="kupu-preview-button">
+                    <button type="button" onclick="drawertool.current_drawer.preview()">Preview</button>
+                  </td>
+                </tr>
+                <tr>
+                  <td colspan="2" align="center">
+                    <iframe frameborder="1" scrolling="auto" width="440" height="198" id="kupu-linkdrawer-preview" src="kupublank.html">
+        </iframe>
+                  </td>
+                </tr>
+              </table>
+              <div class="kupu-dialogbuttons">
+                <button type="button" onclick="drawertool.current_drawer.save()">Ok</button>
+                <button type="button" onclick="drawertool.closeDrawer()">Cancel</button>
+              </div>
+            </div>
+          </div>
+          <div id="kupu-tabledrawer" class="kupu-drawer">
+            <h1>Table</h1>
+            <div class="kupu-panels">
+              <table width="99%">
+                <tr class="kupu-panelsrow">
+                  <td class="kupu-panel">
+                    <table width="100%">
+                      <tbody>
+                        <tr>
+                          <td class="kupu-toolbox-label">Table Class</td>
+                          <td width="50%">
+                            <select id="kupu-tabledrawer-classchooser" onchange="drawertool.current_drawer.tool.setTableClass(this.options[this.selectedIndex].value)">
+                              <option value="plain">Plain</option>
+                              <option value="listing">Listing</option>
+                              <option value="grid">Grid</option>
+                              <option value="data">Data</option>
+                            </select>
+                          </td>
+                        </tr>
+                        <tr>
+                          <td colspan="2" class="">
+                            <div id="kupu-tabledrawer-addtable">
+                              <table width="100%">
+                                <tr>
+                                  <td class="kupu-toolbox-label" width="50%">Rows</td>
+                                  <td>
+                                    <input type="text" id="kupu-tabledrawer-newrows"/>
+                                  </td>
+                                </tr>
+                                <tr>
+                                  <td class="kupu-toolbox-label">Columns</td>
+                                  <td>
+                                    <input type="text" id="kupu-tabledrawer-newcols"/>
+                                  </td>
+                                </tr>
+                                <tr>
+                                  <td class="kupu-toolbox-label">Headings</td>
+                                  <td class="kupu-toolbox-label">
+                                    <input name="kupu-tabledrawer-makeheader" id="kupu-tabledrawer-makeheader" type="checkbox"/>
+                                    <label for="kupu-tabledrawer-makeheader">Create</label>
+                                  </td>
+                                </tr>
+                                <tr>
+                                  <td colspan="2" style="text-align: center">
+                                    <button type="button" onclick="drawertool.current_drawer.createTable()">Add Table</button>
+                                  </td>
+                                </tr>
+                                <tr>
+                                  <td colspan="2" style="text-align: center">
+                                    <button type="button" onclick="drawertool.current_drawer.tool.fixAllTables()">Fix All Tables</button>
+                                  </td>
+                                </tr>
+                              </table>
+                            </div>
+                            <div id="kupu-tabledrawer-edittable">
+                              <table width="100%">
+                                <tr>
+                                  <td width="50%">Current column alignment</td>
+                                  <td>
+                                    <select id="kupu-tabledrawer-alignchooser" onchange="drawertool.current_drawer.tool.setColumnAlign(this.options[this.selectedIndex].value)">
+                                      <option value="left">Left</option>
+                                      <option value="center">Center</option>
+                                      <option value="right">Right</option>
+                                    </select>
+                                  </td>
+                                </tr>
+                                <tr>
+                                  <td>Column</td>
+                                  <td>
+                                    <button type="button" id="kupu-tabledrawer-addcolumn-button" onclick="drawertool.current_drawer.tool.addTableColumn()">Add</button>
+                                    <button type="button" id="kupu-tabledrawer-delcolumn-button" onclick="drawertool.current_drawer.tool.delTableColumn()">Remove</button>
+                                  </td>
+                                </tr>
+                                <tr>
+                                  <td>Row</td>
+                                  <td>
+                                    <button type="button" id="kupu-tabledrawer-addrow-button" onclick="drawertool.current_drawer.tool.addTableRow()">Add</button>
+                                    <button type="button" id="kupu-tabledrawer-delrow-button" onclick="drawertool.current_drawer.tool.delTableRow()">Remove</button>
+                                  </td>
+                                </tr>
+                                <tr>
+                                  <td>Fix Table</td>
+                                  <td>
+                                    <button type="button" id="kupu-tabledrawer-addrow-button" onclick="drawertool.current_drawer.tool.fixTable()">Fix</button>
+                                  </td>
+                                </tr>
+                              </table>
+                            </div>
+                          </td>
+                        </tr>
+                      </tbody>
+                    </table>
+                  </td>
+                </tr>
+              </table>
+              <div class="kupu-dialogbuttons">
+                <button type="button" onclick="drawertool.closeDrawer()">Close</button>
+              </div>
+            </div>
+          </div>
+        </div>
+        <div xmlns="" class="kupu-toolboxes">
+          <div class="kupu-toolbox" id="kupu-toolbox-properties">
+            <h1>Properties</h1>
+            <div class="kupu-toolbox-label">Title:</div>
+            <input class="wide" id="kupu-properties-title"/>
+            <div class="kupu-toolbox-label">Description:</div>
+            <textarea class="wide" id="kupu-properties-description"> </textarea>
+          </div>
+          <div class="kupu-toolbox" id="kupu-toolbox-links">
+            <h1 xmlns:i18n="http://xml.zope.org/namespaces/i18n" i18n:translate="links">Links</h1>
+            <div id="kupu-toolbox-addlink">
+              <div class="kupu-toolbox-label">
+                <span xmlns:i18n="http://xml.zope.org/namespaces/i18n" i18n:translate="items-matching-keyword">
+            Link the highlighted text to this URL:
+          </span>
+              </div>
+              <input id="kupu-link-input" class="wide" type="text"/>
+              <div class="kupu-toolbox-buttons">
+                <button type="button" id="kupu-link-button" class="kupu-toolbox-action">Make Link</button>
+              </div>
+            </div>
+          </div>
+          <div class="kupu-toolbox" id="kupu-toolbox-images">
+            <h1 xmlns:i18n="http://xml.zope.org/namespaces/i18n" i18n:translate="images">Images</h1>
+            <div class="kupu-toolbox-label">
+              <span xmlns:i18n="http://xml.zope.org/namespaces/i18n" i18n:translate="">
+                Insert image at the following URL:
+              </span>
+            </div>
+            <input id="kupu-image-input" value="kupuimages/kupu_icon.gif" class="wide" type="text"/>
+            <span xmlns:i18n="http://xml.zope.org/namespaces/i18n" i18n:translate="">
+              Image float:
+            </span>
+            <select class="wide" id="kupu-image-float-select">
+              <option value="none">No float</option>
+              <option value="left">Left</option>
+              <option value="right">Right</option>
+            </select>
+            <div class="kupu-toolbox-buttons">
+              <button type="button" id="kupu-image-addbutton" class="kupu-toolbox-action">Insert Image</button>
+            </div>
+          </div>
+          <div class="kupu-toolbox" id="kupu-toolbox-tables">
+            <h1 xmlns:i18n="http://xml.zope.org/namespaces/i18n" i18n:translate="table-inspector">Tables</h1>
+            <div class="kupu-toolbox-label">Table Class:
+        <select class="wide" id="kupu-table-classchooser"> </select>
+      </div>
+            <div id="kupu-toolbox-addtable">
+              <div class="kupu-toolbox-label">Rows:</div>
+              <input class="wide" type="text" id="kupu-table-newrows"/>
+              <div class="kupu-toolbox-label">Columns:</div>
+              <input class="wide" type="text" id="kupu-table-newcols"/>
+              <div class="kupu-toolbox-label">
+          Headings:
+          <input name="kupu-table-makeheader" id="kupu-table-makeheader" type="checkbox"/>
+          <label for="kupu-table-makeheader">Create</label>
+        </div>
+              <div class="kupu-toolbox-buttons">
+                <button type="button" id="kupu-table-fixall-button">Fix Table</button>
+                <button type="button" id="kupu-table-addtable-button">Add Table</button>
+              </div>
+            </div>
+            <div id="kupu-toolbox-edittable">
+              <div class="kupu-toolbox-label">Col Align:
+            <select class="wide" id="kupu-table-alignchooser"><option value="left">Left</option><option value="center">Center</option><option value="right">Right</option></select>
+          </div>
+              <div class="kupu-toolbox-buttons">
+                <br/>
+                <button type="button" id="kupu-table-addcolumn-button">Add Column</button>
+                <button type="button" id="kupu-table-delcolumn-button">Remove Column</button>
+                <br/>
+                <button type="button" id="kupu-table-addrow-button">Add Row</button>
+                <button type="button" id="kupu-table-delrow-button">Remove Row</button>
+                <button type="button" id="kupu-table-fix-button">Fix</button>
+              </div>
+            </div>
+          </div>
+          <div class="kupu-toolbox" id="kupu-toolbox-debug">
+            <h1 xmlns:i18n="http://xml.zope.org/namespaces/i18n" i18n:translate="debug-log">Debug Log</h1>
+            <div id="kupu-toolbox-debuglog" class="kupu-toolbox-label">
+      </div>
+          </div>
+        </div>
+        <table id="kupu-colorchooser" cellpadding="0" cellspacing="0" style="position: fixed; border-style: solid; border-color: black; border-width: 1px;">
+    </table>
+        <div class="kupu-editorframe">
+		  #if($document.getUri())
+			#set($src= "$graffitoTools.getViewerServlet()?uri=$document.getUri()")
+		  #else
+			#set($src= "")
+		  #end			
+          <iframe id="kupu-editor" frameborder="0" src="$!src" scrolling="auto">
+      </iframe>
+          <textarea class="kupu-editor-textarea" id="kupu-editor-textarea"> </textarea>
+        </div>
+      </div>
+    </form>
+  </body>
+</html>

Modified: incubator/graffito/trunk/applications/browser/src/webapp/kupu/kupuinit_form.js
URL: http://svn.apache.org/viewcvs/incubator/graffito/trunk/applications/browser/src/webapp/kupu/kupuinit_form.js?view=diff&r1=154903&r2=154904
==============================================================================
--- incubator/graffito/trunk/applications/browser/src/webapp/kupu/kupuinit_form.js (original)
+++ incubator/graffito/trunk/applications/browser/src/webapp/kupu/kupuinit_form.js Tue Feb 22 14:53:29 2005
@@ -223,7 +223,8 @@
     function prepareForm() {
         var drawer = document.getElementById('kupu-librarydrawer');
         drawer.parentNode.removeChild(drawer);
-        kupu.prepareForm(savebutton.form, 'kupu');
+        kupu.prepareForm(savebutton.form, 'content');
+        savebutton.form.action = savebutton.form.action + "?document.save";      
         savebutton.form.submit();
     };
     addEventHandler(savebutton, 'click', prepareForm, kupu);

Modified: incubator/graffito/trunk/applications/browser/src/webapp/kupu/kupustart_form.js
URL: http://svn.apache.org/viewcvs/incubator/graffito/trunk/applications/browser/src/webapp/kupu/kupustart_form.js?view=diff&r1=154903&r2=154904
==============================================================================
--- incubator/graffito/trunk/applications/browser/src/webapp/kupu/kupustart_form.js (original)
+++ incubator/graffito/trunk/applications/browser/src/webapp/kupu/kupustart_form.js Tue Feb 22 14:53:29 2005
@@ -11,7 +11,7 @@
 // $Id$
 
 function startKupu() {
-    var frame = document.getElementById('kupu-editor-textarea'); 
+    var frame = document.getElementById('kupu-editor'); 
     var kupu = initKupu(frame);
     kupu.initialize();