Annotation of kupuMPIWG/plone/kupu_plone_layer/kupu_wysiwyg_support.html, revision 1.1
1.1 ! dwinter 1:
! 2: <html xmlns="http://www.w3.org/1999/xhtml" xmlns:i18n="http://xml.zope.org/namespaces/i18n" i18n:domain="kupu">
! 3:
! 4: <!--$Id: include.kupu 11657 2005-04-30 17:19:15Z guido $-->
! 5: <!--$Id: wire.kupu 12162 2005-05-10 15:53:10Z guido $-->
! 6: <!--$Id: html.kupu 14296 2005-07-05 15:02:12Z duncan $-->
! 7: <!--$Id: head.kupu 14296 2005-07-05 15:02:12Z duncan $-->
! 8: <!--$Id: body.kupu 9779 2005-03-15 11:34:47Z duncan $-->
! 9: <!--$Id: xmlconfig.kupu 12162 2005-05-10 15:53:10Z guido $-->
! 10: <!--$Id: saveonpart.kupu 9520 2005-02-26 16:30:23Z duncan $-->
! 11: <!--$Id: sourceedit.kupu 9779 2005-03-15 11:34:47Z duncan $-->
! 12: <!--$Id: sourceedit.kupu 9779 2005-03-15 11:34:47Z duncan $-->
! 13: <!--$Id: contextmenu.kupu 9520 2005-02-26 16:30:23Z duncan $-->
! 14: <!--$Id: toolbar.kupu 15499 2005-08-01 14:56:39Z duncan $-->
! 15: <!--$Id: toolboxes.kupu 13098 2005-06-06 12:11:48Z mihxil $-->
! 16: <!--$Id: colorchooser.kupu 9520 2005-02-26 16:30:23Z duncan $-->
! 17: <!--$Id: save.kupu 9520 2005-02-26 16:30:23Z duncan $-->
! 18: <!--$Id: drawers.kupu 15396 2005-07-30 08:03:51Z gotcha $-->
! 19: <!--$Id: include.kupu 9520 2005-02-26 16:30:23Z duncan $-->
! 20: <!--$Id: wire.kupu 15258 2005-07-28 15:08:12Z duncan $-->
! 21: <!--$Id: head.kupu 14575 2005-07-12 20:18:12Z duncan $-->
! 22: <!--$Id: xmlconfig.kupu 12437 2005-05-18 13:19:00Z duncan $-->
! 23: <!--$Id: body.kupu 15258 2005-07-28 15:08:12Z duncan $-->
! 24: <!--$Id: toolbar.kupu 15499 2005-08-01 14:56:39Z duncan $-->
! 25: <!--$Id: drawers.kupu 14575 2005-07-12 20:18:12Z duncan $-->
! 26: <!--$Id: beforeunload.kupu 14575 2005-07-12 20:18:12Z duncan $-->
! 27: <!--$Id: sourceedit.kupu 14575 2005-07-12 20:18:12Z duncan $-->
! 28: <!--$Id: wysiwyg_support.kupu 15258 2005-07-28 15:08:12Z duncan $-->
! 29:
! 30:
! 31: <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">
! 32: <tal:usekupu define="fname fieldName|inputname|nothing; usekupu python:here.contentUsesKupu(fname);">
! 33: <div tal:condition="usekupu">
! 34:
! 35: <div style="display: none;">
! 36: <xml id="kupuconfig" class="kupuconfig">
! 37: <kupuconfig>
! 38:
! 39: <dst>fulldoc.html</dst>
! 40: <use_css>0</use_css>
! 41: <reload_after_save>0</reload_after_save>
! 42: <strict_output>1</strict_output>
! 43: <content_type>application/xhtml+xml</content_type>
! 44: <compatible_singletons>1</compatible_singletons>
! 45:
! 46: <tal:block define="table_classnames here/get_table_classnames|here/kupu_library_tool/getTableClassnames|nothing">
! 47: <table_classes tal:condition="table_classnames">
! 48: <class tal:content="class" tal:repeat="class table_classnames"/>
! 49: </table_classes>
! 50: </tal:block>
! 51:
! 52: <tal:block define="excludes here/kupu_library_tool/getHtmlExclusions">
! 53: <htmlfilter tal:condition="excludes">
! 54: <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">
! 55: </a><t tal:repeat="tag tags" tal:content="tag"/></c></tal:block></tal:block>
! 56: <style tal:repeat="st here/kupu_library_tool/getStyleWhitelist" tal:content="st"/>
! 57: <class tal:repeat="cl here/kupu_library_tool/getClassBlacklist" tal:content="cl"/>
! 58: </htmlfilter>
! 59: </tal:block>
! 60:
! 61: <tal:var define="field field|nothing; usecaptions python:field and field.default_output_type=='text/x-html-captioned'">
! 62: <captions tal:condition="usecaptions">1</captions>
! 63: </tal:var>
! 64: <image_xsl_uri tal:content="string:${portal_url}/kupudrawers/drawer.xsl"/>
! 65: <link_xsl_uri tal:content="string:${portal_url}/kupudrawers/drawer.xsl"/>
! 66: <tal:var define=" base kupu_base_override|here/absolute_url; posfactory python:base.find('/portal_factory/'); base python:posfactory > 0 and base[:posfactory] or base; lib_prefix string:${base}/kupulibraries.xml?resource_type=; search_prefix string:${portal_url}/kupusearch.xml?resource_type=;">
! 67: <image_libraries_uri tal:content="string:${lib_prefix}mediaobject"/>
! 68: <link_libraries_uri tal:content="string:${lib_prefix}linkable"/>
! 69: <search_images_uri tal:content="string:${search_prefix}mediaobject"/>
! 70: <search_links_uri tal:content="string:${search_prefix}linkable"/>
! 71: </tal:var>
! 72:
! 73: </kupuconfig>
! 74: </xml>
! 75: </div>
! 76:
! 77: <div class="kupu-fulleditor">
! 78:
! 79: <tal:test condition="not:exists:portal/portal_css">
! 80: <link href="kupustyles.css" rel="stylesheet" type="text/css" tal:attributes="href string:${portal_url}/kupustyles.css"/>
! 81: <link href="kupuplone.css" rel="stylesheet" type="text/css" tal:attributes="href string:${portal_url}/kupuplone.css"/>
! 82: <link href="kupudrawerstyles.css" rel="stylesheet" type="text/css" tal:attributes="href string:${portal_url}/kupudrawerstyles.css"/>
! 83: </tal:test>
! 84:
! 85:
! 86: <tal:test condition="not:exists:portal/portal_javascripts">
! 87: <script type="text/javascript" tal:attributes="src string:${portal_url}/kupunoi18n.js"> </script>
! 88: <script type="text/javascript" tal:attributes="src string:${portal_url}/sarissa.js"> </script>
! 89: <script type="text/javascript" tal:attributes="src string:${portal_url}/sarissa_ieemu_xpath.js"> </script>
! 90: <script type="text/javascript" tal:attributes="src string:${portal_url}/kupuhelpers.js"> </script>
! 91: <script type="text/javascript" tal:attributes="src string:${portal_url}/kupueditor.js"> </script>
! 92: <script type="text/javascript" tal:attributes="src string:${portal_url}/kupubasetools.js"> </script>
! 93: <script type="text/javascript" tal:attributes="src string:${portal_url}/kupuloggers.js"> </script>
! 94: <script type="text/javascript" tal:attributes="src string:${portal_url}/kupucontentfilters.js"> </script>
! 95: <script type="text/javascript" tal:attributes="src string:${portal_url}/kupucontextmenu.js"> </script>
! 96:
! 97: <script type="text/javascript" tal:attributes="src string:${portal_url}/kupuploneeditor.js"> </script>
! 98: <script type="text/javascript" tal:attributes="src string:${portal_url}/kupuploneui.js"> </script>
! 99:
! 100: <script type="text/javascript" src="kupusourceedit.js" tal:attributes="src string:${portal_url}/kupusourceedit.js"> </script>
! 101:
! 102: <script type="text/javascript" src="kupudrawers.js" tal:attributes="src string:${portal_url}/kupudrawers.js"> </script>
! 103: </tal:test>
! 104:
! 105: <tal:condition condition="python:here.kupu_library_tool.installBeforeUnload() and not path('haveBeforeUnload|nothing')">
! 106: <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>
! 107: </tal:condition>
! 108:
! 109:
! 110:
! 111: <script tal:condition="not:exists:portal/portal_javascripts" type="text/javascript" src="kupuploneinit.js" tal:attributes="src string:${portal_url}/kupuploneinit.js"> </script>
! 112:
! 113: <div class="kupu-tb" id="toolbar">
! 114:
! 115: <span id="kupu-tb-buttons" class="kupu-tb-buttons">
! 116:
! 117: <span class="kupu-tb-buttongroup kupu-logo" style="float: right">
! 118: <button type="button" class="kupu-logo" title="Kupu 1.3 rc2" accesskey="k" id="kupu-logo-button" onclick="window.open('http://kupu.oscom.org');" tal:attributes="tabindex python:tabindex+1;"> </button>
! 119: </span>
! 120:
! 121: <span class="kupu-tb-buttongroup" style="float: right" id="kupu-zoom">
! 122: <button type="button" class="kupu-zoom" id="kupu-zoom-button" title="zoom: alt-x" accesskey="x"> </button>
! 123: </span>
! 124:
! 125: <select class="kupu-tb-styles">
! 126: <option value="p" i18n:translate="">Normal</option>
! 127: <tal:block condition="here/kupu_library_tool/getParagraphStyles|nothing" repeat="style here/kupu_library_tool/getParagraphStyles">
! 128: <option i18n:translate="" tal:define="parts python:style.split('|',1)+['','']" tal:attributes="value python:parts[1]" tal:content="python:parts[0]"/>
! 129: </tal:block>
! 130: <tal:block tal:condition="field/widget/parastyles|nothing">
! 131: <option tal:condition="field/widget/parastyles" tal:repeat="style field/widget/parastyles" tal:attributes="value python:style[0]" tal:content="python:style[1]"/>
! 132: </tal:block>
! 133: </select>
! 134:
! 135: <span class="kupu-tb-buttongroup" id="kupu-bg-basicmarkup">
! 136: <button type="button" class="kupu-bold" id="kupu-bold-button" title="bold: alt-b" i18n:attributes="title" accesskey="b"> </button>
! 137: <button type="button" class="kupu-italic" id="kupu-italic-button" title="italic: alt-i" i18n:attributes="title" accesskey="i"> </button>
! 138: <button type="button" class="kupu-underline" id="kupu-underline-button" title="underline: alt-u" i18n:attributes="title" accesskey="u"> </button>
! 139: </span>
! 140:
! 141: <span class="kupu-tb-buttongroup" id="kupu-bg-subsuper">
! 142: <button type="button" class="kupu-subscript" id="kupu-subscript-button" title="subscript: alt--" i18n:attributes="title" accesskey="-"> </button>
! 143: <button type="button" class="kupu-superscript" id="kupu-superscript-button" title="superscript: alt-+" i18n:attributes="title" accesskey="+"> </button>
! 144: </span>
! 145:
! 146: <span class="kupu-tb-buttongroup" id="kupu-bg-justify">
! 147: <button type="button" class="kupu-justifyleft" id="kupu-justifyleft-button" title="left justify: alt-l" i18n:attributes="title" accesskey="l"> </button>
! 148: <button type="button" class="kupu-justifycenter" id="kupu-justifycenter-button" title="center justify: alt-c" i18n:attributes="title" accesskey="c"> </button>
! 149: <button type="button" class="kupu-justifyright" id="kupu-justifyright-button" title="right justify: alt-r" i18n:attributes="title" accesskey="r"> </button>
! 150: </span>
! 151:
! 152: <span class="kupu-tb-buttongroup" id="kupu-bg-list">
! 153:
! 154: <button type="button" class="kupu-insertorderedlist" title="numbered list: alt-#" id="kupu-list-ol-addbutton" i18n:attributes="title" accesskey="#"> </button>
! 155: <button type="button" class="kupu-insertunorderedlist" title="unordered list: alt-*" id="kupu-list-ul-addbutton" i18n:attributes="title" accesskey="*"> </button>
! 156: </span>
! 157:
! 158: <span class="kupu-tb-buttongroup" id="kupu-bg-definitionlist">
! 159:
! 160: <button type="button" class="kupu-insertdefinitionlist" title="definition list: alt-=" id="kupu-list-dl-addbutton" i18n:attributes="title" accesskey="="> </button>
! 161: </span>
! 162:
! 163: <span class="kupu-tb-buttongroup" id="kupu-bg-indent">
! 164: <button type="button" class="kupu-outdent" id="kupu-outdent-button" title="outdent: alt-<" i18n:attributes="title" accesskey="<"> </button>
! 165: <button type="button" class="kupu-indent" id="kupu-indent-button" title="indent: alt->" i18n:attributes="title" accesskey=">"> </button>
! 166: </span>
! 167:
! 168: <span class="kupu-tb-buttongroup">
! 169: <button type="button" class="kupu-image" id="kupu-imagelibdrawer-button" title="image" i18n:attributes="title"> </button>
! 170: <button type="button" class="kupu-inthyperlink" id="kupu-linklibdrawer-button" title="internal link" i18n:attributes="title"> </button>
! 171: <button type="button" class="kupu-exthyperlink" id="kupu-linkdrawer-button" title="external link" i18n:attributes="title"> </button>
! 172: <button type="button" class="kupu-table" id="kupu-tabledrawer-button" title="table" i18n:attributes="title"> </button>
! 173: </span>
! 174:
! 175: <span class="kupu-tb-buttongroup" id="kupu-bg-remove">
! 176: <button type="button" class="kupu-removeimage invisible" id="kupu-removeimage-button" title="Remove image" i18n:attributes="title"> </button>
! 177: <button type="button" class="kupu-removelink invisible" id="kupu-removelink-button" title="Remove link" i18n:attributes="title"> </button>
! 178: </span>
! 179:
! 180: <span class="kupu-tb-buttongroup" id="kupu-bg-undo">
! 181: <button type="button" class="kupu-undo" id="kupu-undo-button" title="undo: alt-z" i18n:attributes="title" accesskey="z"> </button>
! 182: <button type="button" class="kupu-redo" id="kupu-redo-button" title="redo: alt-y" i18n:attributes="title" accesskey="y"> </button>
! 183: </span>
! 184:
! 185: <span class="kupu-tb-buttongroup kupu-spellchecker-span" id="kupu-spellchecker">
! 186: <button type="button" class="kupu-spellchecker" id="kupu-spellchecker-button" title="check spelling" i18n:attributes="title"> </button>
! 187: </span>
! 188:
! 189: <span class="kupu-tb-buttongroup kupu-source-span" id="kupu-source">
! 190: <button type="button" class="kupu-source" id="kupu-source-button" title="edit HTML code" i18n:attributes="title"> </button>
! 191: </span>
! 192:
! 193: </span>
! 194:
! 195: <select id="kupu-ulstyles" class="kupu-ulstyles">
! 196: <option value="disc" i18n:translate="list-disc">●</option>
! 197: <option value="square" i18n:translate="list-square">■</option>
! 198: <option value="circle" i18n:translate="list-circle">○</option>
! 199: <option value="none" i18n:translate="list-nobullet">no bullet</option>
! 200: </select>
! 201: <select id="kupu-olstyles" class="kupu-olstyles">
! 202: <option value="decimal" i18n:translate="list-decimal">1</option>
! 203: <option value="upper-roman" i18n:translate="list-upperroman">I</option>
! 204: <option value="lower-roman" i18n:translate="list-lowerroman">i</option>
! 205: <option value="upper-alpha" i18n:translate="list-upperalpha">A</option>
! 206: <option value="lower-alpha" i18n:translate="list-loweralpha">a</option>
! 207: </select>
! 208:
! 209:
! 210: <div style="display:block;" class="kupu-librarydrawer-parent">
! 211:
! 212: </div>
! 213:
! 214: <div id="kupu-linkdrawer" class="kupu-drawer kupu-linkdrawer">
! 215: <h1 i18n:translate="">External Link</h1>
! 216:
! 217: <div id="kupu-linkdrawer-addlink" class="kupu-panels kupu-linkdrawer-addlink">
! 218: <table cellspacing="0">
! 219: <tr><td><div class="kupu-toolbox-label">
! 220:
! 221: <span i18n:translate="">
! 222: Link the highlighted text to this URL:
! 223: </span>
! 224: </div>
! 225:
! 226: <input class="kupu-toolbox-st kupu-linkdrawer-input" type="text" onkeypress="return HandleDrawerEnter(event, 'linkdrawer-preview');"/>
! 227: </td>
! 228: <td class="kupu-preview-button">
! 229: <button class="kupu-dialog-button" type="button" id="linkdrawer-preview" onclick="drawertool.current_drawer.preview()" i18n:translate="">Preview</button>
! 230: </td></tr>
! 231: <tr><td colspan="2" align="center">
! 232: <iframe frameborder="1" scrolling="auto" width="440" height="198" class="kupu-linkdrawer-preview" src="kupublank.html">
! 233: </iframe>
! 234: </td></tr>
! 235: </table>
! 236:
! 237: <div class="kupu-dialogbuttons">
! 238: <button class="kupu-dialog-button" type="button" onclick="drawertool.current_drawer.save()" i18n:translate="">Ok</button>
! 239: <button class="kupu-dialog-button" type="button" onclick="drawertool.closeDrawer()" i18n:translate="">Cancel</button>
! 240: </div>
! 241:
! 242: </div>
! 243: </div>
! 244:
! 245: <div id="kupu-tabledrawer" class="kupu-drawer kupu-tabledrawer">
! 246: <h1 i18n:translate="tabledrawer_title">Table</h1>
! 247: <div class="kupu-panels">
! 248: <table width="300">
! 249: <tr class="kupu-panelsrow">
! 250: <td class="kupu-panel">
! 251:
! 252: <div class="kupu-tabledrawer-addtable">
! 253: <table>
! 254: <tr>
! 255: <th i18n:translate="tabledrawer_class_label" class="kupu-toolbox-label">Table Class</th>
! 256: <td>
! 257: <select class="kupu-tabledrawer-classchooser">
! 258: <option value="plain">Plain</option>
! 259: <option value="listing">Listing</option>
! 260: <option value="grid">Grid</option>
! 261: <option value="data">Data</option>
! 262: </select>
! 263: </td>
! 264: </tr>
! 265: <tr>
! 266: <th i18n:translate="tabledrawer_rows_label" class="kupu-toolbox-label">Rows</th>
! 267: <td><input type="text" class="kupu-tabledrawer-newrows" onkeypress="return HandleDrawerEnter(event);"/></td>
! 268: </tr>
! 269: <tr>
! 270: <th i18n:translate="tabledrawer_columns_label" class="kupu-toolbox-label">Columns</th>
! 271: <td><input type="text" class="kupu-tabledrawer-newcols" onkeypress="return HandleDrawerEnter(event);"/></td>
! 272: </tr>
! 273: <tr>
! 274: <th class="kupu-toolbox-label"> </th>
! 275: <td>
! 276: <label><input class="kupu-tabledrawer-makeheader" type="checkbox" onkeypress="return HandleDrawerEnter(event);"/>
! 277: <span i18n:translate="tabledrawer_headings_label">Create Headings</span></label>
! 278: </td>
! 279: </tr>
! 280: <tr>
! 281: <th class="kupu-toolbox-label"> </th>
! 282: <td>
! 283: <button class="kupu-dialog-button" type="button" i18n:translate="tabledrawer_add_table_button" onclick="drawertool.current_drawer.createTable()">Add Table</button>
! 284: <button class="kupu-dialog-button" type="button" i18n:translate="tabledrawer_fix_tables_button" onclick="drawertool.current_drawer.fixAllTables()">Fix All Tables</button>
! 285: </td>
! 286: </tr>
! 287: </table>
! 288: </div>
! 289:
! 290:
! 291: <div class="kupu-tabledrawer-edittable">
! 292: <table>
! 293: <tr>
! 294: <th class="kupu-toolbox-label" i18n:translate="tabledrawer_class_label">Table Class</th>
! 295: <td>
! 296: <select class="kupu-tabledrawer-classchooser" onchange="drawertool.current_drawer.setTableClass(this.options[this.selectedIndex].value)">
! 297: <option value="plain">Plain</option>
! 298: <option value="listing">Listing</option>
! 299: <option value="grid">Grid</option>
! 300: <option value="data">Data</option>
! 301: </select>
! 302: </td>
! 303: </tr>
! 304: <tr>
! 305: <th class="kupu-toolbox-label" i18n:translate="tabledrawer_alignment_label">Current column alignment</th>
! 306: <td>
! 307: <select id="kupu-tabledrawer-alignchooser" class="kupu-tabledrawer-alignchooser" onchange="drawertool.current_drawer.tool.setColumnAlign(this.options[this.selectedIndex].value)">
! 308: <option i18n:translate="tabledrawer_left_option" value="left">Left</option>
! 309: <option i18n:translate="tabledrawer_center_option" value="center">Center</option>
! 310: <option i18n:translate="tabledrawer_right_option" value="right">Right</option>
! 311: </select>
! 312: </td>
! 313: </tr>
! 314: <tr>
! 315: <th class="kupu-toolbox-label" i18n:translate="tabledrawer_column_label">Column</th>
! 316: <td>
! 317: <button class="kupu-dialog-button" type="button" i18n:translate="tabledrawer_add_button" onclick="drawertool.current_drawer.addTableColumn()">Add</button>
! 318: <button class="kupu-dialog-button" type="button" i18n:translate="tabledrawer_remove_button" onclick="drawertool.current_drawer.delTableColumn()">Remove</button>
! 319: </td>
! 320: </tr>
! 321: <tr>
! 322: <th class="kupu-toolbox-label" i18n:translate="tabledrawer_row_label">Row</th>
! 323: <td>
! 324: <button class="kupu-dialog-button" type="button" i18n:translate="tabledrawer_add_button" onclick="drawertool.current_drawer.addTableRow()">Add</button>
! 325: <button class="kupu-dialog-button" type="button" i18n:translate="tabledrawer_remove_button" onclick="drawertool.current_drawer.delTableRow()">Remove</button>
! 326: </td>
! 327: </tr>
! 328: <tr>
! 329: <th class="kupu-toolbox-label" i18n:translate="tabledrawer_fix_table_label">Fix Table</th>
! 330: <td>
! 331: <button class="kupu-dialog-button" type="button" i18n:translate="tabledrawer_fix_button" onclick="drawertool.current_drawer.fixTable()">Fix</button>
! 332: </td>
! 333: </tr>
! 334: </table>
! 335: </div>
! 336: </td>
! 337: </tr>
! 338: </table>
! 339: <div class="kupu-dialogbuttons">
! 340: <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>
! 341: </div>
! 342: </div>
! 343: </div>
! 344:
! 345:
! 346:
! 347: </div>
! 348: <script type="text/javascript">var focuscount = 0;</script>
! 349: <iframe class="kupu-editor-iframe" frameborder="0" src="emptypage" onfocus="this.contentWindow.focus();" tal:define=" base here/absolute_url; posfactory python:base.find('/portal_factory/'); base python:posfactory > 0 and base[:posfactory+15] or base; base kupu_base_override|base;" tal:attributes="src string:${base}/emptypage; tabindex python:tabindex+1;">
! 350: </iframe>
! 351: <tal:test condition="fieldName|nothing">
! 352: <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;">
! 353: </textarea>
! 354: </tal:test>
! 355: <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;">
! 356: </textarea>
! 357:
! 358: <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">
! 359: edit without using Kupu
! 360: </a></span>
! 361: </div>
! 362:
! 363: </div>
! 364:
! 365: <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);"/>
! 366:
! 367: </div>
! 368:
! 369: <div tal:condition="not:usekupu">
! 370:
! 371: <tal:test condition="not:exists:portal/portal_css">
! 372: <link href="kupustyles.css" rel="stylesheet" type="text/css" tal:attributes="href string:${portal_url}/kupustyles.css"/>
! 373: <link href="kupuplone.css" rel="stylesheet" type="text/css" tal:attributes="href string:${portal_url}/kupuplone.css"/>
! 374: <link href="kupudrawerstyles.css" rel="stylesheet" type="text/css" tal:attributes="href string:${portal_url}/kupudrawerstyles.css"/>
! 375: </tal:test>
! 376:
! 377: <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;">
! 378: </textarea>
! 379:
! 380: <tal:archetypes tal:condition="fieldName|nothing">
! 381: <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;;', '');">
! 382: <span class="discreet"><a class="forcekupu" href="#" i18n:translate="force-kupu" tal:condition="python:portal.kupu_library_tool.isKupuEnabled(REQUEST=context.REQUEST)" tal:attributes="href string:${request/URL0}?kupu.convert=${fieldName};" title="reload current page using kupu to edit this field">
! 383: edit with Kupu
! 384: </a></span>
! 385: </div>
! 386: </tal:archetypes>
! 387:
! 388: </div>
! 389: </tal:usekupu>
! 390: </div>
! 391:
! 392:
! 393: <div xmlns:metal="http://xml.zope.org/namespaces/metal" metal:define-macro="textFormatSelector" class="field">
! 394: <tal:usekupu xmlns:tal="http://xml.zope.org/namespaces/tal" define="fname fieldName|inputname|nothing; usekupu python:here.contentUsesKupu(fname);">
! 395: <tal:editor tal:condition="usekupu">
! 396: <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;"/>
! 397: </tal:editor>
! 398: <tal:noeditor tal:condition="not:usekupu">
! 399: <tal:archetypes tal:condition="fieldName|nothing">
! 400: <div metal:use-macro="here/widgets/visual/macros/area_format"/>
! 401: <span tal:condition="python:portal.kupu_library_tool.isKupuEnabled(REQUEST=context.REQUEST)" tal:define="global kupu_convert_message_generated python:True">
! 402: <a href="#" tal:attributes="href string:${request/URL0}?kupu.convert=${fieldName};">Convert to HTML and edit with Kupu</a></span>
! 403: </tal:archetypes>
! 404: <tal:nonat condition="not:fieldName|nothing">
! 405: <label for="text_format" i18n:translate="label_format">Format</label>
! 406:
! 407: <div class="formHelp" i18n:translate="help_format">
! 408: If you are unsure of which format to use, just select Plain
! 409: Text and type the document as you usually do.
! 410: </div>
! 411:
! 412: <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;"/>
! 413: <label for="cb_structuredtext" i18n:translate="structured_text">Structured Text</label> <br/>
! 414:
! 415: <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;"/>
! 416: <label for="cb_html" i18n:translate="html">HTML</label> <br/>
! 417:
! 418: <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;"/>
! 419: <label for="cb_plain" i18n:translate="plain_text">Plain Text</label>
! 420: </tal:nonat>
! 421: </tal:noeditor>
! 422: </tal:usekupu>
! 423: </div>
! 424:
! 425:
! 426:
! 427: </html>
! 428:
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>