Skip to content

Instantly share code, notes, and snippets.

@deJaVisions
Created March 21, 2012 12:02
Show Gist options
  • Select an option

  • Save deJaVisions/2146479 to your computer and use it in GitHub Desktop.

Select an option

Save deJaVisions/2146479 to your computer and use it in GitHub Desktop.
delete mat image working but has some gui issues
// hey eph - fyi i just got delete image (which includes db info and all associated/resized images,and removes from the dom) but i think it needs some gui cleanup as i was having a hard time selecting the thumbnail .close classes even when i would put the parent classes before hand in the selector. i think it's probably cuz it's conflicting with the other top level .close (for error msg's) - so if you could add a new class like .close_image or better yet, .remove_image that just inherit's the same stylez from .close i think that would help. while you're at it, if you could make the the error/notice message close also inherhit from .close with a name like .close_alert that would be more clear...
i renamed the partial _image_thumbs to _gallery fyi.
also, i couldn't get the = link_to below working, perhaps because of the double .close.close2 class, which means no confirmation popup when you delete an image, even tho it still works.
// _gallery.haml
// = link_to "X", :method => :delete, :confirm => "Are you sure?", :url => admin_images_url(i), :class => ".close.close2", :data => { image_id: i.id }
.close.close2{:data => { image_id: i.id }} X
tag me tomorrow if this doesn't make sense.
thanx,
j
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment