refinery / refinerycms-page-images

Adds an images tab to your pages so you can format a group of images really nicely on the frontend
104 stars 120 forks source link

Clicking caption button in 1.0.1 does nothing? #8

Closed clickworkorange closed 13 years ago

clickworkorange commented 13 years ago

I think the problem is that the textarea which is supposed to appear alongside each thumbnail doesn't exist in the view template. In the page-images script, the query list_item.find('.textarea_wrapper_for_wym > textarea'); comes up empty.

clickworkorange commented 13 years ago

Doh! It's the setting of course. Maybe the caption button should be hidden when this is set to false (default)?

clickworkorange commented 13 years ago

I would suggest something like:

if(list_item.find('.textarea_wrapper_for_wym > textarea')) { img_caption = $("<img src='/images/refinery/icons/user_comment.png' width='16' height='16' class='caption' />"); img_caption.appendTo(image_actions); img_caption.click(open_image_caption); }

in page-image-picker.js, lines 48-50. This would make sense as if there is no caption field to show, the button which shows it needn't exist.

parndt commented 13 years ago

Only show the caption image when captions are enabled in the setting page_images_captions - Closed by 7987ce3904a2dcee3646f2799d43037c0a71cf1f

parndt commented 13 years ago

Thanks for pointing that out!