[Laszlo-dev] For Review: Change 20071018-Philip-0. Summary: Fix context menu for dhtml (to match swf)
Max Carlson
max at openlaszlo.org
Tue Oct 23 12:30:33 PDT 2007
Approved!
Philip Romanik wrote:
> Change 20071018-Philip-0 by Philip at Philip-DC on 2007-10-18 20:23:02 EDT
> in /cygdrive/f/laszlo/svn/src/svn/openlaszlo/trunk
> for http://svn.openlaszlo.org/openlaszlo/trunk
>
> Summary: Fix context menu for dhtml (to match swf)
>
> New Features:
>
> Bugs Fixed: LPP-4213
>
> Technical Reviewer: max
> QA Reviewer: (pending)
> Doc Reviewer: (pending)
>
> Documentation:
>
> Release Notes:
>
> Details:
> The context menu worked differently in swf and dhtml. In swf, duplicate
> captions
> are not displayed. I added this behavior to dhtml. swf is only
> sensitive to the
> caption name, and not the method name called.
>
>
> Tests:
> Run the following test in swf and dhtml. When you right click on the
> canvas you
> should see:
>
> swf
> ---
> About OpenLaszlo...
> View Source
> My Function
> box4
> box5
> box6
> ------
> Settings
> ------
> About Adobe Flash Player 9...
>
> dhtml
> -----
> About OpenLaszlo...
> View Source
> My Function
> box4
> box5
> box6
>
>
>
> <canvas debug="true">
>
> <class name="box">
> <handler name="oninit">
> var cm = canvas.getContextMenu();
> var del = new LzDelegate (this, 'cmHandler');
> cm.addItem(cm.makeMenuItem('My Function', del));
> </handler>
>
> <method name="cmHandler">
> Debug.write("cmHandler", this);
> </method>
> </class>
>
> <class name="uniquebox">
> <handler name="oninit">
> var cm = canvas.getContextMenu();
> var del = new LzDelegate (this, 'cmHandler');
> cm.addItem(cm.makeMenuItem(this.id, del));
> </handler>
>
> <method name="cmHandler">
> Debug.write("cmHandler", this);
> </method>
> </class>
>
> <handler name="oninit">
> var cm = canvas.getContextMenu();
> var del = new LzDelegate (this, 'cmHandler');
> cm.addItem(cm.makeMenuItem('My Function', del));
> </handler>
>
> <method name="cmHandler">
> Debug.write("cmHandler", this);
> </method>
>
> <simplelayout axis="x" spacing="10"/>
> <box width="50" height="50" name="box1" bgcolor="red"/>
> <box width="50" height="50" name="box2" bgcolor="green"/>
> <box width="50" height="50" name="box3" bgcolor="blue"/>
> <uniquebox width="50" height="50" name="box4" bgcolor="red"/>
> <uniquebox width="50" height="50" name="box5" bgcolor="green"/>
> <uniquebox width="50" height="50" name="box6" bgcolor="blue"/>
> </canvas>
>
>
>
> Files:
> M WEB-INF/lps/lfc/kernel/dhtml/LzContextMenu.js
>
> Changeset:
> http://svn.openlaszlo.org/openlaszlo/patches/20071018-Philip-0.tar
>
--
Regards,
Max Carlson
OpenLaszlo.org
More information about the Laszlo-dev
mailing list