Author: jmorliaguet Date: Tue Jan 3 21:32:14 2006 New Revision: 2133 Modified: cpsskins/branches/jmo-perspectives/ui/framework/cpsskins.css cpsskins/branches/jmo-perspectives/ui/framework/cpsskins.js Log:
- better setting of the menu width Modified: cpsskins/branches/jmo-perspectives/ui/framework/cpsskins.css ============================================================================== --- cpsskins/branches/jmo-perspectives/ui/framework/cpsskins.css (original) +++ cpsskins/branches/jmo-perspectives/ui/framework/cpsskins.css Tue Jan 3 21:32:14 2006 @@ -20,7 +20,6 @@ border-color: #666; background-color: #eeeeec; color: #000; - width: 130px; } .contextMenu a { @@ -30,7 +29,7 @@ background-repeat: no-repeat; background-position: 6px center; color: #000; - padding: 4px 5px 4px 29px; + padding: 4px 15px 4px 29px; width: 96px; } Modified: cpsskins/branches/jmo-perspectives/ui/framework/cpsskins.js ============================================================================== --- cpsskins/branches/jmo-perspectives/ui/framework/cpsskins.js (original) +++ cpsskins/branches/jmo-perspectives/ui/framework/cpsskins.js Tue Jan 3 21:32:14 2006 @@ -321,7 +321,7 @@ var widget = Canvas.addNode(document.body, { tag: "div", class: ["contextMenu", view.getAttribute("class")], - style: {position:"absolute", display:"none", whitespace:"nowrap"} + style: {position:"absolute", display:"none"} }); return new CPSSkins.ContextualMenu(widget, view); }, @@ -502,8 +502,6 @@ // Display the menu inside the screen Canvas.moveTo(widget, x, y); Canvas.fitInsideScreen(widget); - // submenu relative position - this.submenuLeft = Element.getDimensions(this.widget).width -2; // reset the menu $A(widget.getElementsByTagName("*")).each(function(v) { @@ -612,12 +610,16 @@ if (disabled) break; + if (!this.submenuLeft) { + this.submenuLeft = Element.getDimensions(this.widget).width -2; + } + var submenu = Canvas.addNode(item, { tag: "div", class: "submenu", style: { position: "absolute", - left:this.submenuLeft + "px", + left: this.submenuLeft + "px", display: "none", margin: "-20px 0 0 0" } -- http://lists.nuxeo.com/mailman/listinfo/z3lab-checkins