Annotation of kupu/plone/body.kupu, revision 1.1.1.1

1.1       dwinter     1: <kupu:feature
                      2:     name="body"
                      3:     implementation="plone"
                      4:     xmlns="http://www.w3.org/1999/xhtml"
                      5:     xmlns:kupu="http://kupu.oscom.org/namespaces/dist"
                      6:     xmlns:tal="http://xml.zope.org/namespaces/tal"
                      7:     xmlns:i18n="http://xml.zope.org/namespaces/i18n"
                      8:     >
                      9:   <kupu:id>$Id: body.kupu 15693 2005-08-05 14:14:33Z duncan $</kupu:id>
                     10:   <kupu:part name="editorframe"><script type="text/javascript">var focuscount = 0;</script>
                     11:     <iframe
                     12:    class="kupu-editor-iframe"
                     13:         frameborder="0"
                     14:         src="emptypage"
                     15:         onfocus="this.contentWindow.focus();"
                     16:         tal:define="
                     17:                 base here/absolute_url;
                     18:                 posfactory python:base.find('/portal_factory/');
                     19:                 base python:posfactory > 0 and base[:posfactory+15] or base;
                     20:                 base kupu_base_override|base;"
                     21:         tal:attributes="src string:${base}/emptypage; tabindex python:tabindex+1;"
                     22:         >
                     23:     </iframe>
                     24: <tal:test condition="fieldName|nothing">
                     25:     <textarea cols="80" rows="25"
                     26:         tabindex=""
                     27:         class="kupu-editor-textarea"
                     28:         name="description"
                     29:         tal:condition="fieldName|nothing"
                     30:         tal:define="global kupu_content python:here.convertContentForKupu(fieldName, inputvalue);"
                     31:         tal:content="kupu_content"
                     32:         tal:attributes="name inputname;
                     33:                         onfocus onfocus|nothing;
                     34:                         onblur onblur|nothing;
                     35:                         tabindex tabindex|nothing;
                     36:                         rows rows|default;
                     37:                         cols cols|default;">
                     38:     </textarea>
                     39: </tal:test>
                     40:     <textarea cols="80" rows="25"
                     41:         tabindex=""
                     42:         class="kupu-editor-textarea"
                     43:         name="description"
                     44:         id="kupu-editor-textarea"
                     45:         tal:define="pss modules/Products/PythonScripts/standard;
                     46:                 text_format python: getattr(here,'text_format','html');
                     47:                 is_stx python:text_format=='structured-text';
                     48:                 is_ptx python:text_format=='plain';"
                     49: 
                     50:         tal:condition="not:fieldName|nothing"
                     51:         tal:content="python:(is_stx and pss.structured_text(inputvalue))
                     52:                                                or (is_ptx and pss.newline_to_br(inputvalue))
                     53:                                                or inputvalue"
                     54:         tal:attributes="name inputname;
                     55:                         onfocus onfocus|nothing;
                     56:                         onblur onblur|nothing;
                     57:                         tabindex tabindex|nothing;
                     58:                         rows rows|default;
                     59:                         cols cols|default;">
                     60:     </textarea>
                     61:   </kupu:part>
                     62: 
                     63:   <kupu:part name="suppress-kupu">
                     64:     <div class="kupuoverride"
                     65:         tal:condition="python:exists('kupu_content') and len(kupu_content)==0"
                     66:         tal:define="floated widget/allow_file_upload | python:1;"
                     67:         tal:attributes="style python:test(floated, 'float:left;;', '');"
                     68:       ><span class="discreet"><a class="forcekupu" href="#"
                     69:         i18n:translate="suppress-kupu"
                     70:         tal:attributes="href string:${request/URL0}?kupu.suppress=${fieldName};"
                     71:         title="reload current page without kupu">
                     72:          edit without using Kupu
                     73:       </a></span>
                     74:     </div>
                     75:   </kupu:part>
                     76: 
                     77:   <kupu:part name="force-kupu">
                     78:     <tal:archetypes tal:condition="fieldName|nothing">
                     79:       <div class="kupuoverride"
                     80:         tal:condition="python:path('widget/allow_format_edit|python:True') and not path('kupu_convert_message_generated|nothing')"
                     81:         tal:define="floated widget/allow_file_upload | python:1;"
                     82:         tal:attributes="style python:test(floated, 'float:left;;', '');"
                     83:         >
                     84:         <span class="discreet"><a class="forcekupu" href="#"
                     85:            i18n:translate="force-kupu"
                     86:            tal:condition="python:portal.kupu_library_tool.isKupuEnabled(REQUEST=context.REQUEST)"
                     87:            tal:attributes="href string:${request/URL0}?kupu.convert=${fieldName};"
                     88:            title="reload current page using kupu to edit this field">
                     89:            edit with Kupu
                     90:         </a></span>
                     91:       </div>
                     92:     </tal:archetypes>
                     93:   </kupu:part>
                     94: </kupu:feature>

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>