----------------- APPLICATION HELPER # Methods added to this helper will be available to all templates in the application. module ApplicationHelper def calendar_js_tag(opt_for_txt={},opt_for_url={}) calHelper = %() calHelper << %(
| #{text_field opt_for_txt[:obj_name],opt_for_txt[:attr_name], :value => convert_date(opt_for_txt[:data]), :style => "width:100px"} | \n) url_java_script_part = "cal.select(document.forms['#{opt_for_url[:form_name]}'].#{opt_for_txt[:obj_name]}_#{opt_for_txt[:attr_name]}," + "'#{opt_for_url[:anchor]}','#{opt_for_url[:format]}')" calHelper << %(#{link_to_function image_tag("calendar",:border => "0"), url_java_script_part, {:name => opt_for_url[:anchor],:id => opt_for_url[:anchor]}} | ) calHelper << %(