[kupu-checkins] r52772 - in kupu/trunk/kupu: doc plone plone/kupu_plone_layer

duncan at codespeak.net duncan at codespeak.net
Thu Mar 20 14:52:14 CET 2008


Author: duncan
Date: Thu Mar 20 14:52:12 2008
New Revision: 52772

Modified:
   kupu/trunk/kupu/doc/CHANGES.txt
   kupu/trunk/kupu/plone/body.kupu
   kupu/trunk/kupu/plone/kupu_plone_layer/kupu_wysiwyg_support.html
   kupu/trunk/kupu/plone/kupu_plone_layer/kupuplone.css.dtml
Log:
Fix plone ticket #7409 "edit without kupu" does not appear on edit form

Modified: kupu/trunk/kupu/doc/CHANGES.txt
==============================================================================
--- kupu/trunk/kupu/doc/CHANGES.txt	(original)
+++ kupu/trunk/kupu/doc/CHANGES.txt	Thu Mar 20 14:52:12 2008
@@ -7,9 +7,12 @@
   - Manage anchors didn't add an anchor correctly if there was an
     anchor used for a link inside the element.
 
+  - timte fixed a possible unicode decode error
+
   - Plone tickets
 
     * 6915 Kupu can't find anchors inside table cells
+    * 7409 "edit without kupu" does not appear on edit form (the fix for this make the link appear but only in source mode).
     * 7804 KupuLibraryTool spellcheck method is missing a docstring
     * 7893 Workaround for bad KSS form submissions
     * 7916 Kupu breaks strong/em tags with class names, on firefox

Modified: kupu/trunk/kupu/plone/body.kupu
==============================================================================
--- kupu/trunk/kupu/plone/body.kupu	(original)
+++ kupu/trunk/kupu/plone/body.kupu	Thu Mar 20 14:52:12 2008
@@ -65,15 +65,17 @@
 
   <kupu:part name="suppress-kupu">
     <div class="kupuoverride"
-        tal:condition="python:exists('kupu_content') and len(kupu_content)==0 and allowed and len(allowed)!=1"
+        tal:condition="python:exists('kupu_content') and allowed and len(allowed)!=1"
         tal:define="floated widget/allow_file_upload | python:1;
+                klass python:test(len(kupu_content), ' kupusourceoverride', '');
                 gAC nocall:field/getAllowedContentTypes|nothing;
                 allowed python:gAC and gAC(context) or path('field/allowable_content_types|nothing');"
-        tal:attributes="style python:test(floated, 'float:left;;', '');"
+        tal:attributes="style python:test(floated, 'float:left;;', '');class string:kupuoverride$klass"
       ><span class="discreet"><a class="forcekupu" href="#"
         i18n:translate="suppress-kupu" i18n:attributes="title title_suppress_kupu;"
-        tal:define="fs fieldset|nothing;fs python:test(fs,'&amp;fieldset=%s'%fs,None);"
-        tal:attributes="href string:${request/URL0}?kupu.suppress=${fieldName}${fs};"
+        tal:define="fs fieldset|nothing;fs python:test(fs,'&amp;fieldset=%s'%fs,'');
+        editaction python:context.getActionInfo('object/edit')['url'];"
+        tal:attributes="href string:${editaction}?kupu.suppress=${fieldName}${fs};"
         title="reload current page without kupu">
          Edit without visual editor
       </a></span>

Modified: kupu/trunk/kupu/plone/kupu_plone_layer/kupu_wysiwyg_support.html
==============================================================================
--- kupu/trunk/kupu/plone/kupu_plone_layer/kupu_wysiwyg_support.html	(original)
+++ kupu/trunk/kupu/plone/kupu_plone_layer/kupu_wysiwyg_support.html	Thu Mar 20 14:52:12 2008
@@ -483,7 +483,7 @@
     </textarea>
     </div>
   
-    <div class="kupuoverride" tal:condition="python:exists('kupu_content') and len(kupu_content)==0 and allowed and len(allowed)!=1" tal:define="floated widget/allow_file_upload | python:1;                 gAC nocall:field/getAllowedContentTypes|nothing;                 allowed python:gAC and gAC(context) or path('field/allowable_content_types|nothing');" tal:attributes="style python:test(floated, 'float:left;;', '');"><span class="discreet"><a class="forcekupu" href="#" i18n:translate="suppress-kupu" i18n:attributes="title title_suppress_kupu;" tal:define="fs fieldset|nothing;fs python:test(fs,'&amp;fieldset=%s'%fs,None);" tal:attributes="href string:${request/URL0}?kupu.suppress=${fieldName}${fs};" title="reload current page without kupu">
+    <div class="kupuoverride" tal:condition="python:exists('kupu_content') and allowed and len(allowed)!=1" tal:define="floated widget/allow_file_upload | python:1;                 klass python:test(len(kupu_content), ' kupusourceoverride', '');                 gAC nocall:field/getAllowedContentTypes|nothing;                 allowed python:gAC and gAC(context) or path('field/allowable_content_types|nothing');" tal:attributes="style python:test(floated, 'float:left;;', '');class string:kupuoverride$klass"><span class="discreet"><a class="forcekupu" href="#" i18n:translate="suppress-kupu" i18n:attributes="title title_suppress_kupu;" tal:define="fs fieldset|nothing;fs python:test(fs,'&amp;fieldset=%s'%fs,'');         editaction python:context.getActionInfo('object/edit')['url'];" tal:attributes="href string:${editaction}?kupu.suppress=${fieldName}${fs};" title="reload current page without kupu">
          Edit without visual editor
       </a></span>
     </div>

Modified: kupu/trunk/kupu/plone/kupu_plone_layer/kupuplone.css.dtml
==============================================================================
--- kupu/trunk/kupu/plone/kupu_plone_layer/kupuplone.css.dtml	(original)
+++ kupu/trunk/kupu/plone/kupu_plone_layer/kupuplone.css.dtml	Thu Mar 20 14:52:12 2008
@@ -244,6 +244,9 @@
   font-size: 100%;
 }
 
+.kupusourceoverride { display: none; }
+.kupu-sourcemode .kupusourceoverride { display: block; margin: 0 0.5em; }
+
 div.kupuoverride {
     margin-left: 0.75em;
 }


More information about the kupu-checkins mailing list