Author: Alex.Kolonitsky
Date: 2009-11-10 07:50:05 -0500 (Tue, 10 Nov 2009)
New Revision: 15859
Modified:
branches/sandbox/3.3.X_JSF2/ui/menu-components/src/main/resources/org/richfaces/renderkit/html/scripts/menu.js
Log:
RF-8069 - extendedDataTable: using table menu in IE8 causes JS error
Modified:
branches/sandbox/3.3.X_JSF2/ui/menu-components/src/main/resources/org/richfaces/renderkit/html/scripts/menu.js
===================================================================
---
branches/sandbox/3.3.X_JSF2/ui/menu-components/src/main/resources/org/richfaces/renderkit/html/scripts/menu.js 2009-11-09
18:36:19 UTC (rev 15858)
+++
branches/sandbox/3.3.X_JSF2/ui/menu-components/src/main/resources/org/richfaces/renderkit/html/scripts/menu.js 2009-11-10
12:50:05 UTC (rev 15859)
@@ -19,14 +19,14 @@
}
//layer.style.height = dims.height + "px";
} // if
-}
+};
RichFaces.Menu.removePx = function(e) {
if ((e+"").indexOf("px")!=-1)
return (e+"").substring(0,e.length-2);
else
return e;
-}
+};
RichFaces.Menu.Layers = {
listl: new Array(),
@@ -113,7 +113,7 @@
},
isVisible: function(layer) {
- return ($(layer).style.display != 'none');
+ return $(layer).style.display != 'none';
},
/**
@@ -121,11 +121,11 @@
* @param visibleFlag
*/
LMPopUpL: function(menuName, visibleFlag, event) {
- if (!this.loaded) {
+ var menu = $(menuName);
+ if (!this.loaded || !menu) {
return;
}
this.detectWidth();
- var menu = $(menuName);
var eventResult = true;
RichFaces.Menu.fitLayerToContent(menu);
@@ -1313,7 +1313,7 @@
var label = typeof element.getLabel == 'fuction' ? element.getLabel() :
RichFaces.Menu.Utils.getLabel(element);
Element.removeClassName(label, 'rich-menu-item-label-selected');
-}
+};
RichFaces.Menu.Utils.itemMouseOver = function(event, element, parentClasses, itemClasses)
{
@@ -1328,15 +1328,15 @@
var label = typeof element.getLabel == 'fuction' ? element.getLabel() :
RichFaces.Menu.Utils.getLabel(element);
Element.addClassName(label, 'rich-menu-item-label-selected');
-}
+};
RichFaces.Menu.Utils.getIcon = function (element) {
return $(element.id + ':icon');
-}
+};
RichFaces.Menu.Utils.getLabel = function (element) {
return $(element.id + ':anchor');
-}
+};
RichFaces.Menu.Item = Class.create({
initialize: function(id, menu, options) {
@@ -1532,7 +1532,7 @@
if (menuItem) break;
}
return menuItem;
-}
+};
RichFaces.Menu.updateItem = function (event, element, attr) {
var menuItem = RichFaces.Menu.findMenuItem(element.id);
@@ -1546,7 +1546,7 @@
element.className = classes;
if (attr.onselect) attr.onselect(event);
}
-}
+};
RichFaces.Menu.submitForm = function (event, element, options) {
if (!options) {
@@ -1562,7 +1562,7 @@
params[element.id+':hidden'] = element.id;
Richfaces.jsFormSubmit(element.id, form.id, target, params);
return false;
-}
+};
RichFaces.Menu.groupMouseOut = function(event, element, menuGroupClass, menuGroupStyle)
{
if (RichFaces.Menu.isWithin(event, element)) {
@@ -1571,7 +1571,8 @@
element.className = 'rich-menu-group rich-menu-group-enabled ' + (menuGroupClass
? menuGroupClass : '');
element.style.cssText = menuGroupStyle;
-}
+};
+
RichFaces.Menu.groupMouseOver = function(event, element, menuGroupHoverClass,
menuGroupStyle) {
if (RichFaces.Menu.isWithin(event, element)) {
return;
@@ -1579,5 +1580,5 @@
element.className = 'rich-menu-group rich-menu-group-enabled ' +
(menuGroupHoverClass ? menuGroupHoverClass : '');
element.style.cssText = menuGroupStyle;
-}
+};