You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@myfaces.apache.org by we...@apache.org on 2010/08/16 16:39:09 UTC
svn commit: r985969 - in
/myfaces/core/trunk/api/src/main/javascript/META-INF/resources/myfaces/_impl:
_util/_Dom.js _util/_ExtLang.js core/_Runtime.js
Author: werpu
Date: Mon Aug 16 14:39:08 2010
New Revision: 985969
URL: http://svn.apache.org/viewvc?rev=985969&view=rev
Log:
https://issues.apache.org/jira/browse/MYFACES-2876
adding winmobile browser detection
Modified:
myfaces/core/trunk/api/src/main/javascript/META-INF/resources/myfaces/_impl/_util/_Dom.js
myfaces/core/trunk/api/src/main/javascript/META-INF/resources/myfaces/_impl/_util/_ExtLang.js
myfaces/core/trunk/api/src/main/javascript/META-INF/resources/myfaces/_impl/core/_Runtime.js
Modified: myfaces/core/trunk/api/src/main/javascript/META-INF/resources/myfaces/_impl/_util/_Dom.js
URL: http://svn.apache.org/viewvc/myfaces/core/trunk/api/src/main/javascript/META-INF/resources/myfaces/_impl/_util/_Dom.js?rev=985969&r1=985968&r2=985969&view=diff
==============================================================================
--- myfaces/core/trunk/api/src/main/javascript/META-INF/resources/myfaces/_impl/_util/_Dom.js (original)
+++ myfaces/core/trunk/api/src/main/javascript/META-INF/resources/myfaces/_impl/_util/_Dom.js Mon Aug 16 14:39:08 2010
@@ -761,7 +761,9 @@ myfaces._impl.core._Runtime.singletonExt
attr = attr.toLowerCase();
if (attr === "class") {
- node.setAttribute("className", val);
+ //setAttribute does not work for winmobile browsers
+ //firect calls work
+ node.className = val;
} else if (attr === "name") {
node[attr] = val;
} else if (attr === "for") {
Modified: myfaces/core/trunk/api/src/main/javascript/META-INF/resources/myfaces/_impl/_util/_ExtLang.js
URL: http://svn.apache.org/viewvc/myfaces/core/trunk/api/src/main/javascript/META-INF/resources/myfaces/_impl/_util/_ExtLang.js?rev=985969&r1=985968&r2=985969&view=diff
==============================================================================
--- myfaces/core/trunk/api/src/main/javascript/META-INF/resources/myfaces/_impl/_util/_ExtLang.js (original)
+++ myfaces/core/trunk/api/src/main/javascript/META-INF/resources/myfaces/_impl/_util/_ExtLang.js Mon Aug 16 14:39:08 2010
@@ -84,6 +84,7 @@ myfaces._impl.core._Runtime.singletonDel
}
}
var logHolder = document.getElementById("myfaces.logging");
+
if (logHolder) {
var elem = document.createElement("div");
var b = this._browser;
@@ -92,13 +93,12 @@ myfaces._impl.core._Runtime.singletonDel
elem.setAttribute("class", "consoleLog " + logType);
} else {
//ie quirks compliant class setting
- elem.setAttribute("className", "consoleLog " + logType);
+ elem.className ="consoleLog " + logType;
}
- elem.innerHTML = logType.toUpperCase() + ": " + argsString;
logHolder.appendChild(elem);
+ elem.innerHTML = logType.toUpperCase() + ": " + argsString;
}
- }
- ,
+ },
logError: function(/*varargs*/) {
if (!this.logLevels[this._ERR]) return;
@@ -111,7 +111,6 @@ myfaces._impl.core._Runtime.singletonDel
}
,
logInfo: function(/*varargs*/) {
- //Level 2 == info
if (!this.logLevels[this._INF]) return;
this._log(this._INF, arguments);
}
Modified: myfaces/core/trunk/api/src/main/javascript/META-INF/resources/myfaces/_impl/core/_Runtime.js
URL: http://svn.apache.org/viewvc/myfaces/core/trunk/api/src/main/javascript/META-INF/resources/myfaces/_impl/core/_Runtime.js?rev=985969&r1=985968&r2=985969&view=diff
==============================================================================
--- myfaces/core/trunk/api/src/main/javascript/META-INF/resources/myfaces/_impl/core/_Runtime.js (original)
+++ myfaces/core/trunk/api/src/main/javascript/META-INF/resources/myfaces/_impl/core/_Runtime.js Mon Aug 16 14:39:08 2010
@@ -485,7 +485,7 @@ if (!myfaces._impl.core._Runtime) {
/**
* delegation pattern
* usage:
- * _T.delegateObject("my.name.space", delegate,
+ * this.delegateObject("my.name.space", delegate,
* {
* constructor_ :function(bla, bla1) {
* _T._callDelegate("constructor", bla1);
@@ -497,7 +497,7 @@ if (!myfaces._impl.core._Runtime) {
* });
*
* or
- * usage var newClass = _T.delegateObject(
+ * usage var newClass = this.delegateObject(
* function (var1, var2) {
* _T._callDelegate("constructor", var1,var2);
* };
@@ -777,6 +777,7 @@ if (!myfaces._impl.core._Runtime) {
dav = n.appVersion,
tv = parseFloat(dav);
+
_T.browser = {};
var d = _T.browser;
@@ -814,6 +815,7 @@ if (!myfaces._impl.core._Runtime) {
}
if (document.all && !d.isOpera) {
d.isIE = parseFloat(dav.split("MSIE ")[1]) || undefined;
+ d.isIEMobile = parseFloat(dua.split("IEMobile")[1]);
//In cases where the page has an HTTP header or META tag with
//X-UA-Compatible, then it is in emulation mode, for a previous
//version. Make sure isIE reflects the desired version.