Author: vmolotkov
Date: 2008-08-07 14:43:48 -0400 (Thu, 07 Aug 2008)
New Revision: 9980
Modified:
trunk/ui/menu-components/src/main/resources/org/richfaces/renderkit/html/scripts/menu.js
Log:
https://jira.jboss.org/jira/browse/RF-3639
Modified:
trunk/ui/menu-components/src/main/resources/org/richfaces/renderkit/html/scripts/menu.js
===================================================================
---
trunk/ui/menu-components/src/main/resources/org/richfaces/renderkit/html/scripts/menu.js 2008-08-07
17:26:56 UTC (rev 9979)
+++
trunk/ui/menu-components/src/main/resources/org/richfaces/renderkit/html/scripts/menu.js 2008-08-07
18:43:48 UTC (rev 9980)
@@ -266,7 +266,10 @@
},
showDropDownLayer: function (layerId, parentId, e, delay){
this.clearPopUpTO();
- this.showTimeOutFlag = setTimeout(new RichFaces.Menu.DelayedDropDown(layerId, parentId,
e).show, delay);
+ var menu = new RichFaces.Menu.DelayedDropDown(layerId, parentId, e);
+ if (menu.show) {
+ this.showTimeOutFlag = setTimeout(menu.show, delay);
+ }
},
showPopUpLayer: function (layer, e){
this.shutdown();
@@ -443,14 +446,22 @@
}
//bugs RF-2102, RF-2119, RF-3639
- if (Event.element(e).tagName.toLowerCase() == "a") {
- return;
- }
+ var node = (e.target || e.srcElement);
+ var isLabel = false;
+ while (node && node.id != elementId.id) {
+ if (node.className == 'dr-label-text-decor rich-label-text-decor') {//TODO:
replace magic
+ isLabel = true;
+ }
+ node = node.parentNode;
+ }
+
+ if (!isLabel) return;
+
this.event = e;
this.element = $(elementId) || Event.element(e);
this.layer = $(layer);
Event.stop(e);
-
+
this.listPositions = function(jp, dir) {
var poss = new Array(new Array(2,1,4),new Array(1,2,3),new Array(4,3,2),new
Array(3,4,1));
var list = new Array();
@@ -1320,7 +1331,7 @@
}
if(!this.options.disabled) {
RichFaces.Menu.Items.onmouseout(this);
- }
+ }
},
getElement: function() {
return $(this.id);