lib/tree_html.rb in tree_html-0.1.0 vs lib/tree_html.rb in tree_html-0.1.1
- old
+ new
@@ -20,10 +20,10 @@
def li
"<li>#{checkbox}<a>#{label_for_tree_html}</a>#{sub_ul}</li>"
end
def checkbox
- children_for_tree_html.empty? ? '' : "<input type='checkbox' id='#{object_id}'><label for='#{object_id}'></label>"
+ children_for_tree_html.empty? ? "<label class='placeholder'></label>" : "<input type='checkbox' id='#{object_id}'><label for='#{object_id}'></label>"
end
def sub_ul
children_for_tree_html.empty? ? '' : "<ul>#{children_for_tree_html.map{|c| c.li}.join}</ul>"
end