myfaces-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From lof...@apache.org
Subject svn commit: r927976 - in /myfaces/tobago/branches/tobago-1.0.x/theme: scarborough/src/main/resources/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/script/ standard/src/main/resources/org/apache/myfaces/tobago/renderkit/html/standard/sta...
Date Fri, 26 Mar 2010 17:33:18 GMT
Author: lofwyr
Date: Fri Mar 26 17:33:18 2010
New Revision: 927976

URL: http://svn.apache.org/viewvc?rev=927976&view=rev
Log:
TOBAGO-852: Modal popup now works in Firefox

Modified:
    myfaces/tobago/branches/tobago-1.0.x/theme/scarborough/src/main/resources/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/script/tobago-menu.js
    myfaces/tobago/branches/tobago-1.0.x/theme/standard/src/main/resources/org/apache/myfaces/tobago/renderkit/html/standard/standard/script/tobago.js

Modified: myfaces/tobago/branches/tobago-1.0.x/theme/scarborough/src/main/resources/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/script/tobago-menu.js
URL: http://svn.apache.org/viewvc/myfaces/tobago/branches/tobago-1.0.x/theme/scarborough/src/main/resources/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/script/tobago-menu.js?rev=927976&r1=927975&r2=927976&view=diff
==============================================================================
--- myfaces/tobago/branches/tobago-1.0.x/theme/scarborough/src/main/resources/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/script/tobago-menu.js
(original)
+++ myfaces/tobago/branches/tobago-1.0.x/theme/scarborough/src/main/resources/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/script/tobago-menu.js
Fri Mar 26 17:33:18 2010
@@ -263,6 +263,16 @@ Tobago.Menu.Item.prototype.openMenu = fu
   };
 
 Tobago.Menu.Item.prototype.onMouseOver = function() {
+
+  var div = Tobago.element(this.id);
+  // e. g. disabled by a popup
+  for (var i = 0; i < div.childNodes.length; i++) {
+    var child = div.childNodes[i];
+    if (child.tagName == "A" && child.disabled){
+      return;
+    }
+  }
+
     this.mouseOver = true;
     //LOG.debug("onMouseOver " + this.id + " level :" + this.level);
     clearTimeout(this.onBlurTimer);
@@ -298,6 +308,16 @@ Tobago.Menu.Item.prototype.onMouseOut = 
   };
 
 Tobago.Menu.Item.prototype.onFocus = function() {
+
+  var div = Tobago.element(this.id);
+  // e. g. disabled by a popup
+  for (var i = 0; i < div.childNodes.length; i++) {
+    var child = div.childNodes[i];
+    if (child.tagName == "A" && child.disabled){
+      return;
+    }
+  }
+
     this.focus = true;
     Tobago.addCssClass(this.id, "tobago-menu-item-focus");
     if (this.menuButton) {

Modified: myfaces/tobago/branches/tobago-1.0.x/theme/standard/src/main/resources/org/apache/myfaces/tobago/renderkit/html/standard/standard/script/tobago.js
URL: http://svn.apache.org/viewvc/myfaces/tobago/branches/tobago-1.0.x/theme/standard/src/main/resources/org/apache/myfaces/tobago/renderkit/html/standard/standard/script/tobago.js?rev=927976&r1=927975&r2=927976&view=diff
==============================================================================
--- myfaces/tobago/branches/tobago-1.0.x/theme/standard/src/main/resources/org/apache/myfaces/tobago/renderkit/html/standard/standard/script/tobago.js
(original)
+++ myfaces/tobago/branches/tobago-1.0.x/theme/standard/src/main/resources/org/apache/myfaces/tobago/renderkit/html/standard/standard/script/tobago.js
Fri Mar 26 17:33:18 2010
@@ -1032,8 +1032,9 @@ var Tobago = {
         }
       }
     }
-    for (i = 0; i < document.anchors.length; i++) {
-      var anchor = document.anchors[i];
+    var anchors = document.getElementsByTagName('a');
+    for (i = 0; i < anchors.length; i++) {
+      var anchor = anchors[i];
       if (!anchor.disabled) {
         if (anchor.id) {
           if (anchor.id.indexOf(id + ":") != 0) { // not starts with
@@ -1148,8 +1149,9 @@ var Tobago = {
          element.disabled = false;
        }
      }
-     for (i = 0; i < document.anchors.length; i++) {
-       var anchor = document.anchors[i];
+      var anchors = document.getElementsByTagName('a');
+      for (i = 0; i < anchors.length; i++) {
+       var anchor = anchors[i];
        if (hidden.value.indexOf("," + anchor.id + ",") >= 0) {
          anchor.disabled = false;
        }



Mime
View raw message