Showing
3 changed files
with
3 additions
and
3 deletions
| ... | ... | @@ -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 %> | ... | ... |