Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- %p
- %label{:for => "hour_name"} Name:
- = f.text_field :name
- %p
- %label{:for => "hour_description"} Description:
- = f.text_area :description
- / %p.image_chooser
- / - for image in Image.all_photos
- / %div{:class => "ic_image #{image.class.name.underscore}", :id => "#{image.class.name},#{image.id}"}
- / = image_tag image.public_filename(:square)
- / = image.name
- #viewer
- #viewerFrame
- - for image in Image.all_photos
- = image_tag image.public_filename(:thumb)
- %span#btn1
- prev
- %span#btn2
- next
- = f.hidden_field :image_type
- = f.hidden_field :image_id
- = f.hidden_field :associable_type
- = f.hidden_field :associable_id
- %script
- :plain
- $('.ic_image').click(function() {
- $('.ic_image').removeClass('ic_selected_image');
- $(this).addClass('ic_selected_image');
- $('#image_association_image_type').val(this.id.split(',')[0]);
- $('#image_association_image_id').val(this.id.split(',')[1]);
- });
Add Comment
Please, Sign In to add comment