[Laszlo-dev] For Review: Change 20090518-bargull-iCv Summary: DHTML: contextmenu part one

André Bargull andre.bargull at udo.edu
Mon May 18 14:05:27 PDT 2009


I've made a new changeset and splitted the changes up. All in one change 
is just too confusing for the reviewers and for me!


Change 20090518-bargull-iCv by bargull at dell--p4--2-53 on 2009-05-18 22:35:24
in /home/Admin/src/svn/openlaszlo/trunk
for http://svn.openlaszlo.org/openlaszlo/trunk

Summary: DHTML: contextmenu part one

New Features:

Bugs Fixed: LPP-8201 (DHTML: hidden contextmenu item shows separator), 
LPP-8202 (DHTML: possible to change an active contextmenu), LPP-8203 
(DHTML: contextmenu isn't displayed after mouse left application), 
LPP-8204 (DHTML: browser contextmenu is displayed)

Technical Reviewer: max
QA Reviewer: henry
Doc Reviewer: (pending)

Documentation:

Release Notes:

Details:
LzContextMenuKernel:
- remove listeners to onmousedown, onmouseup, onclick from 
anchor-elements, this didn't work in Firefox. Instead add handlers to 
lzcontextmenu-div
- only show contextmenu if "showbuiltins" isn't set
- remove ignore-arg from __hide(), no longer needed
- Move contextmenu-div into separate method and store reference to the 
div, so you don't need to use getElementById() over and over again
- only select contextmenu item on left button click

LzSprite:
- for onmouseout, it's "toElement", not "fromElement"..
- Handle contextmenu for keyboard activation (see "onmouseover" handler 
for root-sprite's div)
- handle "onmousemove" first, because it's processed often


LPP-8201: Add separator after checking for double contextmenu items 
(LzContextMenuKernel#__show())
LPP-8202: Remove implementation of LzContextMenuKernel#addItem(..), 
#clearItems(). It was added for LPP-6749, but the right fix is to call 
the contextmenu delegate before displaying the contextmenu (see above). 
Now you can also remove the "send" parameter from "__show(..)".
LPP-8203: In LzSprite#__mouseEvent(..), call the "onmouseover" 
event-handler from the root-sprite's div, if the mouse entered the 
application.
LPP-8204: Fixed by the handlers added to the lzcontextmenu-div (see 
above) and the updated keyboard activation code to handle the 
contextmenu-div


Tests:
see bugreports

Files:
M WEB-INF/lps/lfc/kernel/dhtml/LzContextMenuKernel.lzs
M WEB-INF/lps/lfc/kernel/dhtml/LzSprite.js
M WEB-INF/lps/lfc/kernel/dhtml/LzMouseKernel.js

Changeset: 
http://svn.openlaszlo.org/openlaszlo/patches/20090518-bargull-iCv.tar



More information about the Laszlo-dev mailing list