You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@myfaces.apache.org by lu...@apache.org on 2013/10/15 23:38:28 UTC
svn commit: r1532548 -
/myfaces/core/branches/2.1.x/api/src/main/javascript/META-INF/resources/myfaces/_impl/_util/_DomQuirks.js
Author: lu4242
Date: Tue Oct 15 21:38:27 2013
New Revision: 1532548
URL: http://svn.apache.org/r1532548
Log:
MYFACES-3796 'style' attribute updates do not show any visible changes in IE 7/8 (Thanks to Mircea Toma for provide this patch, and to Werner Punz for review it)
Modified:
myfaces/core/branches/2.1.x/api/src/main/javascript/META-INF/resources/myfaces/_impl/_util/_DomQuirks.js
Modified: myfaces/core/branches/2.1.x/api/src/main/javascript/META-INF/resources/myfaces/_impl/_util/_DomQuirks.js
URL: http://svn.apache.org/viewvc/myfaces/core/branches/2.1.x/api/src/main/javascript/META-INF/resources/myfaces/_impl/_util/_DomQuirks.js?rev=1532548&r1=1532547&r2=1532548&view=diff
==============================================================================
--- myfaces/core/branches/2.1.x/api/src/main/javascript/META-INF/resources/myfaces/_impl/_util/_DomQuirks.js (original)
+++ myfaces/core/branches/2.1.x/api/src/main/javascript/META-INF/resources/myfaces/_impl/_util/_DomQuirks.js Tue Oct 15 21:38:27 2013
@@ -439,29 +439,7 @@ if (_MF_SINGLTN) {
node.htmlFor = val;
}
} else if (attr === "style") {
- //We have to split the styles here and assign them one by one
- var styles = val.split(";");
- var stylesLen = styles.length;
- for (var loop = 0; loop < stylesLen; loop++) {
- var keyVal = styles[loop].split(":");
- if (keyVal[0] != "" && keyVal[0] == "opacity") {
- //special ie quirks handling for opacity
-
- var opacityVal = Math.max(100, Math.round(parseFloat(keyVal[1]) * 10));
- //probably does not work in ie mobile anyway
- if (!_Browser.isIEMobile || _Browser.isIEMobile >= 7) {
- node.style.setAttribute("arrFilter", "alpha(opacity=" + opacityVal + ")");
- }
- //if you need more hacks I would recommend
- //to use the class attribute and conditional ie includes!
- } else if (keyVal[0] != "") {
- if (!_Browser.isIEMobile || _Browser.isIEMobile >= 7) {
- node.style.setAttribute(keyVal[0], keyVal[1]);
- } else {
- node.style[keyVal[0]] = keyVal[1];
- }
- }
- }
+ node.style.cssText = val;
} else {
//check if the attribute is an event, since this applies only
//to quirks mode of ie anyway we can live with the standard html4/xhtml