Changeset 423


Ignore:
Timestamp:
07/11/06 15:06:51 (13 years ago)
Author:
jukka
Message:

Fixed #500, spent 30min. Stupid tests.

Location:
trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/skins/lemill/viewThreadsAtBottom.pt

    r410 r423  
    5353                  tal:define="fieldName string:body_text; 
    5454                      value nothing; 
    55                       widget python:{'rows':10, 'cols':40}"  
     55                      widget python:{'rows':10, 'cols':40, 'WYSIWYMLines':False}"  
    5656                      > 
    5757                  <h3 i18n:translate="comment_box_header">Comment</h3> 
  • trunk/skins/lemill/wysiwym.pt

    r418 r423  
    1111    <!-- TextArea Widgets --> 
    1212 
    13     <metal:view_macro define-macro="view">  
    14         <tal:lines condition="widget/WYSIWYMLines"> 
     13    <metal:view_macro define-macro="view" tal:define="WYSIWYMLines widget/WYSIWYMLines | nothing; ">  
     14        <tal:lines condition="WYSIWYMLines"> 
    1515            <ul> 
    1616            <span tal:repeat="line accessor" tal:omit-tag=""> 
     
    2929                  content python: not binary and content or ''; 
    3030                  content_length python:len(content); 
    31                   append_only python: getattr(widget, 'append_only', None);"> 
     31                  append_only python: getattr(widget, 'append_only', None); 
     32                  WYSIWYMLines widget/WYSIWYMLines | nothing; "> 
    3233 
    3334        <textarea 
     
    3738                            cols widget/cols; 
    3839                            rows widget/rows;                             
    39                             tabindex tabindex/next;" 
    40             tal:define="content python:not append_only and content or ''; 
    41              content python:test(widget.WYSIWYMLines, '\n'.join(list(content)), content)" 
     40                            tabindex tabindex/next; 
     41                            " 
     42            tal:define=" 
     43             content python:not append_only and content or ''; 
     44             content python:test(WYSIWYMLines, '\n'.join(list(content)), content)" 
    4245            tal:content="content">content</textarea> 
    4346 
    4447 
    4548 
    46             <tal:lines condition="widget/WYSIWYMLines"> 
     49            <tal:lines condition="WYSIWYMLines"> 
    4750                <table class="guidelines"> 
    4851                    <tr> 
     
    6063                </table> 
    6164            </tal:lines>  
    62             <tal:area condition="not:widget/WYSIWYMLines">             
     65            <tal:area condition="not:WYSIWYMLines">             
    6366                <div id="show_guide"> 
    6467                <p>LeMill uses simple syntax to format your text. Check the 
  • trunk/tests/testGroups.py

    r418 r423  
    8080        ob = self.construct('BlogPost','TestPost',self.portal.community.testgroup) 
    8181        ob.processForm(values={'title':TITLE,'bodyText':VALUE}) 
     82        ob.at_post_edit_script()            
    8283        result=self.publish(self.portal.absolute_url_path()+'/community/testgroup', basic=auth) 
    8384        self.failUnless(re.search(TITLE, result.getBody()), "can't find post title from group's blog"+result.getBody()) 
    8485        self.failUnless(re.search(VALUE, result.getBody()), "can't find post body from group's blog"+result.getBody()) 
     86        result=self.publish(self.portal.absolute_url_path()+'/community/testgroup/thesethingstaketime', basic=auth) 
     87        self.failUnless(re.search('textarea', result.getBody()) and re.search('name="body_text"', result.getBody()), "comment box not visible for post"+result.getBody()) 
     88         
    8589 
    8690 
Note: See TracChangeset for help on using the changeset viewer.