[Laszlo-checkins] r13844 - in openlaszlo/trunk: WEB-INF/lps/lfc/kernel/dhtml test/contextmenu
hqm@openlaszlo.org
hqm at openlaszlo.org
Fri May 8 17:23:11 PDT 2009
Author: hqm
Date: 2009-05-08 17:23:09 -0700 (Fri, 08 May 2009)
New Revision: 13844
Modified:
openlaszlo/trunk/WEB-INF/lps/lfc/kernel/dhtml/LzContextMenuKernel.lzs
openlaszlo/trunk/WEB-INF/lps/lfc/kernel/dhtml/LzSprite.js
openlaszlo/trunk/test/contextmenu/ie7.lzx
Log:
Change 20090508-hqm-1 by hqm at badtzmaru.home on 2009-05-08 17:19:08 EDT
in /Users/hqm/openlaszlo/trunk-diamond
for http://svn.openlaszlo.org/openlaszlo/trunk
Summary: fix for DHTML IE: Context menus too wide
New Features:
Bugs Fixed: LPP-8137
Technical Reviewer: andre
QA Reviewer: max
Doc Reviewer: (pending)
Documentation:
Release Notes:
Details:
+ Use "float: left" to cause menu div to track text width in IE7
+ Define 'separator' CSS class to draw the menu separator
Tests:
tested in FF/OSX, and IE7/WINXP DHTML
test/contextmenu/ie7.lzx
CSS styles for hover work again
Modified: openlaszlo/trunk/WEB-INF/lps/lfc/kernel/dhtml/LzContextMenuKernel.lzs
===================================================================
--- openlaszlo/trunk/WEB-INF/lps/lfc/kernel/dhtml/LzContextMenuKernel.lzs 2009-05-09 00:05:34 UTC (rev 13843)
+++ openlaszlo/trunk/WEB-INF/lps/lfc/kernel/dhtml/LzContextMenuKernel.lzs 2009-05-09 00:23:09 UTC (rev 13844)
@@ -85,7 +85,7 @@
if (! s) {
s = document.createElement('div');
lz.embed.__setAttr(s, 'id', 'lzcontextmenu');
- lz.embed.__setAttr(s, 'style', 'display: none');
+ lz.embed.__setAttr(s, 'style', 'display: none;float: left');
document.body.appendChild(s);
}
var owner = this.owner;
@@ -99,7 +99,7 @@
var cm = items[i].kernel;
var v = cm.cmenuitem;
if (v.visible != true) continue;
- if (v.separatorBefore) o += '<hr/>';
+ if (v.separatorBefore) o += '<div class="separator"></div>';
var caption = v.caption;
// Don't display the same item twice (matches swf behavior)
@@ -118,7 +118,7 @@
LzMouseKernel.__showncontextmenu = this;
- s.innerHTML = "<table><tr><td>"+o+"</td></tr></table>";
+ s.innerHTML = o;
if (send) {
s.style.left = LzMouseKernel.__x + 'px';
s.style.top = LzMouseKernel.__y + 'px';
Modified: openlaszlo/trunk/WEB-INF/lps/lfc/kernel/dhtml/LzSprite.js
===================================================================
--- openlaszlo/trunk/WEB-INF/lps/lfc/kernel/dhtml/LzSprite.js 2009-05-09 00:05:34 UTC (rev 13843)
+++ openlaszlo/trunk/WEB-INF/lps/lfc/kernel/dhtml/LzSprite.js 2009-05-09 00:23:09 UTC (rev 13844)
@@ -393,6 +393,14 @@
return n;
}
}
+LzSprite.prototype.__defaultStyles['#lzcontextmenu div.separator'] = {
+ "border-top": '1px solid #808080',
+ "border-left": 'none',
+ "border-right": 'none',
+ "border-bottom": '1px solid #d4d0c8',
+ "margin": '7px 0px'
+};
+
LzSprite.prototype.__defaultStyles['#lzcontextmenu a'] = {
color: '#000',
display: 'block',
@@ -403,6 +411,7 @@
color: '#FFF',
backgroundColor: '#333'
};
+
LzSprite.prototype.__defaultStyles['#lzcontextmenu'] = {
position: 'absolute',
zIndex: 10000000,
Modified: openlaszlo/trunk/test/contextmenu/ie7.lzx
===================================================================
--- openlaszlo/trunk/test/contextmenu/ie7.lzx 2009-05-09 00:05:34 UTC (rev 13843)
+++ openlaszlo/trunk/test/contextmenu/ie7.lzx 2009-05-09 00:23:09 UTC (rev 13844)
@@ -2,34 +2,6 @@
<debug fontsize="12"/>
- <handler name="oninited">
- LzTimeKernel.setTimeout(function () {
- if (lz.Instantiator.isUpdating) {
- // If the instantiator is still running, just requeue ourselves
- LzTimeKernel.setTimeout(arguments.callee, 10 * 1000);
- } else {
- // Wait a bit for things to settle
- LzTimeKernel.setTimeout(function () {
- myoutput.bringToFront();
- myoutput.format("LzIdleKernel.__callbacks: %w\n", LzIdleKernel.__callbacks);
- myoutput.addFormat("lz.Idle.coi: %w\n", lz.Idle.coi);
- if ($profile) {
- Profiler.stop();
- myoutput.addFormat("Starting profiling...");
- Profiler.start();
- // Profile for 40 seconds
- LzTimeKernel.setTimeout(function () {
- Profiler.stop();
- myoutput.addFormat(" done!\n");
- }, 40 * 1000);
- }
- }, 10 * 1000);
- }
- }, 10 * 1000);
- </handler>
-
-<text id="myoutput" multiline="true" />
-
<simplelayout/>
<view id="mv" width="100" height="100" bgcolor="#cccccc">
<method name="init">
More information about the Laszlo-checkins
mailing list