Author: pyaschenko
Date: 2007-10-12 09:43:17 -0400 (Fri, 12 Oct 2007)
New Revision: 3339
Modified:
trunk/framework/impl/src/main/resources/org/richfaces/renderkit/html/scripts/utils.js
Log:
RF-913
Modified:
trunk/framework/impl/src/main/resources/org/richfaces/renderkit/html/scripts/utils.js
===================================================================
---
trunk/framework/impl/src/main/resources/org/richfaces/renderkit/html/scripts/utils.js 2007-10-12
10:26:55 UTC (rev 3338)
+++
trunk/framework/impl/src/main/resources/org/richfaces/renderkit/html/scripts/utils.js 2007-10-12
13:43:17 UTC (rev 3339)
@@ -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);
}
@@ -151,7 +157,8 @@
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