Changeset 1123
- Timestamp:
- 2008-07-25 10:01:16 (6 months ago)
- Files:
-
- trunk/lib/parser/lib/rules/zena.rb (modified) (2 diffs)
- trunk/test/helpers/node_query/relations.yml (modified) (1 diff)
- trunk/test/helpers/zena_parser/ajax.yml (modified) (2 diffs)
- trunk/test/helpers/zena_parser/basic.yml (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/lib/parser/lib/rules/zena.rb
r1122 r1123 930 930 end 931 931 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 934 937 935 938 hidden_fields['link_id'] = "<%= #{node}.link_id %>" if @context[:need_link_id] … … 1020 1023 else 1021 1024 blocks_bak = @blocks 1025 end 1026 1027 if append_submit 1028 # add a descendant after blocks. 1029 make(:void, :method=>'void', :text=>append_submit) 1022 1030 end 1023 1031 trunk/test/helpers/node_query/relations.yml
r1121 r1123 32 32 comments_order: 33 33 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 40 40 <li do='form'><input name='v_title'/> this is the form</li> 41 41 </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./" 43 43 44 44 each_add_with_form_in_sub_block: … … 80 80 src: "<ul do='children'><li do='each' do='[name]'/><li do='add'/></ul>" 81 81 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>" 83 83 'make/form/en/list1_form.erb': "/<li class='form' id='<%= dom_id\(@node\) %>'>/" 84 84 trunk/test/helpers/zena_parser/basic.yml
r1121 r1123 455 455 node: 'cleanWater' 456 456 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/" 458 458 459 459 case_when:
