[limb-svn] r6511 - 3.x/trunk/limb/cms/shared/js

svn at limb-project.com svn at limb-project.com
Fri Nov 9 17:33:54 MSK 2007


Author: momental
Date: 2007-11-09 17:33:54 +0300 (Fri, 09 Nov 2007)
New Revision: 6511
URL: http://fisheye.limb-project.com/changelog/limb/?cs=6511

Modified:
   3.x/trunk/limb/cms/shared/js/fixpng.js
Log:
-- skip function for png images

Modified: 3.x/trunk/limb/cms/shared/js/fixpng.js
===================================================================
--- 3.x/trunk/limb/cms/shared/js/fixpng.js	2007-11-09 09:30:35 UTC (rev 6510)
+++ 3.x/trunk/limb/cms/shared/js/fixpng.js	2007-11-09 14:33:54 UTC (rev 6511)
@@ -64,27 +64,35 @@
 
   jQuery.fn.ifixpng = hack.ltie7 ? function() {
       return this.each(function() {
-      var that = jQuery(this);
-      var base = jQuery('base').attr('href'); // need to use this in case you are using rewriting urls
-      if (that.is('img') || that.is('input')) { // hack image tags present in dom
-        if (that.attr('src')) {
-          if (that.attr('src').match(/.*\.png([?].*)?$/i)) { // make sure it is png image
-            // use source tag value if set
-            var source = (base && that.attr('src').substring(0,1)!='/') ? base + that.attr('src') : that.attr('src');
-            // apply filter
-            that.css({filter:hack.filter(source), width:that.width(), height:that.height()})
-              .attr({src:jQuery.ifixpng.getPixel()})
-              .positionFix();
+        var that = jQuery(this);
+        var base = jQuery('base').attr('href'); // need to use this in case you are using rewriting urls
+        if (that.is('img') || that.is('input'))// hack image tags present in dom
+        {
+          /* skip images. drop this line if u wanna fix them
+            if (that.attr('src'))
+            {
+              if (that.attr('src').match(/.*\.png([?].*)?$/i))// make sure it is png image
+              {
+                alert(that.attr('src')+' ' + that.height());
+                // use source tag value if set
+                var source = (base && that.attr('src').substring(0,1)!='/') ? base + that.attr('src') : that.attr('src');
+                // apply filter
+                that.css({filter:hack.filter(source), width:that.width(), height:that.height()})
+                  .attr({src:jQuery.ifixpng.getPixel()})
+                  .positionFix();
+              }
+            }
+          //**/
+
+        } else { // hack png css properties present inside css
+          var image = that.css('backgroundImage');
+          if (image.match(/url\("(.+\.png)"\)/i))
+          {
+            image = RegExp.$1;
+            that.css({backgroundImage:'none', filter:hack.filter(image)})
+              .children().positionFix();
           }
         }
-      } else { // hack png css properties present inside css
-        var image = that.css('backgroundImage');
-        if (image.match(/^url\(["']?(.*\.png([?].*)?)["']?\)$/i)) {
-          image = RegExp.$1;
-          that.css({backgroundImage:'none', filter:hack.filter(image)})
-            .children().positionFix();
-        }
-      }
     });
   } : function() { return this; };
 



More information about the limb-svn mailing list