Sha256: ecf0582f846014db3abcbf71ae4dd408ea19f1af613e39cd432de18867a4c012

Contents?: true

Size: 604 Bytes

Versions: 24

Compression:

Stored size: 604 Bytes

Contents

module Admin::PrototypesHelper
  def cancel_button(label, div_id, show=nil, hide=nil)
    onclick =  %Q{Element.update('#{div_id}','');}
    onclick += %Q{Element.show('#{show}');} if show
    onclick += %Q{Element.hide('#{hide}');} if hide

    %Q{<button type="reset" onClick="#{onclick}">#{label}</button>}
  end

  def exclusive_properties(prototype, properties)
    prototype.properties.each do |prop|
      logger.debug("proto property: #{prop.inspect}")
      properties.delete(prop)
#      properties = properties.delete_if { |p| p.id == pp.product_property_id }
    end
    properties
  end
end

Version data entries

24 entries across 24 versions & 3 rubygems

Version Path
kdmny-spree-0.0.1 app/helpers/admin/prototypes_helper.rb
spree-0.10.2 app/helpers/admin/prototypes_helper.rb
spree-0.10.1 app/helpers/admin/prototypes_helper.rb
spree-0.10.0 app/helpers/admin/prototypes_helper.rb
spree-0.10.0.beta app/helpers/admin/prototypes_helper.rb
spree-enriquez-0.9.4 app/helpers/admin/prototypes_helper.rb
spree-0.9.4 app/helpers/admin/prototypes_helper.rb
spree-0.9.3 app/helpers/admin/prototypes_helper.rb
spree-0.9.2 app/helpers/admin/prototypes_helper.rb
spree-0.9.1 app/helpers/admin/prototypes_helper.rb
spree-0.9.0 app/helpers/admin/prototypes_helper.rb
spree-0.8.4 app/helpers/admin/prototypes_helper.rb
spree-0.8.5 app/helpers/admin/prototypes_helper.rb
spree-0.4.1 app/helpers/admin/prototypes_helper.rb
spree-0.4.0 app/helpers/admin/prototypes_helper.rb
spree-0.5.0 app/helpers/admin/prototypes_helper.rb
spree-0.6.0 app/helpers/admin/prototypes_helper.rb
spree-0.5.1 app/helpers/admin/prototypes_helper.rb
spree-0.7.1 app/helpers/admin/prototypes_helper.rb
spree-0.7.0 app/helpers/admin/prototypes_helper.rb