incubator-adffaces-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From awi...@apache.org
Subject svn commit: r498031 - /incubator/adffaces/trunk/trinidad/trinidad-impl/src/main/javascript/META-INF/adf/jsLibs/Core.js
Date Sat, 20 Jan 2007 01:03:46 GMT
Author: awiner
Date: Fri Jan 19 17:03:45 2007
New Revision: 498031

URL: http://svn.apache.org/viewvc?view=rev&rev=498031
Log:
ADFFACES-359: tr:SelectOneRadio client side validation problem

Modified:
    incubator/adffaces/trunk/trinidad/trinidad-impl/src/main/javascript/META-INF/adf/jsLibs/Core.js

Modified: incubator/adffaces/trunk/trinidad/trinidad-impl/src/main/javascript/META-INF/adf/jsLibs/Core.js
URL: http://svn.apache.org/viewvc/incubator/adffaces/trunk/trinidad/trinidad-impl/src/main/javascript/META-INF/adf/jsLibs/Core.js?view=diff&rev=498031&r1=498030&r2=498031
==============================================================================
--- incubator/adffaces/trunk/trinidad/trinidad-impl/src/main/javascript/META-INF/adf/jsLibs/Core.js
(original)
+++ incubator/adffaces/trunk/trinidad/trinidad-impl/src/main/javascript/META-INF/adf/jsLibs/Core.js
Fri Jan 19 17:03:45 2007
@@ -2295,7 +2295,8 @@
   // but cannot receive focus.
   if (_isShowing(currInput))
   {
-    currInput.focus();
+    if (currInput.focus)
+      currInput.focus();
 
     //PH:element["value"] is not supported for PIE,IEM and BB. Therefore 
     //use element.value which is supported by all
@@ -2697,14 +2698,13 @@
      // node and all parents are showing
      return true;
    }
-   // TODO: Write correct version for Safari
-   //PH: I don't know if this code is Firefox specific, if it is then one might
-   //want to change the if condition to if(_agent.isGecko) instead of doing 
-   //!_agent.isNav and !_agent.isSafari because with the existing condition
-   //Black Berry,IE Mobile and Pocket IE all enter into this fragment.
-   //To prevent this use !_agent.isPIE and !_agent.isBlackBerry.  
-   if (!_agent.isNav && !_agent.isSafari && !_agent.isPIE && !_agent.isBlackBerry)
+
+   if (_agent.isGecko || _agent.isSafari)
    {
+     // Radio buttons:  it'll be an array
+     if (!input.ownerDocument && input.length)
+       input = input[0];
+
      var computedStyle = input.ownerDocument.defaultView.getComputedStyle(input,
                                                                           null);
      



Mime
View raw message