r2436 - improvements to the style-filter + fixed IE8 bug

r2436 - improvements to the style-filter + fixed IE8 bug


Author: a.farkas.pm
Date: Fri Apr 3 15:37:12 2009
New Revision: 2436
Modified:
branches/dev/effects/ui/effects.core.js
Log:
improvements to the style-filter + fixed IE8 bug
Modified: branches/dev/effects/ui/effects.core.js
==============================================================================
--- branches/dev/effects/ui/effects.core.js    (original)
+++ branches/dev/effects/ui/effects.core.js    Fri Apr 3 15:37:12 2009
@@ -171,7 +171,7 @@
            }
        } else { //normal Browser + IE
            for(key in style){
-                if(style[key]){
+                if(typeof style[key] === "string"){
                    newStyle[key] = style[key];
                }
            }
@@ -182,7 +182,8 @@
    var blacklist = {
        fontWeight: true,
        orphans: true,
-        widows: true
+        widows: true,
+        zIndex: true
    };
    
    var blacklistValues = {
@@ -202,10 +203,8 @@
            opts[i].oldStyle = oldStyle[i];
            // The main function to form the object for animation
for (var n in opts[i].newStyle) {
- if (typeof opts[i].newStyle[n] !== "function" /* No
functions */ &&
-                n.indexOf('length') === -1 &&
-                opts[i].newStyle[n] !== oldStyle[i][n] /* Only values that have
changed are used for the animation */ &&
-                !n.match(/^pos|^pixel/) && !blacklist[n]) {
+ if (opts[i].newStyle[n] !== oldStyle[i][n] /* Only values
that have changed are used for the animation */ &&
+                !blacklist[n] && !n.match(/^pos|^pixel/)) {
                    if(dimStyles[n] && (opts[i].newStyle[n] === 'auto' ||
(opts[i].newStyle.display === 'none'))){ // handle height/width
                        opts[i].animateStyles[n] = opts[i].element[n]();
                    } else if(n == 'filter' &&
opts[i].newStyle[n].indexOf('opacity=') !== -1){ // handle filter opacity