Module: PageHelper
- Defined in:
- app/helpers/page_helper.rb
Instance Method Summary collapse
Instance Method Details
#check_all_button(param, label) ⇒ Object
2 3 4 5 6 7 8 9 10 11 12 13 14 15 |
# File 'app/helpers/page_helper.rb', line 2 def ( param, label ) html = " <button type=\"button\" id=\"check_all_\#{ param }\">\#{ label }</button>\n <script>\n $(function(){\n $(\"#check_all_\#{ param }\").click(function(e){\n var checkboxes = $(\"input#\#{ param }\");\n checkboxes.prop(\"checked\", !checkboxes.prop(\"checked\"));\n });\n });\n </script>\n EOF\n html.html_safe\nend\n" |