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 2006/10/09 21:28:32 UTC

svn commit: r454522 [9/10] - in /incubator/graffito/trunk: applications/browser/src/java/org/apache/portals/graffito/servlets/ applications/browser/src/java/org/apache/portals/graffito/servlets/browser/ applications/browser/src/webapp/META-INF/ applica...

Added: incubator/graffito/trunk/applications/browser/src/webapp/kupu-1.3.5/kupumacros.html
URL: http://svn.apache.org/viewvc/incubator/graffito/trunk/applications/browser/src/webapp/kupu-1.3.5/kupumacros.html?view=auto&rev=454522
==============================================================================
--- incubator/graffito/trunk/applications/browser/src/webapp/kupu-1.3.5/kupumacros.html (added)
+++ incubator/graffito/trunk/applications/browser/src/webapp/kupu-1.3.5/kupumacros.html Mon Oct  9 14:28:27 2006
@@ -0,0 +1,611 @@
+
+  
+    
+    <html xmlns="http://www.w3.org/1999/xhtml" xmlns:tal="http://xml.zope.org/namespaces/tal" tal:define="kupu_url here/absolute_url;                       document_url here/fulldoc/absolute_url;">
+
+      
+    <head>
+      <metal:macro xmlns:metal="http://xml.zope.org/namespaces/metal" define-macro="head">
+      
+      
+    <link rel="stylesheet" type="text/css" href="kupustyles.css" tal:attributes="href string:${kupu_url}/kupustyles.css"/>
+  
+      
+    <script type="text/javascript" src="sarissa.js" tal:attributes="src string:${kupu_url}/sarissa.js"> </script>
+    <script type="text/javascript" src="kupuhelpers.js" tal:attributes="src string:${kupu_url}/kupuhelpers.js"> </script>
+    <script type="text/javascript" src="kupueditor.js" tal:attributes="src string:${kupu_url}/kupueditor.js"> </script>
+    <script type="text/javascript" src="kupubasetools.js" tal:attributes="src string:${kupu_url}/kupubasetools.js"> </script>
+    <script type="text/javascript" src="kupuloggers.js" tal:attributes="src string:${kupu_url}/kupuloggers.js"> </script>
+    <script type="text/javascript" src="kupunoi18n.js" tal:attributes="src string:${kupu_url}/kupunoi18n.js"> </script>
+    <script type="text/javascript" src="kupucontentfilters.js" tal:attributes="src string:${kupu_url}/kupucontentfilters.js"> </script>
+    <script type="text/javascript" src="kupuspellchecker.js" tal:attributes="src string:${kupu_url}/kupuspellchecker.js"> </script>
+    <script type="text/javascript" src="kuputoolcollapser.js" tal:attributes="src string:${kupu_url}/kuputoolcollapser.js"> </script>
+    <script type="text/javascript" src="kupucleanupexpressions.js" tal:attributes="src string:${kupu_url}/kupucleanupexpressions.js"> </script>
+  
+      <metal:slot define-slot="saveonpart">
+        
+    <script type="text/javascript" src="kupusaveonpart.js" tal:attributes="src string:${kupu_url}/kupusaveonpart.js"> </script>
+  
+      </metal:slot>
+      <metal:slot define-slot="sourceedit">
+        
+    <script type="text/javascript" src="kupusourceedit.js" tal:attributes="src string:${kupu_url}/kupusourceedit.js"> </script>
+  
+      </metal:slot>
+      <metal:slot define-slot="contextmenu">
+        
+    <script type="text/javascript" src="kupucontextmenu.js" tal:attributes="src string:${kupu_url}/kupucontextmenu.js"> </script>
+  
+      </metal:slot>
+      <metal:slot define-slot="drawers">
+        
+    <link rel="stylesheet" type="text/css" href="kupudrawerstyles.css" tal:attributes="href string:${kupu_url}/kupudrawerstyles.css"/>
+  
+        
+    <script type="text/javascript" src="kupudrawers.js" tal:attributes="src string:${kupu_url}/kupudrawers.js"> </script>
+  
+      </metal:slot>
+      <metal:slot define-slot="bootstrap-editor">
+        
+    <script type="text/javascript" src="kupuinit.js" tal:attributes="src string:${kupu_url}/kupuinit.js"> </script>
+    <script type="text/javascript" src="kupustart.js" tal:attributes="src string:${kupu_url}/kupustart.js"> </script>
+  
+      </metal:slot>
+    </metal:macro>
+    </head>
+  
+    <body onload="kupu = startKupu()">
+      <h1 xmlns:i18n="http://xml.zope.org/namespaces/i18n" i18n:translate="">Kupu Editor Test Page</h1>
+      <metal:macro xmlns:metal="http://xml.zope.org/namespaces/metal" define-macro="xmlconfig">
+      
+    <div style="display: none;">
+      <xml id="kupuconfig" class="kupuconfig">
+        <kupuconfig>
+          <metal:slot define-slot="config_default">
+      
+    <dst><metal:block define-slot="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>
+    <cleanup_expressions>
+      <set>
+        <name>Convert single quotes to curly ones</name>
+        <expression>
+          <reg>
+            (\W)'
+          </reg>
+          <replacement>
+            \1&#8216;
+          </replacement>
+        </expression>
+        <expression>
+          <reg>
+            '
+          </reg>
+          <replacement>
+            &#8217;
+          </replacement>
+        </expression>
+      </set>
+      <set>
+        <name>Reduce whitespace</name>
+        <expression>
+          <reg>
+            [\n\r\t]
+          </reg>
+          <replacement>
+            \x20
+          </replacement>
+        </expression>
+        <expression>
+          <reg>
+            [ ]{2}
+          </reg>
+          <replacement>
+            \x20
+          </replacement>
+        </expression>
+      </set>
+    </cleanup_expressions>
+  
+    </metal:slot><metal:slot define-slot="config_drawers">
+      
+    <image_xsl_uri tal:content="string:${kupu_url}/kupudrawers/drawer.xsl">kupudrawers/drawer.xsl</image_xsl_uri>
+    <link_xsl_uri tal:content="string:${kupu_url}/kupudrawers/drawer.xsl">kupudrawers/drawer.xsl</link_xsl_uri>
+    <image_libraries_uri tal:content="string:${kupu_url}/kupudrawers/imagelibrary.xml">kupudrawers/imagelibrary.xml</image_libraries_uri>
+    <link_libraries_uri tal:content="string:${kupu_url}/kupudrawers/linklibrary.xml">kupudrawers/linklibrary.xml</link_libraries_uri>
+    <search_images_uri> </search_images_uri>
+    <search_links_uri> </search_links_uri>
+  
+    </metal:slot><metal:slot define-slot="config_extra"/>
+        </kupuconfig>
+      </xml>
+    </div>
+  
+    </metal:macro><metal:macro xmlns:metal="http://xml.zope.org/namespaces/metal" define-macro="fulleditor">
+      
+    <div class="kupu-fulleditor">
+      <metal:slot define-slot="toolbar">
+      
+    <div class="kupu-tb" id="toolbar">
+      
+    <span id="kupu-tb-buttons" class="kupu-tb-buttons">
+      <metal:slot define-slot="buttongroup_logo">
+      
+    <span class="kupu-tb-buttongroup kupu-logo" style="float: right" id="kupu-logo">
+      <button xmlns:i18n="http://xml.zope.org/namespaces/i18n" type="button" class="kupu-logo" title="Kupu 1.3.5" i18n:attributes="title" accesskey="k" onclick="window.open('http://kupu.oscom.org');">&#160;</button>
+    </span>
+  
+    </metal:slot><metal:slot define-slot="buttongroup_zoom">
+      
+    <span class="kupu-tb-buttongroup" style="float: right" id="kupu-zoom">
+      <button xmlns:i18n="http://xml.zope.org/namespaces/i18n" type="button" class="kupu-zoom" id="kupu-zoom-button" i18n:attributes="title" title="zoom: alt-x" accesskey="x">&#160;</button>
+    </span>
+  
+    </metal:slot><metal:slot define-slot="tb_select_styles">
+      
+    <select id="kupu-tb-styles">
+      <option xmlns:i18n="http://xml.zope.org/namespaces/i18n" value="P" i18n:translate="">
+        Normal
+      </option>
+      <option value="H1">
+        <span xmlns:i18n="http://xml.zope.org/namespaces/i18n" i18n:translate="">Heading 1</span>
+      </option>
+      <option value="H2">
+        <span xmlns:i18n="http://xml.zope.org/namespaces/i18n" i18n:translate="">Heading 2</span>
+      </option>
+      <option value="H3">
+        <span xmlns:i18n="http://xml.zope.org/namespaces/i18n" i18n:translate="">Heading 3</span>
+      </option>
+      <option value="H4">
+        <span xmlns:i18n="http://xml.zope.org/namespaces/i18n" i18n:translate="">Heading 4</span>
+      </option>
+      <option value="H5">
+        <span xmlns:i18n="http://xml.zope.org/namespaces/i18n" i18n:translate="">Heading 5</span>
+      </option>
+      <option value="H6">
+        <span xmlns:i18n="http://xml.zope.org/namespaces/i18n" i18n:translate="">Heading 6</span>
+      </option>
+      <option xmlns:i18n="http://xml.zope.org/namespaces/i18n" value="PRE" i18n:translate="">
+        Formatted
+      </option>
+    </select>
+  
+    </metal:slot><metal:slot define-slot="buttongroup_save">
+      
+    <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">&#160;</button>
+    </span>
+  
+    </metal:slot><metal:slot define-slot="buttongroup_basicmarkup">
+      
+    <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">&#160;</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">&#160;</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">&#160;</button>
+    </span>
+  
+    </metal:slot><metal:slot define-slot="buttongroup_subsuper">
+      
+    <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="-">&#160;</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="+">&#160;</button>
+    </span>
+  
+    </metal:slot><metal:slot define-slot="buttongroup_color">
+      
+    <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">&#160;</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">&#160;</button>
+    </span>
+  
+    </metal:slot><metal:slot define-slot="buttongroup_justify">
+      
+    <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">&#160;</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">&#160;</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">&#160;</button>
+    </span>
+  
+    </metal:slot><metal:slot define-slot="buttongroup_list">
+      
+              <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="#">&#160;</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="*">&#160;</button>
+              </span>
+  
+    </metal:slot><metal:slot define-slot="buttongroup_definitionlist">
+      
+    <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="=">&#160;</button>
+    </span>
+  
+    </metal:slot><metal:slot define-slot="buttongroup_indent">
+      
+    <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;">&#160;</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;">&#160;</button>
+    </span>
+  
+    </metal:slot><metal:slot define-slot="buttongroup_drawers">
+      
+    <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">&#160;</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">&#160;</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">&#160;</button>
+      <button xmlns:i18n="http://xml.zope.org/namespaces/i18n" type="button" class="kupu-table" id="kupu-tabledrawer-button" title="table" i18n:attributes="title">&#160;</button>
+    </span>
+  
+    </metal:slot><metal:slot define-slot="buttongroup_remove">
+      
+    <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">&#160;</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">&#160;</button>
+    </span>
+  
+    </metal:slot><metal:slot define-slot="buttongroup_undo">
+      
+    <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">&#160;</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">&#160;</button>
+    </span>
+  
+    </metal:slot><metal:slot define-slot="buttongroup_source">
+      
+    <span class="kupu-tb-buttongroup kupu-source-span" 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" accesskey="h">&#160;</button>
+    </span>
+  
+    </metal:slot><metal:slot define-slot="buttongroup_spellchecker">
+      
+    <span class="kupu-tb-buttongroup kupu-spellchecker-span" id="kupu-spellchecker">
+      <button xmlns:i18n="http://xml.zope.org/namespaces/i18n" type="button" class="kupu-spellchecker" id="kupu-spellchecker-button" title="check spelling" i18n:attributes="title">&#160;</button>
+    </span>
+  
+    </metal:slot><metal:slot define-slot="buttongroup_extra"/>
+    </span>
+  <metal:slot define-slot="tb_select_liststyle">
+      
+    <select id="kupu-ulstyles" class="kupu-ulstyles">
+      <option xmlns:i18n="http://xml.zope.org/namespaces/i18n" value="disc" i18n:translate="list-disc">&#9679;</option>
+      <option xmlns:i18n="http://xml.zope.org/namespaces/i18n" value="square" i18n:translate="list-square">&#9632;</option>
+      <option xmlns:i18n="http://xml.zope.org/namespaces/i18n" value="circle" i18n:translate="list-circle">&#9675;</option>
+      <option xmlns:i18n="http://xml.zope.org/namespaces/i18n" value="none" i18n:translate="list-nobullet">no bullet</option>
+    </select>
+    <select id="kupu-olstyles" class="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>
+  
+    </metal:slot><metal:slot define-slot="drawers">
+      
+    <metal:slot define-slot="librarydrawer">
+      
+    <div style="display:block;" class="kupu-librarydrawer-parent">
+
+    </div>
+  
+    </metal:slot><metal:slot define-slot="linkdrawer">
+      
+    <div id="kupu-linkdrawer" class="kupu-drawer kupu-linkdrawer">
+      <h1 xmlns:i18n="http://xml.zope.org/namespaces/i18n" i18n:translate="">External Link</h1>
+
+      <div id="kupu-linkdrawer-addlink" class="kupu-panels kupu-linkdrawer-addlink">
+        <table cellspacing="0">
+        <tr><td><div class="kupu-toolbox-label">
+          
+          <span xmlns:i18n="http://xml.zope.org/namespaces/i18n" i18n:translate="">
+            Link the highlighted text to this URL:
+          </span>
+        </div>
+
+        <input class="kupu-toolbox-st kupu-linkdrawer-input" type="text" onkeypress="return HandleDrawerEnter(event, 'linkdrawer-preview');"/>
+        </td>
+        <td class="kupu-preview-button">
+          <button xmlns:i18n="http://xml.zope.org/namespaces/i18n" class="kupu-dialog-button" type="button" id="linkdrawer-preview" onclick="drawertool.current_drawer.preview()" i18n:translate="">Preview</button>
+        </td></tr>
+        <tr><td colspan="2" align="center">
+        <iframe frameborder="1" scrolling="auto" width="440" height="198" class="kupu-linkdrawer-preview" src="kupublank.html">
+        </iframe>
+        </td></tr>
+        </table>
+
+        <div class="kupu-dialogbuttons">
+          <button xmlns:i18n="http://xml.zope.org/namespaces/i18n" class="kupu-dialog-button" type="button" onclick="drawertool.current_drawer.save()" i18n:translate="">Ok</button>
+          <button xmlns:i18n="http://xml.zope.org/namespaces/i18n" class="kupu-dialog-button" type="button" onclick="drawertool.closeDrawer()" i18n:translate="">Cancel</button>
+        </div>
+
+      </div>
+    </div>
+  
+    </metal:slot><metal:slot define-slot="tabledrawer">
+      
+    <div id="kupu-tabledrawer" class="kupu-drawer kupu-tabledrawer">
+    <h1 xmlns:i18n="http://xml.zope.org/namespaces/i18n" i18n:translate="tabledrawer_title">Table</h1>
+    <div class="kupu-panels">
+      <table width="300">
+        <tr class="kupu-panelsrow">
+          <td class="kupu-panel">
+            
+            <div class="kupu-tabledrawer-addtable">
+              <table>
+                <tr>
+                  <th xmlns:i18n="http://xml.zope.org/namespaces/i18n" i18n:translate="tabledrawer_class_label" class="kupu-toolbox-label">Table Class</th>
+                  <td>
+                    <select class="kupu-tabledrawer-addclasschooser">
+                      <option xmlns:i18n="http://xml.zope.org/namespaces/i18n" i18n:translate="" value="plain">Plain</option>
+                      <option xmlns:i18n="http://xml.zope.org/namespaces/i18n" i18n:translate="" value="listing">Listing</option>
+                      <option xmlns:i18n="http://xml.zope.org/namespaces/i18n" i18n:translate="" value="grid">Grid</option>
+                      <option xmlns:i18n="http://xml.zope.org/namespaces/i18n" i18n:translate="" value="data">Data</option>
+                    </select>
+                  </td>
+                </tr>
+                <tr>
+                  <th xmlns:i18n="http://xml.zope.org/namespaces/i18n" i18n:translate="tabledrawer_rows_label" class="kupu-toolbox-label">Rows</th>
+                  <td><input type="text" class="kupu-tabledrawer-newrows" onkeypress="return HandleDrawerEnter(event);"/></td>
+                </tr>
+                <tr>
+                  <th xmlns:i18n="http://xml.zope.org/namespaces/i18n" i18n:translate="tabledrawer_columns_label" class="kupu-toolbox-label">Columns</th>
+                  <td><input type="text" class="kupu-tabledrawer-newcols" onkeypress="return HandleDrawerEnter(event);"/></td>
+                </tr>
+                <tr>
+                  <th class="kupu-toolbox-label"> </th>
+                  <td>
+                    <label><input class="kupu-tabledrawer-makeheader" type="checkbox" onkeypress="return HandleDrawerEnter(event);"/>
+                    <span xmlns:i18n="http://xml.zope.org/namespaces/i18n" i18n:translate="tabledrawer_headings_label">Create Headings</span></label>
+                  </td>
+                </tr>
+                <tr>
+                  <th class="kupu-toolbox-label"> </th>
+                  <td>
+                      <button xmlns:i18n="http://xml.zope.org/namespaces/i18n" class="kupu-dialog-button" type="button" i18n:translate="tabledrawer_add_table_button" onclick="drawertool.current_drawer.createTable()">Add Table</button>
+                      <button xmlns:i18n="http://xml.zope.org/namespaces/i18n" class="kupu-dialog-button" type="button" i18n:translate="tabledrawer_fix_tables_button" onclick="drawertool.current_drawer.fixAllTables()">Fix All Tables</button>
+                  </td>
+                </tr>
+              </table>
+            </div>
+
+            
+            <div class="kupu-tabledrawer-edittable">
+              <table>
+                <tr>
+                  <th xmlns:i18n="http://xml.zope.org/namespaces/i18n" class="kupu-toolbox-label" i18n:translate="tabledrawer_class_label">Table Class</th>
+                  <td>
+                    <select class="kupu-tabledrawer-editclasschooser" onchange="drawertool.current_drawer.setTableClass(this.options[this.selectedIndex].value)">
+                      <option xmlns:i18n="http://xml.zope.org/namespaces/i18n" i18n:translate="" value="plain">Plain</option>
+                      <option xmlns:i18n="http://xml.zope.org/namespaces/i18n" i18n:translate="" value="listing">Listing</option>
+                      <option xmlns:i18n="http://xml.zope.org/namespaces/i18n" i18n:translate="" value="grid">Grid</option>
+                      <option xmlns:i18n="http://xml.zope.org/namespaces/i18n" i18n:translate="" value="data">Data</option>
+                    </select>
+                  </td>
+                </tr>
+                <tr>
+                  <th xmlns:i18n="http://xml.zope.org/namespaces/i18n" class="kupu-toolbox-label" i18n:translate="tabledrawer_alignment_label">Current column alignment</th>
+                  <td>
+                    <select id="kupu-tabledrawer-alignchooser" class="kupu-tabledrawer-alignchooser" onchange="drawertool.current_drawer.tool.setColumnAlign(this.options[this.selectedIndex].value)">
+                      <option xmlns:i18n="http://xml.zope.org/namespaces/i18n" i18n:translate="tabledrawer_left_option" value="left">Left</option>
+                      <option xmlns:i18n="http://xml.zope.org/namespaces/i18n" i18n:translate="tabledrawer_center_option" value="center">Center</option>
+                      <option xmlns:i18n="http://xml.zope.org/namespaces/i18n" i18n:translate="tabledrawer_right_option" value="right">Right</option>
+                      </select>
+                  </td>
+                </tr>
+                <tr>
+                  <th xmlns:i18n="http://xml.zope.org/namespaces/i18n" class="kupu-toolbox-label" i18n:translate="tabledrawer_column_label">Column</th>
+                  <td>
+                    <button xmlns:i18n="http://xml.zope.org/namespaces/i18n" class="kupu-dialog-button" type="button" i18n:translate="tabledrawer_add_button" onclick="drawertool.current_drawer.addTableColumn()">Add</button>
+                    <button xmlns:i18n="http://xml.zope.org/namespaces/i18n" class="kupu-dialog-button" type="button" i18n:translate="tabledrawer_remove_button" onclick="drawertool.current_drawer.delTableColumn()">Remove</button>
+                  </td>
+                </tr>
+                <tr>
+                  <th xmlns:i18n="http://xml.zope.org/namespaces/i18n" class="kupu-toolbox-label" i18n:translate="tabledrawer_row_label">Row</th>
+                  <td>
+                    <button xmlns:i18n="http://xml.zope.org/namespaces/i18n" class="kupu-dialog-button" type="button" i18n:translate="tabledrawer_add_button" onclick="drawertool.current_drawer.addTableRow()">Add</button> 
+                    <button xmlns:i18n="http://xml.zope.org/namespaces/i18n" class="kupu-dialog-button" type="button" i18n:translate="tabledrawer_remove_button" onclick="drawertool.current_drawer.delTableRow()">Remove</button>
+                  </td>
+                </tr>
+                <tr>
+                  <th xmlns:i18n="http://xml.zope.org/namespaces/i18n" class="kupu-toolbox-label" i18n:translate="tabledrawer_fix_table_label">Fix Table</th>
+                  <td>
+                    <button xmlns:i18n="http://xml.zope.org/namespaces/i18n" class="kupu-dialog-button" type="button" i18n:translate="tabledrawer_fix_button" onclick="drawertool.current_drawer.fixTable()">Fix</button> 
+                  </td>
+                </tr>
+              </table>
+            </div>
+          </td>
+        </tr>
+      </table>
+      <div class="kupu-dialogbuttons">
+        <button xmlns:i18n="http://xml.zope.org/namespaces/i18n" class="kupu-dialog-button" type="button" onfocus="window.status='focus';" onmousedown="window.status ='onmousedown';" i18n:translate="tabledrawer_close_button" onclick="drawertool.closeDrawer(this)">Close</button>
+      </div>
+    </div>
+    </div>
+
+  
+    </metal:slot><metal:slot define-slot="extradrawer"/>
+  
+    </metal:slot>
+    </div>
+  
+    </metal:slot><metal:slot define-slot="toolboxes">
+      
+    <div class="kupu-toolboxes" id="kupu-toolboxes">
+      <metal:slot define-slot="toolbox_properties">
+      
+    <div class="kupu-toolbox" id="kupu-toolbox-properties">
+      <h1 xmlns:i18n="http://xml.zope.org/namespaces/i18n" class="kupu-toolbox-heading" i18n:translate="">Properties</h1>
+
+      <div>
+        <div xmlns:i18n="http://xml.zope.org/namespaces/i18n" class="kupu-toolbox-label" i18n:translate="">Title:</div>
+        <input class="wide" id="kupu-properties-title"/>
+        <div xmlns:i18n="http://xml.zope.org/namespaces/i18n" class="kupu-toolbox-label" i18n:translate="">Description:</div>
+        <textarea class="wide" id="kupu-properties-description"> </textarea>
+      </div>
+    </div>
+  
+    </metal:slot><metal:slot define-slot="toolbox_links">
+      
+    <div class="kupu-toolbox" id="kupu-toolbox-links">
+      <h1 xmlns:i18n="http://xml.zope.org/namespaces/i18n" class="kupu-toolbox-heading" i18n:translate="">Links</h1>
+
+      <div id="kupu-toolbox-addlink">
+        <div class="kupu-toolbox-label">
+          
+          <span xmlns:i18n="http://xml.zope.org/namespaces/i18n" i18n:translate="">
+            Link the highlighted text to this URL:
+          </span>
+        </div>
+
+        <input id="kupu-link-input" class="wide" type="text"/>
+        <div class="kupu-toolbox-buttons">
+          <button xmlns:i18n="http://xml.zope.org/namespaces/i18n" type="button" id="kupu-link-button" class="kupu-toolbox-action" i18n:translate="">Make Link</button>
+        </div>
+      </div>
+    </div>
+  
+    </metal:slot><metal:slot define-slot="toolbox_images">
+      
+    <div class="kupu-toolbox" id="kupu-toolbox-images">
+      <h1 xmlns:i18n="http://xml.zope.org/namespaces/i18n" class="kupu-toolbox-heading" i18n:translate="">Images</h1>
+
+      <div>
+        <div class="kupu-toolbox-label">
+          <span xmlns:i18n="http://xml.zope.org/namespaces/i18n" i18n:translate="">Image class:</span>
+        </div>
+        <select class="wide" id="kupu-image-float-select">
+          <option xmlns:i18n="http://xml.zope.org/namespaces/i18n" value="image-inline" i18n:translate="">Inline</option>
+          <option xmlns:i18n="http://xml.zope.org/namespaces/i18n" value="image-left" i18n:translate="">Left</option>
+          <option xmlns:i18n="http://xml.zope.org/namespaces/i18n" value="image-right" i18n:translate="">Right</option>
+        </select>
+
+        <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"/>
+
+        <div class="kupu-toolbox-buttons">
+          <button xmlns:i18n="http://xml.zope.org/namespaces/i18n" type="button" id="kupu-image-addbutton" class="kupu-toolbox-action" i18n:translate="">Insert Image</button>
+        </div>
+      </div>
+    </div>
+  
+    </metal:slot><metal:slot define-slot="toolbox_tables">
+      
+    <div class="kupu-toolbox" id="kupu-toolbox-tables">
+      <h1 xmlns:i18n="http://xml.zope.org/namespaces/i18n" class="kupu-toolbox-heading" i18n:translate="">Tables</h1>
+
+      <div>
+      <div class="kupu-toolbox-label">
+        <span xmlns:i18n="http://xml.zope.org/namespaces/i18n" i18n:translate="">Table Class:</span>
+        <select class="wide" id="kupu-table-classchooser"> </select>
+      </div>
+
+      <div id="kupu-toolbox-addtable" class="kupu-toolbox-addtable">
+        <div xmlns:i18n="http://xml.zope.org/namespaces/i18n" class="kupu-toolbox-label" i18n:translate="">Rows:</div>
+        <input class="wide" type="text" id="kupu-table-newrows"/>
+
+        <div xmlns:i18n="http://xml.zope.org/namespaces/i18n" class="kupu-toolbox-label" i18n:translate="">Columns:</div>
+        <input class="wide" type="text" id="kupu-table-newcols"/>
+
+        <div class="kupu-toolbox-label">
+          <span xmlns:i18n="http://xml.zope.org/namespaces/i18n" i18n:translate="">Headings:</span>
+          <input name="kupu-table-makeheader" id="kupu-table-makeheader" type="checkbox"/>
+          <label xmlns:i18n="http://xml.zope.org/namespaces/i18n" for="kupu-table-makeheader" i18n:translate="">Create</label>
+        </div>
+
+        <div class="kupu-toolbox-buttons">
+          <button xmlns:i18n="http://xml.zope.org/namespaces/i18n" type="button" id="kupu-table-fixall-button" i18n:translate="">Fix Table</button> 
+          <button xmlns:i18n="http://xml.zope.org/namespaces/i18n" type="button" id="kupu-table-addtable-button" i18n:translate="">Add Table</button> 
+        </div>
+
+      </div>
+
+      <div id="kupu-toolbox-edittable" class="kupu-toolbox-edittable">
+      
+          <div class="kupu-toolbox-label">
+            <span xmlns:i18n="http://xml.zope.org/namespaces/i18n" i18n:translate="">Col Align:</span>
+            <select class="wide" id="kupu-table-alignchooser">
+              <option xmlns:i18n="http://xml.zope.org/namespaces/i18n" value="left" i18n:translate="">Left</option>
+              <option xmlns:i18n="http://xml.zope.org/namespaces/i18n" value="center" i18n:translate="">Center</option>
+              <option xmlns:i18n="http://xml.zope.org/namespaces/i18n" value="right" i18n:translate="">Right</option>
+            </select>
+          </div>
+      
+          <div class="kupu-toolbox-buttons">
+            <br/>
+            <button xmlns:i18n="http://xml.zope.org/namespaces/i18n" type="button" id="kupu-table-addcolumn-button" i18n:translate="">Add Column</button>
+            <button xmlns:i18n="http://xml.zope.org/namespaces/i18n" type="button" id="kupu-table-delcolumn-button" i18n:translate="">Remove Column</button>
+            
+            <br/>
+            <button xmlns:i18n="http://xml.zope.org/namespaces/i18n" type="button" id="kupu-table-addrow-button" i18n:translate="">Add Row</button>
+            <button xmlns:i18n="http://xml.zope.org/namespaces/i18n" type="button" id="kupu-table-delrow-button" i18n:translate="">Remove Row</button>
+          
+            <button xmlns:i18n="http://xml.zope.org/namespaces/i18n" type="button" id="kupu-table-fix-button" i18n:translate="">Fix</button>
+          </div>
+          
+      </div>
+      </div>
+
+    </div>
+  
+    </metal:slot><metal:slot define-slot="toolbox_cleanup">
+      
+    <div class="kupu-toolbox" id="kupu-toolbox-cleanupexpressions">
+      <h1 xmlns:i18n="http://xml.zope.org/namespaces/i18n" class="kupu-toolbox-heading" i18n:translate="">Cleanup expressions</h1>
+
+      <div>
+        <div class="kupu-toolbox-label">
+          <span xmlns:i18n="http://xml.zope.org/namespaces/i18n" i18n:translate="">
+            Select a cleanup action:
+          </span>
+        </div>
+
+        <select id="kupucleanupexpressionselect" class="kupu-toolbox-st">
+        </select>
+        <div style="text-align: center">
+          <button type="button" id="kupucleanupexpressionbutton" class="kupu-toolbox-action">Perform action</button>
+        </div>
+      </div>
+    </div>
+  
+    </metal:slot><metal:slot define-slot="toolbox_extra"/><metal:slot define-slot="toolbox_debug">
+      
+    <div class="kupu-toolbox" id="kupu-toolbox-debug">
+      <h1 xmlns:i18n="http://xml.zope.org/namespaces/i18n" class="kupu-toolbox-heading" i18n:translate="">Debug Log</h1>
+      <div id="kupu-toolbox-debuglog" class="kupu-toolbox-label">
+      </div>
+    </div>
+  
+    </metal:slot>
+    </div>
+  
+    </metal:slot><metal:slot define-slot="colorchooser">
+      
+    <table id="kupu-colorchooser" cellpadding="0" cellspacing="0" style="position: fixed; border-style: solid; border-color: black; border-width: 1px;">
+    </table>
+  
+    </metal:slot>
+    <div class="kupu-editorframe">
+      <form>
+        
+        <iframe metal:define-slot="editorframe" class="kupu-editor-iframe" id="kupu-editor" frameborder="0" scrolling="auto" src="fulldoc" tal:attributes="src document_url">
+        </iframe>
+        <textarea class="kupu-editor-textarea" id="kupu-editor-textarea"> </textarea>
+      </form>
+    </div>
+  
+    </div>
+  
+    </metal:macro>
+    </body>
+  
+
+    </html>
+  

Added: incubator/graffito/trunk/applications/browser/src/webapp/kupu-1.3.5/kupumulti.html
URL: http://svn.apache.org/viewvc/incubator/graffito/trunk/applications/browser/src/webapp/kupu-1.3.5/kupumulti.html?view=auto&rev=454522
==============================================================================
--- incubator/graffito/trunk/applications/browser/src/webapp/kupu-1.3.5/kupumulti.html (added)
+++ incubator/graffito/trunk/applications/browser/src/webapp/kupu-1.3.5/kupumulti.html Mon Oct  9 14:28:27 2006
@@ -0,0 +1,529 @@
+
+<html xmlns="http://www.w3.org/1999/xhtml" xmlns:i18n="http://xml.zope.org/namespaces/i18n" i18n:domain="kupu">
+
+  
+    <head>
+      
+    <title>Test Editor</title>
+    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
+  
+    <link href="kupustyles.css" rel="stylesheet" type="text/css"/>
+  
+    <link href="kupudrawerstyles.css" rel="stylesheet" type="text/css"/>
+  
+    <script type="text/javascript" src="sarissa.js"> </script>
+    <script type="text/javascript" src="sarissa_ieemu_xpath.js"> </script>
+    <script type="text/javascript" src="kupuhelpers.js"> </script>
+    <script type="text/javascript" src="kupueditor.js"> </script>
+    <script type="text/javascript" src="kupubasetools.js"> </script>
+    <script type="text/javascript" src="kupuloggers.js"> </script>
+    <script type="text/javascript" src="kupunoi18n.js"> </script>
+    <script type="text/javascript" src="../../i18n.js/i18n.js"> </script>
+    <script type="text/javascript" src="kupucleanupexpressions.js"> </script>
+    <script type="text/javascript" src="kupucontentfilters.js"> </script>
+    <script type="text/javascript" src="kuputoolcollapser.js"> </script>
+  
+    <script type="text/javascript" src="kupumultieditor.js"> </script>
+    <script type="text/javascript" src="kupuinit_multi.js"> </script>
+    <script type="text/javascript" src="kupustart_multi.js"> </script>
+  
+    <script type="text/javascript" src="kupusourceedit.js"> </script>
+  
+    <script type="text/javascript" src="kupuspellchecker.js"> </script>
+  
+    <script type="text/javascript" src="kupudrawers.js"> </script>
+  
+    </head>
+  
+    <body onload="kupu = startKupu()">
+      <h1>Kupu Editor Test Page</h1>
+      <form action="http://debris.demon.nl/printpost" method="POST">
+        
+    <div style="display: none;">
+      <xml id="kupuconfig" class="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>
+
+    <cleanup_expressions>
+      <set>
+        <name>Convert single quotes to curly ones</name>
+        <expression>
+          <reg>
+            (\W)'
+          </reg>
+          <replacement>
+            \1&#8216;
+          </replacement>
+        </expression>
+        <expression>
+          <reg>
+            '
+          </reg>
+          <replacement>
+            &#8217;
+          </replacement>
+        </expression>
+      </set>
+      <set>
+        <name>Reduce whitespace</name>
+        <expression>
+          <reg>
+            [\n\r\t]
+          </reg>
+          <replacement>
+            \x20
+          </replacement>
+        </expression>
+        <expression>
+          <reg>
+            [ ]{2}
+          </reg>
+          <replacement>
+            \x20
+          </replacement>
+        </expression>
+      </set>
+    </cleanup_expressions>
+  
+    <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" class="kupu-tb-buttons">
+      
+    <span class="kupu-tb-buttongroup kupu-logo" style="float: right" id="kupu-logo">
+      <button type="button" class="kupu-logo" title="Kupu 1.3.5" i18n:attributes="title" accesskey="k" onclick="window.open('http://kupu.oscom.org');">&#160;</button>
+    </span>
+  
+    <span class="kupu-tb-buttongroup" style="float: right" id="kupu-zoom">
+      <button type="button" class="kupu-zoom" id="kupu-zoom-button" i18n:attributes="title" title="zoom: alt-x" accesskey="x">&#160;</button>
+    </span>
+  
+    <select id="kupu-tb-styles">
+      <option value="P" i18n:translate="">
+        Normal
+      </option>
+      <option value="H1">
+        <span i18n:translate="">Heading 1</span>
+      </option>
+      <option value="H2">
+        <span i18n:translate="">Heading 2</span>
+      </option>
+      <option value="H3">
+        <span i18n:translate="">Heading 3</span>
+      </option>
+      <option value="H4">
+        <span i18n:translate="">Heading 4</span>
+      </option>
+      <option value="H5">
+        <span i18n:translate="">Heading 5</span>
+      </option>
+      <option value="H6">
+        <span i18n:translate="">Heading 6</span>
+      </option>
+      <option value="PRE" i18n:translate="">
+        Formatted
+      </option>
+    </select>
+  
+    <span class="kupu-tb-buttongroup">
+      <button type="button" class="kupu-save" id="kupu-save-button" title="Save" i18n:attributes="title" accesskey="s" onclick="kupu.prepareForm(this.form, 'kupu'); this.form.submit()">&#160;</button>
+    </span>
+  
+    <span class="kupu-tb-buttongroup" id="kupu-bg-basicmarkup">
+      <button type="button" class="kupu-bold" id="kupu-bold-button" title="bold: alt-b" i18n:attributes="title" accesskey="b">&#160;</button>
+      <button type="button" class="kupu-italic" id="kupu-italic-button" title="italic: alt-i" i18n:attributes="title" accesskey="i">&#160;</button>
+      <button type="button" class="kupu-underline" id="kupu-underline-button" title="underline: alt-u" i18n:attributes="title" accesskey="u">&#160;</button>
+    </span>
+  
+    <span class="kupu-tb-buttongroup" id="kupu-bg-subsuper">
+      <button type="button" class="kupu-subscript" id="kupu-subscript-button" title="subscript: alt--" i18n:attributes="title" accesskey="-">&#160;</button>
+      <button type="button" class="kupu-superscript" id="kupu-superscript-button" title="superscript: alt-+" i18n:attributes="title" accesskey="+">&#160;</button>
+    </span>
+  
+    <span class="kupu-tb-buttongroup">
+      
+      <button type="button" class="kupu-forecolor" id="kupu-forecolor-button" title="text color: alt-f" i18n:attributes="title" accesskey="f">&#160;</button>
+      <button type="button" class="kupu-hilitecolor" id="kupu-hilitecolor-button" title="background color: alt-h" i18n:attributes="title" accesskey="h">&#160;</button>
+    </span>
+  
+    <span class="kupu-tb-buttongroup" id="kupu-bg-justify">
+      <button type="button" class="kupu-justifyleft" id="kupu-justifyleft-button" title="left justify: alt-l" i18n:attributes="title" accesskey="l">&#160;</button>
+      <button type="button" class="kupu-justifycenter" id="kupu-justifycenter-button" title="center justify: alt-c" i18n:attributes="title" accesskey="c">&#160;</button>
+      <button type="button" class="kupu-justifyright" id="kupu-justifyright-button" title="right justify: alt-r" i18n:attributes="title" accesskey="r">&#160;</button>
+    </span>
+  
+              <span class="kupu-tb-buttongroup" id="kupu-bg-list">
+      
+      <button type="button" class="kupu-insertorderedlist" title="numbered list: alt-#" id="kupu-list-ol-addbutton" i18n:attributes="title" accesskey="#">&#160;</button>
+      <button type="button" class="kupu-insertunorderedlist" title="unordered list: alt-*" id="kupu-list-ul-addbutton" i18n:attributes="title" accesskey="*">&#160;</button>
+              </span>
+  
+    <span class="kupu-tb-buttongroup" id="kupu-bg-definitionlist">
+      
+      <button type="button" class="kupu-insertdefinitionlist" title="definition list: alt-=" id="kupu-list-dl-addbutton" i18n:attributes="title" accesskey="=">&#160;</button>
+    </span>
+  
+    <span class="kupu-tb-buttongroup" id="kupu-bg-indent">
+      <button type="button" class="kupu-outdent" id="kupu-outdent-button" title="outdent: alt-&lt;" i18n:attributes="title" accesskey="&lt;">&#160;</button>
+      <button type="button" class="kupu-indent" id="kupu-indent-button" title="indent: alt-&gt;" i18n:attributes="title" accesskey="&gt;">&#160;</button>
+    </span>
+  
+    <span class="kupu-tb-buttongroup">
+      <button type="button" class="kupu-image" id="kupu-imagelibdrawer-button" title="image" i18n:attributes="title">&#160;</button>
+      <button type="button" class="kupu-inthyperlink" id="kupu-linklibdrawer-button" title="internal link" i18n:attributes="title">&#160;</button>
+      <button type="button" class="kupu-exthyperlink" id="kupu-linkdrawer-button" title="external link" i18n:attributes="title">&#160;</button>
+      <button type="button" class="kupu-table" id="kupu-tabledrawer-button" title="table" i18n:attributes="title">&#160;</button>
+    </span>
+  
+    <span class="kupu-tb-buttongroup" id="kupu-bg-remove">
+      <button type="button" class="kupu-removeimage invisible" id="kupu-removeimage-button" title="Remove image" i18n:attributes="title">&#160;</button>
+      <button type="button" class="kupu-removelink invisible" id="kupu-removelink-button" title="Remove link" i18n:attributes="title">&#160;</button>
+    </span>
+  
+    <span class="kupu-tb-buttongroup" id="kupu-bg-undo">
+      <button type="button" class="kupu-undo" id="kupu-undo-button" title="undo: alt-z" i18n:attributes="title" accesskey="z">&#160;</button>
+      <button type="button" class="kupu-redo" id="kupu-redo-button" title="redo: alt-y" i18n:attributes="title" accesskey="y">&#160;</button>
+    </span>
+  
+    <span class="kupu-tb-buttongroup kupu-spellchecker-span" id="kupu-spellchecker">
+      <button type="button" class="kupu-spellchecker" id="kupu-spellchecker-button" title="check spelling" i18n:attributes="title">&#160;</button>
+    </span>
+  
+    <span class="kupu-tb-buttongroup kupu-source-span" id="kupu-source">
+      <button type="button" class="kupu-source" id="kupu-source-button" title="edit HTML code" i18n:attributes="title" accesskey="h">&#160;</button>
+    </span>
+  
+    </span>
+  
+    <select id="kupu-ulstyles" class="kupu-ulstyles">
+      <option value="disc" i18n:translate="list-disc">&#9679;</option>
+      <option value="square" i18n:translate="list-square">&#9632;</option>
+      <option value="circle" i18n:translate="list-circle">&#9675;</option>
+      <option value="none" i18n:translate="list-nobullet">no bullet</option>
+    </select>
+    <select id="kupu-olstyles" class="kupu-olstyles">
+      <option value="decimal" i18n:translate="list-decimal">1</option>
+      <option value="upper-roman" i18n:translate="list-upperroman">I</option>
+      <option value="lower-roman" i18n:translate="list-lowerroman">i</option>
+      <option value="upper-alpha" i18n:translate="list-upperalpha">A</option>
+      <option value="lower-alpha" i18n:translate="list-loweralpha">a</option>
+    </select>
+  
+    
+    <div style="display:block;" class="kupu-librarydrawer-parent">
+
+    </div>
+  
+    <div id="kupu-linkdrawer" class="kupu-drawer kupu-linkdrawer">
+      <h1 i18n:translate="">External Link</h1>
+
+      <div id="kupu-linkdrawer-addlink" class="kupu-panels kupu-linkdrawer-addlink">
+        <table cellspacing="0">
+        <tr><td><div class="kupu-toolbox-label">
+          
+          <span i18n:translate="">
+            Link the highlighted text to this URL:
+          </span>
+        </div>
+
+        <input class="kupu-toolbox-st kupu-linkdrawer-input" type="text" onkeypress="return HandleDrawerEnter(event, 'linkdrawer-preview');"/>
+        </td>
+        <td class="kupu-preview-button">
+          <button class="kupu-dialog-button" type="button" id="linkdrawer-preview" onclick="drawertool.current_drawer.preview()" i18n:translate="">Preview</button>
+        </td></tr>
+        <tr><td colspan="2" align="center">
+        <iframe frameborder="1" scrolling="auto" width="440" height="198" class="kupu-linkdrawer-preview" src="kupublank.html">
+        </iframe>
+        </td></tr>
+        </table>
+
+        <div class="kupu-dialogbuttons">
+          <button class="kupu-dialog-button" type="button" onclick="drawertool.current_drawer.save()" i18n:translate="">Ok</button>
+          <button class="kupu-dialog-button" type="button" onclick="drawertool.closeDrawer()" i18n:translate="">Cancel</button>
+        </div>
+
+      </div>
+    </div>
+  
+    <div id="kupu-tabledrawer" class="kupu-drawer kupu-tabledrawer">
+    <h1 i18n:translate="tabledrawer_title">Table</h1>
+    <div class="kupu-panels">
+      <table width="300">
+        <tr class="kupu-panelsrow">
+          <td class="kupu-panel">
+            
+            <div class="kupu-tabledrawer-addtable">
+              <table>
+                <tr>
+                  <th i18n:translate="tabledrawer_class_label" class="kupu-toolbox-label">Table Class</th>
+                  <td>
+                    <select class="kupu-tabledrawer-addclasschooser">
+                      <option i18n:translate="" value="plain">Plain</option>
+                      <option i18n:translate="" value="listing">Listing</option>
+                      <option i18n:translate="" value="grid">Grid</option>
+                      <option i18n:translate="" value="data">Data</option>
+                    </select>
+                  </td>
+                </tr>
+                <tr>
+                  <th i18n:translate="tabledrawer_rows_label" class="kupu-toolbox-label">Rows</th>
+                  <td><input type="text" class="kupu-tabledrawer-newrows" onkeypress="return HandleDrawerEnter(event);"/></td>
+                </tr>
+                <tr>
+                  <th i18n:translate="tabledrawer_columns_label" class="kupu-toolbox-label">Columns</th>
+                  <td><input type="text" class="kupu-tabledrawer-newcols" onkeypress="return HandleDrawerEnter(event);"/></td>
+                </tr>
+                <tr>
+                  <th class="kupu-toolbox-label"> </th>
+                  <td>
+                    <label><input class="kupu-tabledrawer-makeheader" type="checkbox" onkeypress="return HandleDrawerEnter(event);"/>
+                    <span i18n:translate="tabledrawer_headings_label">Create Headings</span></label>
+                  </td>
+                </tr>
+                <tr>
+                  <th class="kupu-toolbox-label"> </th>
+                  <td>
+                      <button class="kupu-dialog-button" type="button" i18n:translate="tabledrawer_add_table_button" onclick="drawertool.current_drawer.createTable()">Add Table</button>
+                      <button class="kupu-dialog-button" type="button" i18n:translate="tabledrawer_fix_tables_button" onclick="drawertool.current_drawer.fixAllTables()">Fix All Tables</button>
+                  </td>
+                </tr>
+              </table>
+            </div>
+
+            
+            <div class="kupu-tabledrawer-edittable">
+              <table>
+                <tr>
+                  <th class="kupu-toolbox-label" i18n:translate="tabledrawer_class_label">Table Class</th>
+                  <td>
+                    <select class="kupu-tabledrawer-editclasschooser" onchange="drawertool.current_drawer.setTableClass(this.options[this.selectedIndex].value)">
+                      <option i18n:translate="" value="plain">Plain</option>
+                      <option i18n:translate="" value="listing">Listing</option>
+                      <option i18n:translate="" value="grid">Grid</option>
+                      <option i18n:translate="" value="data">Data</option>
+                    </select>
+                  </td>
+                </tr>
+                <tr>
+                  <th class="kupu-toolbox-label" i18n:translate="tabledrawer_alignment_label">Current column alignment</th>
+                  <td>
+                    <select id="kupu-tabledrawer-alignchooser" class="kupu-tabledrawer-alignchooser" onchange="drawertool.current_drawer.tool.setColumnAlign(this.options[this.selectedIndex].value)">
+                      <option i18n:translate="tabledrawer_left_option" value="left">Left</option>
+                      <option i18n:translate="tabledrawer_center_option" value="center">Center</option>
+                      <option i18n:translate="tabledrawer_right_option" value="right">Right</option>
+                      </select>
+                  </td>
+                </tr>
+                <tr>
+                  <th class="kupu-toolbox-label" i18n:translate="tabledrawer_column_label">Column</th>
+                  <td>
+                    <button class="kupu-dialog-button" type="button" i18n:translate="tabledrawer_add_button" onclick="drawertool.current_drawer.addTableColumn()">Add</button>
+                    <button class="kupu-dialog-button" type="button" i18n:translate="tabledrawer_remove_button" onclick="drawertool.current_drawer.delTableColumn()">Remove</button>
+                  </td>
+                </tr>
+                <tr>
+                  <th class="kupu-toolbox-label" i18n:translate="tabledrawer_row_label">Row</th>
+                  <td>
+                    <button class="kupu-dialog-button" type="button" i18n:translate="tabledrawer_add_button" onclick="drawertool.current_drawer.addTableRow()">Add</button> 
+                    <button class="kupu-dialog-button" type="button" i18n:translate="tabledrawer_remove_button" onclick="drawertool.current_drawer.delTableRow()">Remove</button>
+                  </td>
+                </tr>
+                <tr>
+                  <th class="kupu-toolbox-label" i18n:translate="tabledrawer_fix_table_label">Fix Table</th>
+                  <td>
+                    <button class="kupu-dialog-button" type="button" i18n:translate="tabledrawer_fix_button" onclick="drawertool.current_drawer.fixTable()">Fix</button> 
+                  </td>
+                </tr>
+              </table>
+            </div>
+          </td>
+        </tr>
+      </table>
+      <div class="kupu-dialogbuttons">
+        <button class="kupu-dialog-button" type="button" onfocus="window.status='focus';" onmousedown="window.status ='onmousedown';" i18n:translate="tabledrawer_close_button" onclick="drawertool.closeDrawer(this)">Close</button>
+      </div>
+    </div>
+    </div>
+
+  
+  
+    </div>
+  
+    <div class="kupu-toolboxes" id="kupu-toolboxes">
+      
+  
+    <div class="kupu-toolbox" id="kupu-toolbox-links">
+      <h1 class="kupu-toolbox-heading" i18n:translate="">Links</h1>
+
+      <div id="kupu-toolbox-addlink">
+        <div class="kupu-toolbox-label">
+          
+          <span i18n:translate="">
+            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" i18n:translate="">Make Link</button>
+        </div>
+      </div>
+    </div>
+  
+    <div class="kupu-toolbox" id="kupu-toolbox-images">
+      <h1 class="kupu-toolbox-heading" i18n:translate="">Images</h1>
+
+      <div>
+        <div class="kupu-toolbox-label">
+          <span i18n:translate="">Image class:</span>
+        </div>
+        <select class="wide" id="kupu-image-float-select">
+          <option value="image-inline" i18n:translate="">Inline</option>
+          <option value="image-left" i18n:translate="">Left</option>
+          <option value="image-right" i18n:translate="">Right</option>
+        </select>
+
+        <div class="kupu-toolbox-label">
+          <span i18n:translate="">Insert image at the following URL:</span>
+        </div>
+        <input id="kupu-image-input" value="kupuimages/kupu_icon.gif" class="wide" type="text"/>
+
+        <div class="kupu-toolbox-buttons">
+          <button type="button" id="kupu-image-addbutton" class="kupu-toolbox-action" i18n:translate="">Insert Image</button>
+        </div>
+      </div>
+    </div>
+  
+    <div class="kupu-toolbox" id="kupu-toolbox-tables">
+      <h1 class="kupu-toolbox-heading" i18n:translate="">Tables</h1>
+
+      <div>
+      <div class="kupu-toolbox-label">
+        <span i18n:translate="">Table Class:</span>
+        <select class="wide" id="kupu-table-classchooser"> </select>
+      </div>
+
+      <div id="kupu-toolbox-addtable" class="kupu-toolbox-addtable">
+        <div class="kupu-toolbox-label" i18n:translate="">Rows:</div>
+        <input class="wide" type="text" id="kupu-table-newrows"/>
+
+        <div class="kupu-toolbox-label" i18n:translate="">Columns:</div>
+        <input class="wide" type="text" id="kupu-table-newcols"/>
+
+        <div class="kupu-toolbox-label">
+          <span i18n:translate="">Headings:</span>
+          <input name="kupu-table-makeheader" id="kupu-table-makeheader" type="checkbox"/>
+          <label for="kupu-table-makeheader" i18n:translate="">Create</label>
+        </div>
+
+        <div class="kupu-toolbox-buttons">
+          <button type="button" id="kupu-table-fixall-button" i18n:translate="">Fix Table</button> 
+          <button type="button" id="kupu-table-addtable-button" i18n:translate="">Add Table</button> 
+        </div>
+
+      </div>
+
+      <div id="kupu-toolbox-edittable" class="kupu-toolbox-edittable">
+      
+          <div class="kupu-toolbox-label">
+            <span i18n:translate="">Col Align:</span>
+            <select class="wide" id="kupu-table-alignchooser">
+              <option value="left" i18n:translate="">Left</option>
+              <option value="center" i18n:translate="">Center</option>
+              <option value="right" i18n:translate="">Right</option>
+            </select>
+          </div>
+      
+          <div class="kupu-toolbox-buttons">
+            <br/>
+            <button type="button" id="kupu-table-addcolumn-button" i18n:translate="">Add Column</button>
+            <button type="button" id="kupu-table-delcolumn-button" i18n:translate="">Remove Column</button>
+            
+            <br/>
+            <button type="button" id="kupu-table-addrow-button" i18n:translate="">Add Row</button>
+            <button type="button" id="kupu-table-delrow-button" i18n:translate="">Remove Row</button>
+          
+            <button type="button" id="kupu-table-fix-button" i18n:translate="">Fix</button>
+          </div>
+          
+      </div>
+      </div>
+
+    </div>
+  
+    <div class="kupu-toolbox" id="kupu-toolbox-cleanupexpressions">
+      <h1 class="kupu-toolbox-heading" i18n:translate="">Cleanup expressions</h1>
+
+      <div>
+        <div class="kupu-toolbox-label">
+          <span i18n:translate="">
+            Select a cleanup action:
+          </span>
+        </div>
+
+        <select id="kupucleanupexpressionselect" class="kupu-toolbox-st">
+        </select>
+        <div style="text-align: center">
+          <button type="button" id="kupucleanupexpressionbutton" class="kupu-toolbox-action">Perform action</button>
+        </div>
+      </div>
+    </div>
+  
+    <div class="kupu-toolbox" id="kupu-toolbox-debug">
+      <h1 class="kupu-toolbox-heading" i18n:translate="">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">
+      <iframe id="kupu_1" frameborder="0" src="fulldoc.html" fieldid="kupu_1" style="height: 200px;" scrolling="auto">
+      </iframe>
+      <textarea class="kupu-editor-textarea" id="kupu-editor-textarea-kupu_1" style="width: 99%; height: 200px;"> 
+      </textarea>
+      <iframe id="kupu_2" frameborder="0" src="fulldoc.html" fieldid="kupu_2" style="height: 200px;" scrolling="auto">
+      </iframe>
+      <textarea class="kupu-editor-textarea" id="kupu-editor-textarea-kupu_2" style="width: 99%; height: 200px;"> 
+      </textarea>
+      <iframe id="kupu_3" frameborder="0" src="fulldoc.html" fieldid="kupu_3" style="height: 200px;" scrolling="auto">
+      </iframe>
+      <textarea class="kupu-editor-textarea" id="kupu-editor-textarea-kupu_3" style="width: 99%; height: 200px;"> 
+      </textarea>
+    </div>
+  
+    </div>
+  
+      </form>
+    </body>
+  
+
+</html>
+  

Added: incubator/graffito/trunk/applications/browser/src/webapp/kupu-1.3.5/kupumultieditor.js
URL: http://svn.apache.org/viewvc/incubator/graffito/trunk/applications/browser/src/webapp/kupu-1.3.5/kupumultieditor.js?view=auto&rev=454522
==============================================================================
--- incubator/graffito/trunk/applications/browser/src/webapp/kupu-1.3.5/kupumultieditor.js (added)
+++ incubator/graffito/trunk/applications/browser/src/webapp/kupu-1.3.5/kupumultieditor.js Mon Oct  9 14:28:27 2006
@@ -0,0 +1,190 @@
+/*****************************************************************************
+ *
+ * Copyright (c) 2003-2005 Kupu Contributors. All rights reserved.
+ *
+ * This software is distributed under the terms of the Kupu
+ * License. See LICENSE.txt for license text. For a list of Kupu
+ * Contributors see CREDITS.txt.
+ *
+ *****************************************************************************/
+
+// $Id: kupumultieditor.js 3450 2004-03-28 11:07:30Z guido $
+
+function KupuMultiEditor(documents, config, logger) {
+    /* multiple kupus in one form */
+    this.documents = documents; // array of documents
+    this.config = config;
+    this.log = logger;
+    this.tools = {};
+
+    this._designModeAttempts = 0;
+    this._initialized = false;
+
+    this._previous_range = null;
+
+    // here's where the current active document will be stored
+    this._current_document = documents[0];
+    
+    this.initialize = function() {
+        this._initializeEventHandlers();
+        this.getDocument().getWindow().focus();
+        if (this.getBrowserName() == 'IE') {
+            for (var i=0; i < this.documents.length; i++) {
+                var body = this.documents[i].getDocument().getElementsByTagName('body')[0];
+                body.setAttribute('contentEditable', 'true');
+            };
+            // provide an 'afterInit' method on KupuEditor.prototype
+            // for additional bootstrapping (after editor init)
+            this._initialized = true;
+            if (this.afterInit) {
+                this.afterInit();
+            };
+            this._saveSelection();
+            this.logMessage(_('Editor initialized'));
+        } else {
+            this._setDesignModeWhenReady();
+        };
+    };
+
+    this.updateStateHandler = function(event) {
+        /* check whether the event is interesting enough to trigger the 
+        updateState machinery and act accordingly */
+        var interesting_codes = new Array(8, 13, 37, 38, 39, 40, 46);
+        if (event.type == 'click' || event.type == 'dblclick' || 
+                event.type == 'select' ||
+                (event.type == 'keyup' && 
+                    interesting_codes.contains(event.keyCode))) {
+            var target = event.target ? event.target : event.srcElement;
+            // find the document targeted
+            while (target.nodeType != 9) {
+                target = target.parentNode;
+            };
+            var document = null;
+            for (var i=0; i < this.documents.length; i++) {
+                document = this.documents[i];
+                if (document.getDocument() == target) {
+                    break;
+                };
+            };
+            if (!document) {
+                alert('No document found!');
+                return;
+            };
+            this._current_document = document;
+            this.updateState(event);
+        };
+        // unfortunately it's not possible to do this on blur, since that's
+        // too late. also (some versions of?) IE 5.5 doesn't support the
+        // onbeforedeactivate event, which would be ideal here...
+        if (this.getBrowserName() == 'IE') {
+            this._saveSelection();
+        };
+    };
+
+    this.saveDocument = function() {
+        throw('Not supported, use prepareForm to attach the editor to a form');
+    };
+
+    this.getDocument = function() {
+        /* return the current active document */
+        return this._current_document;
+    };
+
+    this._initializeEventHandlers = function() {
+        /* attache the event handlers to the iframe */
+        for (var i=0; i < this.documents.length; i++) {
+            var doc = this.documents[i].getDocument();
+            this._addEventHandler(doc, "click", this.updateStateHandler, this);
+            this._addEventHandler(doc, "keyup", this.updateStateHandler, this);
+            if (this.getBrowserName() == "IE") {
+                this._addEventHandler(doc, "dblclick", this.updateStateHandler, this);
+                this._addEventHandler(doc, "select", this.updateStateHandler, this);
+            };
+        };
+    };
+
+    this._setDesignModeWhenReady = function() {
+        this._designModeSetAttempts++;
+        if (this._designModeSetAttempts > 25) {
+            alert(_('Couldn\'t set design mode. Kupu will not work on this browser.'));
+            return;
+        };
+        var should_retry = false;
+        for (var i=0; i < this.documents.length; i++) {
+            var document = this.documents[i];
+            if (!document._designModeSet) {
+                try {
+                    this._setDesignMode(document);
+                    document._designModeSet = true;
+                } catch(e) {
+                    should_retry = true;
+                };
+            };
+        };
+        if (should_retry) {
+            timer_instance.registerFunction(this, this._setDesignModeWhenReady, 100);
+        } else {
+            // provide an 'afterInit' method on KupuEditor.prototype
+            // for additional bootstrapping (after editor init)
+            if (this.afterInit) {
+                this.afterInit();
+            };
+            this._initialized = true;
+        };
+    };
+
+    this._setDesignMode = function(doc) {
+        doc.getDocument().designMode = "On";
+        doc.execCommand("undo");
+    };
+
+    // XXX perhaps we can partially move this to a helper method to approve
+    // code reuse?
+    this.prepareForm = function(form, idprefix) {
+        /* add some fields to the form and place the contents of the iframes 
+        */
+        var sourcetool = this.getTool('sourceedittool');
+        if (sourcetool) {sourcetool.cancelSourceMode();};
+
+        // make sure people can't edit or save during saving
+        if (!this._initialized) {
+            return;
+        }
+        this._initialized = false;
+        
+        // set the window status so people can see we're actually saving
+        window.status= _("Please wait while saving document...");
+
+        // set a default id
+        if (!idprefix) {
+            idprefix = 'kupu';
+        };
+        
+        // pass the content through the filters
+        this.logMessage(_("Starting HTML cleanup"));
+        var contents = new Array();
+        for (var i=0; i < this.documents.length; i++) {
+            var transform = this._filterContent(this.documents[i].getDocument().documentElement);
+            contents.push(this._serializeOutputToString(transform));
+        };
+        
+        this.logMessage(_("Cleanup done, sending document to server"));
+        
+        // now create the form input, since IE 5.5 doesn't support the 
+        // ownerDocument property we use window.document as a fallback (which
+        // will almost by definition be correct).
+        var document = form.ownerDocument ? form.ownerDocument : window.document;
+        for (var i=0; i < contents.length; i++) {
+            var ta = document.createElement('textarea');
+            ta.style.visibility = 'hidden';
+            var text = document.createTextNode(contents[i]);
+            ta.appendChild(text);
+            ta.setAttribute('name', idprefix + '_' + i);
+            
+            // and add it to the form
+            form.appendChild(ta);
+        };
+    };
+};
+
+KupuMultiEditor.prototype = new KupuEditor;

Added: incubator/graffito/trunk/applications/browser/src/webapp/kupu-1.3.5/kupunoi18n.js
URL: http://svn.apache.org/viewvc/incubator/graffito/trunk/applications/browser/src/webapp/kupu-1.3.5/kupunoi18n.js?view=auto&rev=454522
==============================================================================
--- incubator/graffito/trunk/applications/browser/src/webapp/kupu-1.3.5/kupunoi18n.js (added)
+++ incubator/graffito/trunk/applications/browser/src/webapp/kupu-1.3.5/kupunoi18n.js Mon Oct  9 14:28:27 2006
@@ -0,0 +1,11 @@
+window._ = function(msgid, interpolations) {
+    /* dummy _ function for systems that don't want to use i18n */
+    if (interpolations) {
+        for (var id in interpolations) {
+            var value = interpolations[id];
+            var reg = new RegExp('\\\$\\\{' + id + '\\\}', 'g');
+            msgid = msgid.replace(reg, ""+value);
+        };
+    };
+    return msgid;
+};

Added: incubator/graffito/trunk/applications/browser/src/webapp/kupu-1.3.5/kupupopups/image.html
URL: http://svn.apache.org/viewvc/incubator/graffito/trunk/applications/browser/src/webapp/kupu-1.3.5/kupupopups/image.html?view=auto&rev=454522
==============================================================================
--- incubator/graffito/trunk/applications/browser/src/webapp/kupu-1.3.5/kupupopups/image.html (added)
+++ incubator/graffito/trunk/applications/browser/src/webapp/kupu-1.3.5/kupupopups/image.html Mon Oct  9 14:28:27 2006
@@ -0,0 +1,31 @@
+<html>
+<head>
+<title>Kupu image box</title>
+<script type="text/javascript">
+
+function saveImage() {
+    var f = getFromSelector('imageform');
+    imagetool.createImage(f.url.value);
+    window.close();
+};
+
+</script>
+<link type="text/css" rel="stylesheet" href="kupustyles.css" />
+</head>
+
+<body>
+<center>
+<form action="." method="POST" id="imageform">
+<h3>Image url:</h3>
+<table>
+<tr>
+<td>Url:</td>
+<td><input type="text" name="url" value="http://" /></td>
+</tr>
+</table>
+<input type="button" onclick="window.close()" value="Cancel" />
+<input type="button" onclick="saveImage()" value="Save image" />
+</form>
+</center>
+</body>
+</html>

Added: incubator/graffito/trunk/applications/browser/src/webapp/kupu-1.3.5/kupupopups/link.html
URL: http://svn.apache.org/viewvc/incubator/graffito/trunk/applications/browser/src/webapp/kupu-1.3.5/kupupopups/link.html?view=auto&rev=454522
==============================================================================
--- incubator/graffito/trunk/applications/browser/src/webapp/kupu-1.3.5/kupupopups/link.html (added)
+++ incubator/graffito/trunk/applications/browser/src/webapp/kupu-1.3.5/kupupopups/link.html Mon Oct  9 14:28:27 2006
@@ -0,0 +1,58 @@
+<html>
+<head>
+<title>Kupu link box</title>
+<script type="text/javascript">
+
+function changeType(element) {
+    if (element.value == "anchor") {
+        element.form.url.setAttribute("disabled", "disabled");
+        element.form.target.setAttribute("disabled", "disabled");
+    } else {
+        element.form.url.removeAttribute("disabled");
+        element.form.target.removeAttribute("disabled");
+    };
+};
+
+function saveLink() {
+    var f = getFromSelector('linkform');
+    var typeel = getFromSelector('anchorradio');
+    var linktype =  (typeel.checked || typeel.getAttribute('checked')) ? 'anchor' : 'link';
+    linktool.createLink(f.url.value, linktype, f.name.value, f.target.value);
+    window.close();
+};
+
+</script>
+<link type="text/css" rel="stylesheet" href="kupustyles.css" />
+</head>
+
+<body>
+<center>
+<form action="." method="POST" id="linkform">
+<h3>Link details:</h3>
+<table>
+<tr>
+<td>Type:</td>
+<td>
+<input type="radio" name="linktype" value="link" onclick="changeType(this)" checked="checked" />Link
+<input type="radio" name="linktype" id="anchorradio" value="anchor" onclick="changeType(this)" />Anchor
+</td>
+</tr>
+<tr>
+<td>Url:</td>
+<td><input type="text" name="url" value="http://" /></td>
+</tr>
+<tr>
+<td>Target:</td>
+<td><input type="text" name="target" value="_self" /></td>
+</tr>
+<tr>
+<td>Name:</td>
+<td><input type="text" name="name" /></td>
+</tr>
+</table>
+<input type="button" onclick="window.close()" value="Cancel" />
+<input type="button" onclick="saveLink()" value="Save link" />
+</form>
+</center>
+</body>
+</html>

Added: incubator/graffito/trunk/applications/browser/src/webapp/kupu-1.3.5/kupusaveonpart.js
URL: http://svn.apache.org/viewvc/incubator/graffito/trunk/applications/browser/src/webapp/kupu-1.3.5/kupusaveonpart.js?view=auto&rev=454522
==============================================================================
--- incubator/graffito/trunk/applications/browser/src/webapp/kupu-1.3.5/kupusaveonpart.js (added)
+++ incubator/graffito/trunk/applications/browser/src/webapp/kupu-1.3.5/kupusaveonpart.js Mon Oct  9 14:28:27 2006
@@ -0,0 +1,20 @@
+/*****************************************************************************
+ *
+ * Copyright (c) 2003-2005 Kupu Contributors. All rights reserved.
+ *
+ * This software is distributed under the terms of the Kupu
+ * License. See LICENSE.txt for license text. For a list of Kupu
+ * Contributors see CREDITS.txt.
+ *
+ *****************************************************************************/
+
+// $Id: kupusaveonpart.js 22453 2006-01-19 16:40:56Z guido $
+
+function saveOnPart() {
+    /* ask the user if (s)he wants to save the document before leaving */
+    if (kupu.content_changed && 
+        confirm(_('You are leaving the editor. Do you want to save your changes?'))) {
+        kupu.config.reload_src = 0;
+        kupu.saveDocument(false, true);
+    };
+};

Added: incubator/graffito/trunk/applications/browser/src/webapp/kupu-1.3.5/kupusourceedit.js
URL: http://svn.apache.org/viewvc/incubator/graffito/trunk/applications/browser/src/webapp/kupu-1.3.5/kupusourceedit.js?view=auto&rev=454522
==============================================================================
--- incubator/graffito/trunk/applications/browser/src/webapp/kupu-1.3.5/kupusourceedit.js (added)
+++ incubator/graffito/trunk/applications/browser/src/webapp/kupu-1.3.5/kupusourceedit.js Mon Oct  9 14:28:27 2006
@@ -0,0 +1,126 @@
+/*****************************************************************************
+ *
+ * Copyright (c) 2003-2005 Kupu Contributors. All rights reserved.
+ *
+ * This software is distributed under the terms of the Kupu
+ * License. See LICENSE.txt for license text. For a list of Kupu
+ * Contributors see CREDITS.txt.
+ *
+ *****************************************************************************/
+
+// $Id$
+
+
+function SourceEditTool(sourcebuttonid, sourceareaid) {
+    /* Source edit tool to edit document's html source */
+    this.sourceButton = getFromSelector(sourcebuttonid);
+    this.sourcemode = false;
+    this._currently_editing = null;
+
+    // method defined inline to support closure
+    // XXX would be nice to have this defined on the prototype too, because
+    // of subclassing issues?
+    this.getSourceArea = function() {
+        return getFromSelector(sourceareaid);
+    };
+};
+
+SourceEditTool.prototype = new KupuTool;
+
+SourceEditTool.prototype.cancelSourceMode = function() {
+    if (this._currently_editing) {
+        this.switchSourceEdit(null, true);
+    };
+};
+
+SourceEditTool.prototype.updateState = 
+        SourceEditTool.prototype.cancelSourceMode;
+
+SourceEditTool.prototype.initialize = function(editor) {
+    /* attach the event handlers */
+    this.editor = editor;
+    this._fixTabIndex(this.sourceButton);
+    addEventHandler(this.sourceButton, "click", this.switchSourceEdit, this);
+    this.editor.logMessage(_('Source edit tool initialized'));
+};
+
+SourceEditTool.prototype.switchSourceEdit = function(event, nograb) {
+    var kupu = this.editor;
+    var docobj = this._currently_editing||kupu.getDocument();
+    var editorframe = docobj.getEditable();
+    var sourcearea = this.getSourceArea();
+    var kupudoc = docobj.getDocument();
+    var sourceClass = 'kupu-sourcemode';
+
+    if (!this.sourcemode) {
+        if (window.drawertool) {
+            window.drawertool.closeDrawer();
+        };
+        if (/on/i.test(kupudoc.designMode)) {
+            kupudoc.designMode = 'Off';
+        };
+        kupu._initialized = false;
+
+        var data='';
+        if(kupu.config.filtersourceedit) {
+            window.status = _('Cleaning up HTML...');
+            var transform = kupu._filterContent(
+                                kupu.getInnerDocument().documentElement);
+            data = kupu.getXMLBody(transform);
+            data = kupu._fixupSingletons(data).replace(/<\/?body[^>]*>/g, "");
+            window.status = '';
+        } else {
+            data = kupu.getHTMLBody();
+        };
+        sourcearea.value = data;
+        kupu.setClass(sourceClass);
+        editorframe.style.display = 'none';
+        sourcearea.style.display = 'block';
+        if (!nograb) {
+            sourcearea.focus();
+        };
+        this._currently_editing = docobj;
+      } else {
+        kupu.setHTMLBody(sourcearea.value);
+        kupu.clearClass(sourceClass);
+        sourcearea.style.display = 'none';
+        editorframe.style.display = 'block';
+        if (/off/i.test(kupudoc.designMode)) {
+            kupudoc.designMode = 'On';
+        };
+        if (!nograb) {
+            docobj.getWindow().focus();
+            var selection = this.editor.getSelection();
+            selection.collapse();
+        };
+
+        kupu._initialized = true;
+        this._currently_editing = null;
+        this.editor.updateState();
+    };
+    this.sourcemode = !this.sourcemode;
+};
+
+SourceEditTool.prototype.enable = function() {
+    KupuButtonEnable(this.sourceButton);
+};
+
+SourceEditTool.prototype.disable = function() {
+    KupuButtonDisable(this.sourceButton);
+};
+
+function MultiSourceEditTool(sourcebuttonid, textareaprefix) {
+    /* Source edit tool to edit document's html source */
+    this.sourceButton = getFromSelector(sourcebuttonid);
+    this.textareaprefix = textareaprefix;
+
+    this._currently_editing = null;
+};
+
+MultiSourceEditTool.prototype = new SourceEditTool;
+
+MultiSourceEditTool.prototype.getSourceArea = function() {
+    var docobj = this._currently_editing||kupu.getDocument();
+    var sourceareaid = this.textareaprefix + docobj.getEditable().id;
+    return getFromSelector(sourceareaid);
+};

Added: incubator/graffito/trunk/applications/browser/src/webapp/kupu-1.3.5/kupuspellchecker.js
URL: http://svn.apache.org/viewvc/incubator/graffito/trunk/applications/browser/src/webapp/kupu-1.3.5/kupuspellchecker.js?view=auto&rev=454522
==============================================================================
--- incubator/graffito/trunk/applications/browser/src/webapp/kupu-1.3.5/kupuspellchecker.js (added)
+++ incubator/graffito/trunk/applications/browser/src/webapp/kupu-1.3.5/kupuspellchecker.js Mon Oct  9 14:28:27 2006
@@ -0,0 +1,200 @@
+function KupuSpellChecker(buttonid, scripturl, spanstyle, 
+                            winwidth, winheight, skip_tags) {
+    this.button = document.getElementById(buttonid);
+    this.scripturl = scripturl;
+    this.spanstyle = spanstyle || 'color: red; ' +
+                                    'text-decoration: underline;';
+    this.winwidth = winwidth || '600';
+    this.winheight = winheight || '400';
+    this.skip_tags = skip_tags || ['head', 'script'];
+};
+
+KupuSpellChecker.prototype = new KupuTool;
+
+KupuSpellChecker.prototype.initialize = function(editor) {
+    this.editor = editor;
+    addEventHandler(this.button, 'click', this.check, this);
+};
+
+KupuSpellChecker.prototype.check = function() {
+    var request = new XMLHttpRequest();
+    request.open('POST', this.scripturl, true);
+    request.setRequestHeader('Content-Type', 
+                                'application/x-www-form-urlencoded');
+    request.onreadystatechange = new ContextFixer(
+                                    this.stateChangeHandler,
+                                    this,
+                                    request).execute;
+    var result = this.getCurrentContents();
+    result = escape(result.strip().replace('\n', ' ').reduceWhitespace());
+    request.send('text=' + result);
+};
+
+KupuSpellChecker.prototype.stateChangeHandler = function(request) {
+    if (request.readyState == 4) {
+        if (request.status == '200') {
+            var result = request.responseXML;
+            result = this.xmlToMapping(result);
+            if (!result) {
+                alert(_('There were no errors.'));
+            } else {
+                this.displayUnrecognized(result);
+            };
+        } else {
+            alert(_('Error loading data, status ${status}',
+                    {'status': request.status}));
+        };
+    };
+};
+
+KupuSpellChecker.prototype.getCurrentContents = function() {
+    var doc = this.editor.getInnerDocument().documentElement;
+    var iterator = new NodeIterator(doc);
+    var bits = [];
+    while (true) {
+        var node = iterator.next();
+        if (!node) {
+            break;
+        };
+        while (this.skip_tags.contains(node.nodeName.toLowerCase())) {
+            node = node.nextSibling;
+            iterator.setCurrent(node);
+        };
+        if (node.nodeType == 3) {
+            bits.push(node.nodeValue);
+        };
+    };
+    return bits.join(' ');
+};
+
+KupuSpellChecker.prototype.displayUnrecognized = function(mapping) {
+    // copy the current editable document into a new window
+    var doc = this.editor.getInnerDocument();
+    var docel = doc.documentElement;
+    var win = window.open('kupublank.html', 'spellchecker', 
+                            'width=' + this.winwidth + ',' +
+                            'height=' + this.winheight + ',toolbar=no,' +
+                            'menubar=no,scrollbars=yes,status=yes');
+    if (!win) {
+        alert(
+            _('This feature requires pop-ups to be enabled on your browser!'));
+        return;
+    };
+    var html = docel.innerHTML;
+    // when Moz tries to set the content-type, for some reason leaving this
+    // in breaks the feature(?!?)
+    html = html.replace(/<meta[^>]*http-equiv="[Cc]ontent-[Tt]ype"[^>]*>/gm, 
+                        '');
+    win.document.write('<html>' + html + '</html>');
+    win.deentitize = function(str) {return str.deentitize()};
+    win.document.close();
+    if (!win.document.getElementsByTagName('body').length) {
+        addEventHandler(win, 'load', this.continueDisplay, this, win, mapping);
+    } else {
+        this.continueDisplay(win, mapping);
+    };
+};
+
+KupuSpellChecker.prototype.continueDisplay = function(win, mapping) {
+    /* walk through all elements of the body, colouring the text nodes */
+    // start it all with a timeout to make Mozilla render the content first
+    timer_instance.registerFunction(this, this.continueDisplayHelper,
+                                    1000, win, mapping);
+};
+
+KupuSpellChecker.prototype.continueDisplayHelper = function(win, mapping) {
+    var body = win.document.getElementsByTagName('body')[0];
+    body.setAttribute('contentEditable', 'false');
+    var iterator = new NodeIterator(body);
+    var node = iterator.next();
+    timer_instance.registerFunction(this, this.displayHelperNodeLoop,
+                                    10, iterator, node, win, mapping);
+};
+
+KupuSpellChecker.prototype.displayHelperNodeLoop = function(iterator, node, 
+                                                                win, mapping) {
+    if (!node) {
+        return;
+    };
+    var next = iterator.next();
+    if (node.nodeType == 3) {
+        if (win.closed) {
+            return;
+        };
+        var span = win.document.createElement('span');
+        var before = node.nodeValue;
+        var after = this.colourText(before, mapping);
+        if (before != after) {
+            span.innerHTML = after;
+            var last = span.lastChild;
+            var parent = node.parentNode;
+            parent.replaceChild(last, node);
+            while (span.hasChildNodes()) {
+                parent.insertBefore(span.firstChild, last);
+            };
+        };
+    } else if (node.nodeType == 1 && node.nodeName.toLowerCase() == 'a') {
+        var cancelEvent = function(e) {
+            if (e.preventDefault) {
+                e.preventDefault();
+            } else {
+                e.returnValue = false;
+            };
+            return false;
+        };
+        addEventHandler(node, 'click', cancelEvent);
+        addEventHandler(node, 'mousedown', cancelEvent);
+        addEventHandler(node, 'mouseup', cancelEvent);
+    };
+    // using a timeout here makes Moz render the coloring while it's busy, and
+    // will make it stop popping up 'do you want to continue' prompts...
+    timer_instance.registerFunction(this, this.displayHelperNodeLoop,
+                                    10, iterator, next, win, mapping);
+};
+
+KupuSpellChecker.prototype.colourText = function(text, mapping) {
+    var currtext = text;
+    var newtext = '';
+    for (var word in mapping) {
+        var replacements = mapping[word];
+        replacements = replacements.entitize();
+        replacements = replacements.replace(/\'/g, "&apos;");
+        var reg = new RegExp('^(.*\\\W)?(' + word + ')(\\\W.*)?$', 'mg');
+        while (true) {
+            var match = reg.exec(currtext);
+            if (!match) {
+                newtext += currtext;
+                currtext = newtext;
+                newtext = '';
+                break;
+            };
+            var m = (match[1] || '') + match[2];
+            newtext += currtext.substr(0, currtext.indexOf(m));
+            newtext += (match[1] || '') +
+                        '<span style="' + this.spanstyle + '" ' +
+                        'onclick="alert(deentitize(\'' + 
+                        replacements + '\'));" ' +
+                        'title="' + replacements + '">' +
+                        match[2] +
+                        '</span>';
+            currtext = currtext.substr(currtext.indexOf(m) + m.length);
+        };
+    };
+    return currtext;
+};
+
+KupuSpellChecker.prototype.xmlToMapping = function(docnode) {
+    var docel = docnode.documentElement;
+    var result = {};
+    var incorrect = docel.getElementsByTagName('incorrect');
+    for (var i=0; i < incorrect.length; i++) {
+        var word = incorrect[i].firstChild.firstChild.nodeValue;
+        var replacements = '';
+        if (incorrect[i].lastChild.hasChildNodes()) {
+            replacements = incorrect[i].lastChild.firstChild.nodeValue;
+        };
+        result[word] = replacements;
+    };
+    var attrs = [];
+    return result;
+};

Added: incubator/graffito/trunk/applications/browser/src/webapp/kupu-1.3.5/kupustart.js
URL: http://svn.apache.org/viewvc/incubator/graffito/trunk/applications/browser/src/webapp/kupu-1.3.5/kupustart.js?view=auto&rev=454522
==============================================================================
--- incubator/graffito/trunk/applications/browser/src/webapp/kupu-1.3.5/kupustart.js (added)
+++ incubator/graffito/trunk/applications/browser/src/webapp/kupu-1.3.5/kupustart.js Mon Oct  9 14:28:27 2006
@@ -0,0 +1,62 @@
+/*****************************************************************************
+ *
+ * Copyright (c) 2003-2005 Kupu Contributors. All rights reserved.
+ *
+ * This software is distributed under the terms of the Kupu
+ * License. See LICENSE.txt for license text. For a list of Kupu
+ * Contributors see CREDITS.txt.
+ *
+ *****************************************************************************/
+
+// $Id$
+
+function startKupu() {
+    // first let's load the message catalog
+    // if there's no global 'i18n_message_catalog' variable available, don't
+    // try to load any translations
+    if (window.i18n_message_catalog) {
+        var request = new XMLHttpRequest();
+        // sync request, scary...
+        request.open('GET', 'kupu-pox.cgi', false);
+        request.send('');
+        if (request.status != '200') {
+            alert('Error loading translation (status ' + status +
+                    '), falling back to english');
+        } else {
+            // load successful, continue
+            var dom = request.responseXML;
+            window.i18n_message_catalog.initialize(dom);
+        };
+    };
+    
+    // initialize the editor, initKupu groks 1 arg, a reference to the iframe
+    var frame = getFromSelector('kupu-editor'); 
+    var kupu = initKupu(frame);
+    
+    // this makes the editor's content_changed attribute set according to changes
+    // in a textarea or input (registering onchange, see saveOnPart() for more
+    // details)
+    kupu.registerContentChanger(getFromSelector('kupu-editor-textarea'));
+
+    // let's register saveOnPart(), to ask the user if he wants to save when 
+    // leaving after editing
+    if (kupu.getBrowserName() == 'IE') {
+        // IE supports onbeforeunload, so let's use that
+        addEventHandler(window, 'beforeunload', saveOnPart);
+    } else {
+        // some versions of Mozilla support onbeforeunload (starting with 1.7)
+        // so let's try to register and if it fails fall back on onunload
+        var re = /rv:([0-9\.]+)/
+        var match = re.exec(navigator.userAgent)
+        if (match[1] && parseFloat(match[1]) > 1.6) {
+            addEventHandler(window, 'beforeunload', saveOnPart);
+        } else {
+            addEventHandler(window, 'unload', saveOnPart);
+        };
+    };
+
+    // and now we can initialize...
+    kupu.initialize();
+
+    return kupu;
+};