Changeset 1123

Show
Ignore:
Timestamp:
2008-07-25 10:01:16 (6 months ago)
Author:
gaspard
Message:

Fixed tests

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/lib/parser/lib/rules/zena.rb

    r1122 r1123  
    930930        end 
    931931         
    932         has_submit = @context[:make_form] ? (descendants('show') != []) : (descendants('input') != []) 
    933         cancel += "<input type='submit'/>" unless has_submit 
     932        if @context[:make_form] ? (descendants('show') != []) : (descendants('input') != []) 
     933          # has submit 
     934        else 
     935          append_submit = "<input type='submit'/>" 
     936        end 
    934937         
    935938        hidden_fields['link_id'] = "<%= #{node}.link_id %>" if @context[:need_link_id] 
     
    10201023      else 
    10211024        blocks_bak = @blocks 
     1025      end 
     1026       
     1027      if append_submit 
     1028        # add a descendant after blocks. 
     1029        make(:void, :method=>'void', :text=>append_submit) 
    10221030      end 
    10231031       
  • trunk/test/helpers/node_query/relations.yml

    r1121 r1123  
    3232comments_order: 
    3333  src: "comments order by created_at desc" 
    34   sql: "Comment: SELECT comments.* FROM comments WHERE comments.discussion_id = #{@node.discussion_id} ORDER BY comments.created_at DESC" 
     34  sql: "Comment: SELECT comments.* FROM comments WHERE comments.discussion_id = #{@node.get_discussion_id} ORDER BY comments.created_at DESC" 
  • trunk/test/helpers/zena_parser/ajax.yml

    r1121 r1123  
    4040      <li do='form'><input name='v_title'/> this is the form</li> 
    4141    </ol> 
    42   res: "/<li.*list1_30.*>bird.*<li.*list1_31.*>flower.*<li.*list1_add.*list1_form.*toggle.*<li .*list1_form.*style.*none.*Ajax.Request.*input type='hidden' name='t_url' value=./each/add/with/form/list1.*input type='hidden' name='node\[parent_id\]' value=.29./" 
     42  res: "/<li>bird.*<li>flower.*<li.*list1_add.*list1_form.*toggle.*<li .*list1_form.*style.*none.*Ajax.Request.*input type='hidden' name='t_url' value=./each/add/with/form/list1.*input type='hidden' name='node\[parent_id\]' value=.29./" 
    4343 
    4444each_add_with_form_in_sub_block: 
     
    8080  src: "<ul do='children'><li do='each' do='[name]'/><li do='add'/></ul>" 
    8181  tem: "/<li class='form' id='list1_form' style='display:none;'><%= form_remote_tag\(:url => nodes_path/" 
    82   'make/form/en/list1.erb': "<li id='<%= dom_id(@node) %>'><%= @node.name %></li>" 
     82  'make/form/en/list1.erb': "<li><%= @node.name %></li>" 
    8383  'make/form/en/list1_form.erb': "/<li class='form' id='<%= dom_id\(@node\) %>'>/" 
    8484 
  • trunk/test/helpers/zena_parser/basic.yml

    r1121 r1123  
    455455    node: 'cleanWater' 
    456456  src: "<ol do='pages'><li do='each' alt_class='blue' do='[name]'/><li do='add'/></ol>" 
    457   res: "/<li id='list1_22'>status<\/li><li id='list1_37' class=\"blue\">track/" 
     457  res: "/<li>status<\/li><li class=\"blue\">track/" 
    458458 
    459459case_when: