[kupu-checkins] r33551 - in kupu/trunk/kupu: doc plone/kupu_plone_layer
duncan at codespeak.net
duncan at codespeak.net
Mon Oct 23 13:15:55 CEST 2006
Author: duncan
Date: Mon Oct 23 13:15:53 2006
New Revision: 33551
Added:
kupu/trunk/kupu/plone/kupu_plone_layer/kupu_wysiwyg_support.html
Modified:
kupu/trunk/kupu/doc/PLONE2.txt
Log:
Added the generated kupu_wysiwyg_support.html file to subversion.
Adding a generated file is bad, but in this case the pain which comes
from Plone users not being able to run the checkout without an
intervening build step (and installing xsl tools) is greater than the
pain of putting a generated file into Subversion.
Modified: kupu/trunk/kupu/doc/PLONE2.txt
==============================================================================
--- kupu/trunk/kupu/doc/PLONE2.txt (original)
+++ kupu/trunk/kupu/doc/PLONE2.txt Mon Oct 23 13:15:53 2006
@@ -20,14 +20,14 @@
* Archetypes 1.3.x
-If you are installing a development build checked out from SVN then
+If you plan on customizing kupu by editing the '.kupu' files then
you also need:
* An XSLT processor with XInclude support, such as xsltproc from
Gnome's libxml/libxslt.
You do not require an XSLT processor if you are installing a released
-version of Kupu.
+version of Kupu, or simply checking it out from SVN to use in Plone.
Installation
------------
@@ -35,12 +35,13 @@
Drop the 'kupu' directory into your instance home's Products
directory.
-If you are installing from a release tar bundle, the following build
+If you are installing from a release tar bundle, or simply checking
+out kupu to use in Plone and not to edit then the following build
steps may be skipped. Skip down to the paragraph starting `Now restart
the Zope instance`_.
-If you are installing a version checked out of SVN then you must
-generate the Plone template by typing::
+If you edit any of the files with .kupu extensions then you must
+re-generate the Plone template by typing::
$ make plonemacros
Added: kupu/trunk/kupu/plone/kupu_plone_layer/kupu_wysiwyg_support.html
==============================================================================
--- (empty file)
+++ kupu/trunk/kupu/plone/kupu_plone_layer/kupu_wysiwyg_support.html Mon Oct 23 13:15:53 2006
@@ -0,0 +1,499 @@
+
+<html xmlns="http://www.w3.org/1999/xhtml" xmlns:i18n="http://xml.zope.org/namespaces/i18n" i18n:domain="kupu">
+
+ <!--$Id: include.kupu 11657 2005-04-30 17:19:15Z guido $-->
+ <!--$Id: wire.kupu 20919 2005-12-09 10:14:44Z duncan $-->
+ <!--$Id: html.kupu 13336 2005-06-13 11:03:58Z gotcha $-->
+ <!--$Id: head.kupu 20919 2005-12-09 10:14:44Z duncan $-->
+ <!-- saved from url=(0013)about:internet -->
+ <!--$Id: body.kupu 9779 2005-03-15 11:34:47Z duncan $-->
+ <!--$Id: xmlconfig.kupu 12162 2005-05-10 15:53:10Z guido $-->
+ <!--$Id: saveonpart.kupu 9520 2005-02-26 16:30:23Z duncan $-->
+ <!--$Id: sourceedit.kupu 25717 2006-04-12 10:33:01Z fschulze $-->
+ <!--$Id: sourceedit.kupu 9779 2005-03-15 11:34:47Z duncan $-->
+ <!--$Id: contextmenu.kupu 9520 2005-02-26 16:30:23Z duncan $-->
+ <!--$Id: toolbar.kupu 27597 2006-05-22 14:27:32Z guido $-->
+ <!--$Id: toolboxes.kupu 16467 2005-08-25 11:08:10Z guido $-->
+ <!--$Id: colorchooser.kupu 9520 2005-02-26 16:30:23Z duncan $-->
+ <!--$Id: save.kupu 9520 2005-02-26 16:30:23Z duncan $-->
+ <!--$Id: drawers.kupu 32938 2006-10-06 06:56:24Z guido $-->
+ <!--$Id: include.kupu 9520 2005-02-26 16:30:23Z duncan $-->
+ <!--$Id: wire.kupu 25247 2006-04-03 11:23:02Z fschulze $-->
+ <!--$Id: head.kupu 20919 2005-12-09 10:14:44Z duncan $-->
+ <!--$Id: xmlconfig.kupu 30512 2006-07-25 10:17:05Z duncan $-->
+ <!--$Id: body.kupu 31913 2006-09-01 10:07:10Z duncan $-->
+ <!--$Id: toolbar.kupu 25717 2006-04-12 10:33:01Z fschulze $-->
+ <!--$Id: drawers.kupu 21175 2005-12-15 14:25:08Z duncan $-->
+ <!--$Id: beforeunload.kupu 14546 2005-07-12 14:35:55Z duncan $-->
+ <!--$Id: sourceedit.kupu 14546 2005-07-12 14:35:55Z duncan $-->
+ <!--$Id: wysiwyg_support.kupu 27722 2006-05-26 11:10:05Z duncan $-->
+
+
+ <div xmlns:metal="http://xml.zope.org/namespaces/metal" xmlns:tal="http://xml.zope.org/namespaces/tal" metal:define-macro="wysiwygEditorBox" id="kupu-editor" tal:define="name fieldName|inputname; editorid string:kupu-editor-${name}" tal:attributes="id editorid">
+ <tal:usekupu define="fname fieldName|inputname|nothing; usekupu python:here.contentUsesKupu(fname);">
+ <div tal:condition="usekupu">
+
+ <div style="display: none;">
+ <xml id="kupuconfig" class="kupuconfig">
+ <kupuconfig>
+
+ <dst>fulldoc.html</dst>
+ <use_css>0</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>
+ <filtersourceedit tal:condition="here/kupu_library_tool/getFiltersourceedit">1</filtersourceedit>
+
+ <tal:block define="table_classnames here/get_table_classnames|here/kupu_library_tool/getTableClassnames|nothing">
+ <table_classes tal:condition="table_classnames">
+ <tal:loop repeat="klass table_classnames">
+ <class tal:define="parts python:klass.split('|', 1)*2;" tal:condition="python:parts[0].strip()">
+ <xcaption i18n:translate="" tal:content="python:parts[1]"/>
+ <classname tal:content="python:parts[0]"/>
+ </class>
+ </tal:loop>
+ </table_classes>
+ </tal:block>
+
+<tal:block define="excludes here/kupu_library_tool/getHtmlExclusions">
+<htmlfilter tal:condition="excludes">
+<tal:block repeat="exclude excludes"><tal:block define="tags python:exclude[0]; attributes python:exclude[1];"><c tal:omit-tag="not:python:tags and attributes"><a tal:repeat="attr attributes" tal:content="attr">
+ </a><t tal:repeat="tag tags" tal:content="tag"/></c></tal:block></tal:block>
+<xstyle tal:repeat="st here/kupu_library_tool/getStyleWhitelist" tal:content="st"/>
+<class tal:repeat="cl here/kupu_library_tool/getClassBlacklist" tal:content="cl"/>
+</htmlfilter>
+</tal:block>
+
+ <tal:var define="field field|nothing; tool here/kupu_library_tool; usecaptions python:tool.getCaptioning() and tool.canCaption(field); base python:here.kupu_library_tool.getBaseUrl(here); base kupu_base_override|base;">
+ <captions tal:condition="usecaptions">1</captions>
+ <xsl_uri tal:content="string:${portal_url}/kupudrawers/drawer.xsl"/>
+ <image_resource>mediaobject</image_resource>
+ <link_resource>linkable</link_resource>
+ <lib_prefix tal:content="string:${base}/kupulibraries.xml?resource_type="/>
+ <search_prefix tal:content="string:${portal_url}/kupusearch.xml?resource_type="/>
+ <select_prefix tal:content="string:${portal_url}/kupuselection.xml?resource_type="/>
+ </tal:var>
+
+ </kupuconfig>
+ </xml>
+ </div>
+
+ <div class="kupu-fulleditor">
+
+ <tal:test condition="not:exists:portal/portal_css">
+ <link href="kupustyles.css" rel="stylesheet" type="text/css" tal:attributes="href string:${portal_url}/kupustyles.css"/>
+ <link href="kupuplone.css" rel="stylesheet" type="text/css" tal:attributes="href string:${portal_url}/kupuplone.css"/>
+ <link href="kupudrawerstyles.css" rel="stylesheet" type="text/css" tal:attributes="href string:${portal_url}/kupudrawerstyles.css"/>
+ </tal:test>
+
+
+ <tal:test condition="not:exists:portal/portal_javascripts" metal:define-macro="kupu_js_include">
+ <tal:test condition="not:kupu_js_loaded|nothing">
+ <tal:var define="global kupu_js_loaded string:yes"/>
+ <script type="text/javascript" tal:attributes="src string:${portal_url}/kupunoi18n.js"> </script>
+ <script type="text/javascript" tal:attributes="src string:${portal_url}/sarissa.js"> </script>
+ <script type="text/javascript" tal:attributes="src string:${portal_url}/sarissa_ieemu_xpath.js"> </script>
+ <script type="text/javascript" tal:attributes="src string:${portal_url}/kupuhelpers.js"> </script>
+ <script type="text/javascript" tal:attributes="src string:${portal_url}/kupueditor.js"> </script>
+ <script type="text/javascript" tal:attributes="src string:${portal_url}/kupubasetools.js"> </script>
+ <script type="text/javascript" tal:attributes="src string:${portal_url}/kupuloggers.js"> </script>
+ <script type="text/javascript" tal:attributes="src string:${portal_url}/kupucontentfilters.js"> </script>
+ <script type="text/javascript" tal:attributes="src string:${portal_url}/kupucontextmenu.js"> </script>
+
+ <script type="text/javascript" tal:attributes="src string:${portal_url}/kupuploneeditor.js"> </script>
+ <script type="text/javascript" tal:attributes="src string:${portal_url}/kupuploneui.js"> </script>
+
+ <script type="text/javascript" src="kupusourceedit.js" tal:attributes="src string:${portal_url}/kupusourceedit.js"> </script>
+
+ <script type="text/javascript" src="kupudrawers.js" tal:attributes="src string:${portal_url}/kupudrawers.js"> </script>
+ </tal:test>
+ </tal:test>
+
+<tal:condition condition="python:here.kupu_library_tool.installBeforeUnload() and not path('haveBeforeUnload|nothing')">
+ <script tal:condition="not:exists:portal/portal_javascripts" type="text/javascript" src="kupubeforeunload.js" tal:attributes="src string:${portal_url}/kupubeforeunload.js" tal:define="global haveBeforeUnload python:True;"> </script>
+</tal:condition>
+
+
+
+ <script tal:condition="not:exists:portal/portal_javascripts" type="text/javascript" src="kupuploneinit.js" tal:attributes="src string:${portal_url}/kupuploneinit.js"> </script>
+
+ <div class="kupu-tb" id="toolbar">
+
+ <span id="kupu-tb-buttons" class="kupu-tb-buttons">
+
+
+ <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: Access key (Alt or Ctrl) + X" accesskey="x"> </button>
+ </span>
+
+ <span class="kupu-tb-buttongroup" id="kupu-bg-basicmarkup">
+ <button type="button" class="kupu-bold" id="kupu-bold-button" title="Bold: Access key (Alt or Ctrl) + B" i18n:attributes="title" accesskey="b"> </button>
+ <button type="button" class="kupu-italic" id="kupu-italic-button" title="Italic: Access key (Alt or Ctrl) + I" i18n:attributes="title" accesskey="i"> </button>
+ </span>
+
+ <span class="kupu-tb-buttongroup" id="kupu-bg-subsuper">
+ <button type="button" class="kupu-subscript" id="kupu-subscript-button" title="Subscript: Access key (Alt or Ctrl) + -" i18n:attributes="title" accesskey="-"> </button>
+ <button type="button" class="kupu-superscript" id="kupu-superscript-button" title="Superscript: Access key (Alt or Ctrl) + +" i18n:attributes="title" accesskey="+"> </button>
+ </span>
+
+ <span class="kupu-tb-buttongroup" id="kupu-bg-justify">
+ <button type="button" class="kupu-justifyleft" id="kupu-justifyleft-button" title="Left justify: Access key (Alt or Ctrl) + L" i18n:attributes="title" accesskey="l"> </button>
+ <button type="button" class="kupu-justifycenter" id="kupu-justifycenter-button" title="Center justify: Access key (Alt or Ctrl) + C" i18n:attributes="title" accesskey="c"> </button>
+ <button type="button" class="kupu-justifyright" id="kupu-justifyright-button" title="Right justify: Access key (Alt or Ctrl) + R" i18n:attributes="title" accesskey="r"> </button>
+ </span>
+
+ <span class="kupu-tb-buttongroup" id="kupu-bg-list">
+
+ <button type="button" class="kupu-insertorderedlist" title="Numbered list: Access key (Alt or Ctrl) + #" id="kupu-list-ol-addbutton" i18n:attributes="title" accesskey="#"> </button>
+ <button type="button" class="kupu-insertunorderedlist" title="Unordered list: Access key (Alt or Ctrl) + *" id="kupu-list-ul-addbutton" i18n:attributes="title" accesskey="*"> </button>
+ </span>
+
+ <span class="kupu-tb-buttongroup" id="kupu-bg-definitionlist">
+
+ <button type="button" class="kupu-insertdefinitionlist" title="Definition list: Access key (Alt or Ctrl) + =" id="kupu-list-dl-addbutton" i18n:attributes="title" accesskey="="> </button>
+ </span>
+
+ <span class="kupu-tb-buttongroup" id="kupu-bg-indent">
+ <button type="button" class="kupu-outdent" id="kupu-outdent-button" title="Decrease quote level: Access key (Alt or Ctrl) + <" i18n:attributes="title" accesskey="<"> </button>
+ <button type="button" class="kupu-indent" id="kupu-indent-button" title="Increase quote level: Access key (Alt or Ctrl) + >" i18n:attributes="title" accesskey=">"> </button>
+ </span>
+
+ <span class="kupu-tb-buttongroup">
+ <button type="button" class="kupu-image" id="kupu-imagelibdrawer-button" title="Insert image" i18n:attributes="title"> </button>
+ <button type="button" class="kupu-inthyperlink" id="kupu-linklibdrawer-button" title="Insert internal link" i18n:attributes="title"> </button>
+ <button type="button" class="kupu-exthyperlink" id="kupu-linkdrawer-button" title="Insert external link" i18n:attributes="title"> </button>
+ <button type="button" class="kupu-anchors" id="kupu-anchors" title="Insert anchors" i18n:attributes="title"> </button>
+ <button type="button" class="kupu-table" id="kupu-tabledrawer-button" title="Insert table" i18n:attributes="title"> </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"> </button>
+ <button type="button" class="kupu-removelink invisible" id="kupu-removelink-button" title="Remove link" i18n:attributes="title"> </button>
+ </span>
+
+ <span class="kupu-tb-buttongroup" id="kupu-bg-undo">
+ <button type="button" class="kupu-undo" id="kupu-undo-button" title="Undo: Access key (Alt or Ctrl) + Z" i18n:attributes="title" accesskey="z"> </button>
+ <button type="button" class="kupu-redo" id="kupu-redo-button" title="Redo: Access key (Alt or Ctrl) + Y" i18n:attributes="title" accesskey="y"> </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"> </button>
+ </span>
+
+ <span class="kupu-tb-buttongroup kupu-source-span" id="kupu-source">
+ <button type="button" class="kupu-source" id="kupu-source-button" title="Switch between visual editor and HTML view" i18n:attributes="title toggle_source_view;" accesskey="h"> </button>
+ </span>
+
+ <select class="kupu-tb-styles" tal:define="gstyles here/kupu_library_tool/getParagraphStyles|python:[]; lstyles field/widget/parastyles|python:[]; allstyles python:list(gstyles)+list(lstyles);">
+ <option value="p" i18n:translate="">Normal</option>
+ <tal:block condition="allstyles|nothing" repeat="style allstyles">
+ <option i18n:translate="" tal:define="parts python:style.split('|',1)+['','']" tal:attributes="value python:parts[1]" tal:content="python:parts[0]"/>
+ </tal:block>
+ </select>
+
+ </span>
+
+ <select id="kupu-ulstyles" class="kupu-ulstyles">
+ <option value="disc" i18n:translate="list-disc">●</option>
+ <option value="square" i18n:translate="list-square">■</option>
+ <option value="circle" i18n:translate="list-circle">○</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">
+ <iframe style="display:none" class="kupu-anchorframe" src="javascript:''">
+ </iframe>
+ </div>
+
+ <div id="kupu-linkdrawer" class="kupu-drawer kupu-linkdrawer">
+ <h1 class="kupu-drawer-title" 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 class="kupu-linkdrawer-anchors" style="display:none">
+ <td colspan="2">
+ <label i18n:translate="" for="anchorselect">Anchor</label>
+ <select id="anchorselect"><option i18n:translate="" value="">(none)</option></select>
+ </td>
+ </tr>
+ <tr><td colspan="2" align="center">
+ <iframe frameborder="1" scrolling="auto" width="440" height="198" class="kupu-linkdrawer-preview" src="javascript:''">
+ </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 class="kupu-drawer-title" 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>
+ <input class="kupu-tabledrawer-makeheader" type="checkbox" onkeypress="return HandleDrawerEnter(event);" id="tabledrawer_makeheader"/>
+ <label i18n:translate="tabledrawer_headings_label" for="tabledrawer_makeheader">
+ Create Headings
+ </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" i18n:translate="tabledrawer_close_button" onclick="drawertool.closeDrawer(this)">Close</button>
+ </div>
+ </div>
+ </div>
+
+
+ <div id="kupu-anchordrawer" class="kupu-drawer kupu-anchordrawer">
+ <h1 class="kupu-drawer-title" i18n:translate="anchordrawer_title">Anchors</h1>
+ <div class="kupu-panels">
+ <table class="kupu-ins-bm">
+ <tr style="margin-bottom: 5px">
+ <td colspan="2">
+ <label i18n:translate="" for="kupu-ins-bm">
+ Link to anchor
+ </label>
+ <input type="radio" name="kupu-bm-mode" checked="checked" id="kupu-ins-bm"/>
+ <label for="kupu-toc" i18n:translate="">
+ Table of contents
+ </label>
+ <input type="radio" name="kupu-bm-mode" id="kupu-toc"/>
+ </td>
+ </tr>
+ <tr>
+ <td class="kupu-bm-select">
+ <select id="kupu-bm-sel1" size="10"> </select>
+ </td>
+ <td rowspan="2">
+ <div class="kupu-bm-heading">
+ <div style="float:right">
+ <label i18n:translate="" for="kupu-bm-outcls">
+ Table style
+ </label>
+ <select id="kupu-bm-outcls" size="1">
+ <option value="" i18n:translate="">Normal</option>
+ </select>
+ </div>
+ <label for="kupu-bm-checkall">
+ <em i18n:translate="">toggle all</em>
+ </label>
+ <input type="checkbox" checked="checked" id="kupu-bm-checkall"/>
+ </div>
+ <div class="kupu-bm-paras"> </div>
+ <div class="kupu-bm-helpanchor">
+ Select a paragraph style then choose a paragraph and Ok to insert a link to that location.
+ </div>
+ <div class="kupu-bm-helptoc">
+ Select one or two paragraph styles, then Ok to insert a table of contents.
+ </div>
+ </td>
+ </tr>
+ <tr>
+ <td>
+ <select id="kupu-bm-sel2" size="1">
+ <option value="" i18n:translate="">(optional 2nd style)</option>
+ </select>
+ </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>
+ <script type="text/javascript">var focuscount = 0;</script>
+ <iframe class="kupu-editor-iframe" frameborder="0" src="emptypage" onfocus="this.contentWindow.focus();" tal:define="base python:here.kupu_library_tool.getBaseUrl(here, True); base kupu_base_override|base;" tal:attributes="src string:${base}/emptypage; tabindex tabindex/next|nothing;">
+ </iframe>
+ <input type="hidden" name="text_format:default" value="text/html" tal:define="fieldName fieldName|inputname|nothing; val python:fieldName and 'text/html' or 'html'; fieldName python:test(fieldName, fieldName+'_', '') + 'text_format:default';" tal:attributes="name fieldName;value val;"/>
+<tal:test condition="fieldName|nothing">
+ <textarea cols="80" rows="25" tabindex="" class="kupu-editor-textarea" name="description" tal:condition="fieldName|nothing" tal:define="global kupu_content python:here.convertContentForKupu(fieldName, inputvalue);" tal:content="kupu_content" tal:attributes="name inputname; onfocus onfocus|nothing; onblur onblur|nothing; tabindex tabindex|nothing; rows rows|default; cols cols|default;">
+ </textarea>
+</tal:test>
+ <textarea cols="80" rows="25" tabindex="" class="kupu-editor-textarea" name="description" id="kupu-editor-textarea" tal:define="pss modules/Products/PythonScripts/standard; text_format python: getattr(here,'text_format','html'); is_stx python:text_format=='structured-text'; is_ptx python:text_format=='plain';" tal:condition="not:fieldName|nothing" tal:content="python:(is_stx and pss.structured_text(inputvalue)) or (is_ptx and pss.newline_to_br(inputvalue)) or inputvalue" tal:attributes="name inputname; onfocus onfocus|nothing; onblur onblur|nothing; tabindex tabindex|nothing; rows rows|default; cols cols|default;">
+ </textarea>
+
+ <div class="kupuoverride" tal:condition="python:exists('kupu_content') and len(kupu_content)==0" tal:define="floated widget/allow_file_upload | python:1;" tal:attributes="style python:test(floated, 'float:left;;', '');"><span class="discreet"><a class="forcekupu" href="#" i18n:translate="suppress-kupu" tal:attributes="href string:${request/URL0}?kupu.suppress=${fieldName};" title="reload current page without kupu">
+ Edit without visual editor
+ </a></span>
+ </div>
+
+ </div>
+
+ <script type="text/javascript" tal:content="string: addEventHandler(window, 'load', function() { window.kupu = initPloneKupu('${editorid}'); window.kupuui = window.kupu.getTool('ui'); window.drawertool = window.kupu.getTool('drawertool'); window.kupu.initialize();} , document);"/>
+
+ </div>
+
+ <div tal:condition="not:usekupu">
+
+ <tal:test condition="not:exists:portal/portal_css">
+ <link href="kupustyles.css" rel="stylesheet" type="text/css" tal:attributes="href string:${portal_url}/kupustyles.css"/>
+ <link href="kupuplone.css" rel="stylesheet" type="text/css" tal:attributes="href string:${portal_url}/kupuplone.css"/>
+ <link href="kupudrawerstyles.css" rel="stylesheet" type="text/css" tal:attributes="href string:${portal_url}/kupudrawerstyles.css"/>
+ </tal:test>
+
+ <textarea cols="80" rows="25" tabindex="" name="fieldName" tal:content="inputvalue" tal:attributes="name fieldName|inputname; id fieldName|inputname; onfocus onfocus|nothing; onblur onblur|nothing; tabindex tabindex|nothing; rows rows|default; cols cols|default;">
+ </textarea>
+
+ <tal:archetypes tal:condition="fieldName|nothing">
+ <div class="kupuoverride" tal:condition="python:path('widget/allow_format_edit|python:True') and not path('kupu_convert_message_generated|nothing')" tal:define="floated widget/allow_file_upload | python:1;" tal:attributes="style python:test(floated, 'float:left;;', '');">
+ <span class="discreet"><a class="forcekupu" href="#" i18n:translate="force-kupu" tal:condition="python:portal.kupu_library_tool.isKupuEnabled(REQUEST=context.REQUEST, context=context, fieldName=fieldName)" tal:attributes="href string:${request/URL0}?kupu.convert=${fieldName};" title="reload current page using kupu to edit this field">
+ Edit with visual editor
+ </a></span>
+ </div>
+ </tal:archetypes>
+
+ </div>
+ </tal:usekupu>
+ </div>
+
+
+<div xmlns:metal="http://xml.zope.org/namespaces/metal" metal:define-macro="textFormatSelector" class="field">
+ <tal:usekupu xmlns:tal="http://xml.zope.org/namespaces/tal" define="fname fieldName|inputname|nothing; usekupu python:here.contentUsesKupu(fname);">
+ <tal:editor tal:condition="usekupu">
+ <input type="hidden" name="text_format" value="text/html" tal:define="fieldName fieldName|inputname|nothing; val python:fieldName and 'text/html' or 'html'; fieldName python:fieldName and fieldName+'_text_format' or 'text_format';" tal:attributes="name fieldName;value val;"/>
+ </tal:editor>
+ <tal:noeditor tal:condition="not:usekupu">
+ <tal:archetypes tal:condition="fieldName|nothing">
+ <div metal:use-macro="here/widgets/visual/macros/area_format"/>
+ <span tal:condition="python:portal.kupu_library_tool.isKupuEnabled(REQUEST=context.REQUEST, context=context, fieldName=fieldName)" tal:define="global kupu_convert_message_generated python:True">
+ <a href="#" tal:attributes="href python:portal.kupu_library_tool.forcekupu_url(fieldName);">Convert to HTML and edit with the visual editor</a></span>
+ </tal:archetypes>
+ <tal:nonat condition="not:fieldName|nothing">
+ <label for="text_format" i18n:translate="label_format">Format</label>
+
+ <div class="formHelp" i18n:translate="help_format">
+ If you are unsure of which format to use, just select Plain
+ Text and type the document as you usually do.
+ </div>
+
+ <input class="noborder" type="radio" name="text_format" value="structured-text" tabindex="" id="cb_structuredtext" tal:attributes="checked python:test(text_format=='structured-text', 1, None); tabindex tabindex;"/>
+ <label for="cb_structuredtext" i18n:translate="structured_text">Structured Text</label> <br/>
+
+ <input class="noborder" type="radio" name="text_format" value="html" tabindex="" id="cb_html" tal:attributes="checked python:test(text_format=='html', 1, None); tabindex tabindex;"/>
+ <label for="cb_html" i18n:translate="html">HTML</label> <br/>
+
+ <input class="noborder" type="radio" name="text_format" value="plain" tabindex="" id="cb_plain" tal:attributes="checked python:test(text_format=='plain', 1, None); tabindex tabindex;"/>
+ <label for="cb_plain" i18n:translate="plain_text">Plain Text</label>
+ </tal:nonat>
+ </tal:noeditor>
+ </tal:usekupu>
+</div>
+
+
+
+</html>
+
More information about the kupu-checkins
mailing list