lib/picky_color.rb
def picky_color_output(input, object_name, method, id, picky_options = {})
      name = method.nil? ? "#{id}" : "#{object_name_to_id(object_name)}_#{method}".gsub("__","_")

      color_well_id = "color_well_#{name}"

      out = "<div>"
      out << input
      out << content_tag(:span, :id => color_well_id, :class => "color-picker-box") do end
      
      out << (javascript_tag %{
      color_value = $('#{name}').value
      if (color_value == "") {
        color_value = "#{picky_options[:default]}"
      }
      new PickyColor({
          color: color_value,
          field: '#{name}',
          colorWell: '#{color_well_id}',
          draggable: #{picky_options[:draggable]},
          closeText: '#{picky_options[:close_text]}',
          imageBase: '/images/picky_color/'
         })}) 
             
      out << "</div>"
      return out    
    end
# include to the output the span and javascript tag needed for the helper
include to the output the span and javascript tag needed for the helper
include to the output the span and javascript tag needed for the helper
def picky_color_output(input, object_name, method, id, picky_options = {})
      name = method.nil? ? "#{id}" : "#{object_name_to_id(object_name)}_#{method}".gsub("__","_")
      color_well_id = "color_well_#{name}"
      out = "<div>"
      out << input
      out << content_tag(:span, :id => color_well_id, :class => "color-picker-box") do end
      out << (javascript_tag %{
      color_value = $('#{name}').value
      if (color_value == "") {
        color_value = "#{picky_options[:default]}"
      }
      new PickyColor({
          color: color_value,
          field: '#{name}',
          colorWell: '#{color_well_id}',
          draggable: #{picky_options[:draggable]},
          closeText: '#{picky_options[:close_text]}',
          imageBase: '/images/picky_color/'
         })}) 
      out << "</div>"
      return out    
    end
def picky_color_output ( input , object_name , method , id , picky_options = { } ) name = method . nil? ? "#{id}" : "#{object_name_to_id(object_name)}_#{method}" . gsub ( "__" , "_" ) color_well_id = "color_well_#{name}" out = "<div>" out << input out << content_tag ( :span , :id => color_well_id , :class => "color-picker-box" ) do end out << ( javascript_tag %{
      color_value = $('#{name}').value
      if (color_value == "") {
        color_value = "#{picky_options[:default]}"
      }
      new PickyColor({
          color: color_value,
          field: '#{name}',
          colorWell: '#{color_well_id}',
          draggable: #{picky_options[:draggable]},
          closeText: '#{picky_options[:close_text]}',
          imageBase: '/images/picky_color/'
         })} ) out << "</div>" return out end
include to the output the span and javascript tag needed for the helper
include to the output the span and javascript tag needed for the helper
input
object_name
method
id
picky_options