Author: pyaschenko
Date: 2007-10-12 09:53:27 -0400 (Fri, 12 Oct 2007)
New Revision: 3340
Modified:
branches/3.1.x/framework/impl/src/main/resources/org/richfaces/renderkit/html/scripts/utils.js
Log:
RF-913
Modified:
branches/3.1.x/framework/impl/src/main/resources/org/richfaces/renderkit/html/scripts/utils.js
===================================================================
---
branches/3.1.x/framework/impl/src/main/resources/org/richfaces/renderkit/html/scripts/utils.js 2007-10-12
13:43:17 UTC (rev 3339)
+++
branches/3.1.x/framework/impl/src/main/resources/org/richfaces/renderkit/html/scripts/utils.js 2007-10-12
13:53:27 UTC (rev 3340)
@@ -121,7 +121,13 @@
//js string evaluation
else {
try {
- value=object.eval(template);
+ if (Richfaces.browser.isObjectEval) {
+ value = object.eval(template);
+ }
+ else with (object) {
+ value = eval(template) ;
+ }
+
if (typeof value == 'function') {
value = value(object);
}
@@ -149,8 +155,10 @@
}
Richfaces.browser= {
+ isIE: (!window.opera && /MSIE/.test(navigator.userAgent)),
isIE6: (!window.opera && /MSIE\s*[6][\d,\.]+;/.test(navigator.userAgent)),
- isSafari: /Safari/.test(navigator.userAgent)
+ isSafari: /Safari/.test(navigator.userAgent),
+ isObjectEval: (Richfaces.eval!=undefined)
};
Richfaces.eval = function(template, object) {
Show replies by date