From: Alan Knowles Date: Wed, 28 Jul 2010 06:45:05 +0000 (+0800) Subject: sync X-Git-Url: http://git.roojs.org/?a=commitdiff_plain;h=41de066577488df18baecaf462fba039e2be1139;p=roojs1 sync --- diff --git a/roojs-all.js b/roojs-all.js index 2f961bde47..61a162f924 100644 --- a/roojs-all.js +++ b/roojs-all.js @@ -10587,13 +10587,13 @@ Roo.util.CSS = function(){ cacheStyleSheet : function(V){ - if(!S){ - S = {}; + if(!A){ + A = {}; } try{ var ssRules = V.cssRules || V.rules; for(var j = ssRules.length-1; j >= 0; --j){ - S[ssRules[j].selectorText] = ssRules[j]; + A[ssRules[j].selectorText] = ssRules[j]; } }catch(e){} }, @@ -10601,8 +10601,8 @@ Roo.util.CSS = function(){ getRules : function(W){ - if(S == null || W){ - S = {}; + if(A == null || W){ + A = {}; var ds = B.styleSheets; for(var i =0, len = ds.length; i < len; i++){ try{ @@ -10610,7 +10610,7 @@ Roo.util.CSS = function(){ }catch(e){} } } - return S; + return A; }, diff --git a/roojs-core-debug.js b/roojs-core-debug.js index 7d75faba92..363c33f93a 100644 --- a/roojs-core-debug.js +++ b/roojs-core-debug.js @@ -13194,10 +13194,10 @@ Roo.util.CSS = function(){ createStyleSheet : function(cssText, id){ var ss; var head = doc.getElementsByTagName("head")[0]; - var rules = doc.createElement("style"); - rules.setAttribute("type", "text/css"); + var nrules = doc.createElement("style"); + nrules.setAttribute("type", "text/css"); if(id){ - rules.setAttribute("id", id); + nrules.setAttribute("id", id); } if (typeof(cssText) != 'string') { // support object maps.. @@ -13219,17 +13219,17 @@ Roo.util.CSS = function(){ if(Roo.isIE){ - head.appendChild(rules); - ss = rules.styleSheet; + head.appendChild(nrules); + ss = nrules.styleSheet; ss.cssText = cssText; }else{ try{ - rules.appendChild(doc.createTextNode(cssText)); + nrules.appendChild(doc.createTextNode(cssText)); }catch(e){ - rules.cssText = cssText; + nrules.cssText = cssText; } - head.appendChild(rules); - ss = rules.styleSheet ? rules.styleSheet : (rules.sheet || doc.styleSheets[doc.styleSheets.length-1]); + head.appendChild(nrules); + ss = nrules.styleSheet ? nrules.styleSheet : (nrules.sheet || doc.styleSheets[doc.styleSheets.length-1]); } this.cacheStyleSheet(ss); return ss; diff --git a/roojs-core.js b/roojs-core.js index d26a26fc5b..b401b804eb 100644 --- a/roojs-core.js +++ b/roojs-core.js @@ -10587,13 +10587,13 @@ Roo.util.CSS = function(){ cacheStyleSheet : function(V){ - if(!S){ - S = {}; + if(!A){ + A = {}; } try{ var ssRules = V.cssRules || V.rules; for(var j = ssRules.length-1; j >= 0; --j){ - S[ssRules[j].selectorText] = ssRules[j]; + A[ssRules[j].selectorText] = ssRules[j]; } }catch(e){} }, @@ -10601,8 +10601,8 @@ Roo.util.CSS = function(){ getRules : function(W){ - if(S == null || W){ - S = {}; + if(A == null || W){ + A = {}; var ds = B.styleSheets; for(var i =0, len = ds.length; i < len; i++){ try{ @@ -10610,7 +10610,7 @@ Roo.util.CSS = function(){ }catch(e){} } } - return S; + return A; }, diff --git a/roojs-debug.js b/roojs-debug.js index 6779dfe279..324fc9da93 100644 --- a/roojs-debug.js +++ b/roojs-debug.js @@ -13194,10 +13194,10 @@ Roo.util.CSS = function(){ createStyleSheet : function(cssText, id){ var ss; var head = doc.getElementsByTagName("head")[0]; - var rules = doc.createElement("style"); - rules.setAttribute("type", "text/css"); + var nrules = doc.createElement("style"); + nrules.setAttribute("type", "text/css"); if(id){ - rules.setAttribute("id", id); + nrules.setAttribute("id", id); } if (typeof(cssText) != 'string') { // support object maps.. @@ -13219,17 +13219,17 @@ Roo.util.CSS = function(){ if(Roo.isIE){ - head.appendChild(rules); - ss = rules.styleSheet; + head.appendChild(nrules); + ss = nrules.styleSheet; ss.cssText = cssText; }else{ try{ - rules.appendChild(doc.createTextNode(cssText)); + nrules.appendChild(doc.createTextNode(cssText)); }catch(e){ - rules.cssText = cssText; + nrules.cssText = cssText; } - head.appendChild(rules); - ss = rules.styleSheet ? rules.styleSheet : (rules.sheet || doc.styleSheets[doc.styleSheets.length-1]); + head.appendChild(nrules); + ss = nrules.styleSheet ? nrules.styleSheet : (nrules.sheet || doc.styleSheets[doc.styleSheets.length-1]); } this.cacheStyleSheet(ss); return ss;