Support from Acquia helps fund testing for Drupal Acquia logo

Comments

slashrsm’s picture

Status: Active » Needs review
FileSize
16.14 KB

This works for me. Just some minor modifications were needed to make it work on D7.

I've added packed version of jQuery pngFix lib and enabled user to choose between packed/normal version in administration pages.

Also added some minor modifications to pass Coder review.

mgifford’s picture

FileSize
16.73 KB

I just re-rolled the patch against git. Hoping this helps get out a d7 version of this module.

joeyabbs’s picture

subscribing

joeyabbs’s picture

Although Drupal 7 uses jQuery 1.4 it should be considered to update the jquery.pngFix.js file in order to support jQuery 1.5.x.

As of jQuery 1.5 attribute selectors must be wrapped in quotes (they always should have but now jQuery is strict about it).

Therefore the following (Line #49) will no longer work:
jQuery(this).find("img[src$=.png]").each(function() {
This must be updated to:
jQuery(this).find("img[src$='.png']").each(function() { (single quotes now wrap .png)

Line #101 should also be updated to:
jQuery(this).find("input[src$='.png']").each(function() {

I have tested these changes and jquery.pngFix.js now works for latest jQuery as well as continuing to work with older versions of jQuery.

dddbbb’s picture

sub

klonos’s picture

Title: Drupal 7 port » Port PNG fix module to drupal 7
Issue tags: +D7 porting, +port to d7, +d7 ports

So far it works for me whether I use jQ 1.4.x or 1.5.x versions. The patch is a simple edit of the one in #2 to include the single quotes wrap as per #4 above.

@Rob Loach: would really appreciate it if you gave this a quick review at some point?

klonos’s picture

...and her's the actual file ;)

klonos’s picture

Update: ...just letting everyone here + anyone else interested know of the PNG Behave! project that already has a stable 7.x version available.