Commit f4f5f1c76e11d51428ca0829a782656ef2f1032b

Authored by Andrey Karpikov
1 parent a0c1773b

check sort reepat element

... ... @@ -58,7 +58,7 @@
58 58 </div>
59 59
60 60 <% end %>
61   - <% repeat_elements = template_part.field_options.select{|item| item[:name] == 'repeat' && item[:repeatItemId].to_s.empty? } %>
  61 + <% repeat_elements = template_part.field_options.select{|item| item[:name] == 'repeat' && item[:repeatItemId].to_s.empty? }.sort{|a,b| a[:itemName] <=> b[:itemName] } %>
62 62
63 63 <% repeat_elements.each do |repeat_element| %>
64 64 <% row_items = @obj.page_content_markers.select{|item| item.row_item.to_i > 0 && item.parent_id.nil? && item.repeat_id == repeat_element[:id] }.collect(&:row_item).uniq %>
... ...
... ... @@ -79,7 +79,7 @@
79 79 <% end %>
80 80
81 81
82   - <% sub_repeat_elements = template_part.field_options.select{|item| item[:name] == 'repeat' && item[:repeatItemId].to_s == repeat_element[:id] } %>
  82 + <% sub_repeat_elements = template_part.field_options.select{|item| item[:name] == 'repeat' && item[:repeatItemId].to_s == repeat_element[:id] }.sort{|a,b| a[:itemName] <=> b[:itemName] } %>
83 83
84 84 <% sub_repeat_elements.each do |sub_repeat_element| %>
85 85 <% sub_row_items = @obj.page_content_markers.select{|item| item.row_item.to_i > 0 && item.parent_id == index && item.repeat_id == sub_repeat_element[:id]}.collect(&:row_item).uniq %>
... ...
1 1 module Kanjai
2   - VERSION = "0.0.263"
  2 + VERSION = "0.0.264"
3 3 end
... ...