My imagecache template function wraps the img in a div. This patch fixes imgupload.js to apply image attributes just to the img element.

CommentFileSizeAuthor
imgupload.js-themedimg.patch1.07 KBtuffnatty

Comments

eugenmayer’s picture

does .adnSelf means, he should look for childrend and match also on himself?
why do we need "filter" once again('img') once again?

tuffnatty’s picture

img = $(data);  /* the whole tree returned by template */
img.find('img')  /* all img descendants of the root element */
.andSelf()  /* and the root element itself */
.filter('img') /* but if the root is not an img we don't need it */

I know it's weird ;)

eugenmayer’s picture

hehe. Thanks for the explaination :)

eugenmayer’s picture

Status: Needs review » Fixed

Fixed in BETA5

eugenmayer’s picture

Status: Fixed » Closed (fixed)