Changeset 1136

Show
Ignore:
Timestamp:
2008-08-21 16:10:21 (5 months ago)
Author:
gaspard
Message:

Fixed a bug where [swap] would not work because [each] did not set the dom_id.

Files:

Legend:

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

    r1135 r1136  
    14111411      is_draggable = @params[:draggable] == 'true' || @params[:drag_handle] 
    14121412       
    1413       if descendant('edit') || descendant('unlink') || ['block', 'drop'].include?(single_child_method) || is_draggable 
     1413      if descendant('edit') || descendant('unlink') || descendant('swap') || ['block', 'drop'].include?(single_child_method) || is_draggable 
    14141414        id_hash = {:id => erb_dom_id} 
    14151415      else 
  • trunk/test/helpers/zena_parser/ajax.yml

    r1132 r1136  
    181181  src: "<r:form><input type='hidden' name='s' set_value='[start.id]'/></r:form>" 
    182182  res: "/<input name='s' type='hidden' value='22'/>/" 
     183 
     184swap_in_each: 
     185  src: "<r:pages><li do='each'><span do='swap' attr='d_status' states='todo,done,alert'/></li></r:pages>" 
     186  tem: "/<li id='list1_<%= var1.zip %>'><span>.*var1.can_write?.*tag_to_remote.*else.*var1.version.dyn\[\"status\"\]/"