Author: jcrowley
Date: 2007-11-05 06:07:43 -0800 (Mon, 05 Nov 2007)
New Revision: 7129

Modified:
   openlaszlo/trunk/demos/amazon/amazon.lzx
   openlaszlo/trunk/demos/amazon/classlib.lzx
   openlaszlo/trunk/demos/amazon/recommendation.lzx
Log:
Change 20071011-jcrowley-5 by [EMAIL PROTECTED] on 2007-10-11 18:39:57 EDT
    in /Users/jcrowley/src/svn/openlaszlo/trunk-g
    for http://svn.openlaszlo.org/openlaszlo/trunk

Summary: Two Amazon demo bug fixes

New Features:

Bugs Fixed: LPP-4858 - BluePrint Music, SWF7 FF2 OSX 10.4.10: Dragging
        large album icon onto Shopping Cart Vertical Tab is not recognized.
        LPP-4694 - Amazon: Dragging the cart, wishlist, checkout fields
        open gives a different result than clicking the tabslider open

Technical Reviewer: ben
QA Reviewer: max
Doc Reviewer: 

Documentation:

Release Notes:

Details: The dragger wasn't setting the internal tab content to visible,
        so it wasn't showing up when it was dragged open.  There was
        also some weird -20 offset going on.

        UPDATE: I figured it out:  It was sending in the wrong view as
        an argument to the method to check whether the thumbnail was
        dropped over the tabelement in question.  Thus, it was checking
        for the relative attribute of the container to the canvas, which,
        due to the width of the tabslider tab, was 20 pixels off.  This
        should work now without fixing it in the wrong place.

Tests: Run Amazon demo:
        1) Drag open the cart, wish list, checkout: Note the contents are
        actually visible.  Compare with an unmodified version of the demo,
        where the contents are not visible.  (You can also drag open the
        tab, and click it shut.  There was another issue I fixed, not sure
        if there was ever a bug filed, where if you dragged open the tab,
        you'd have to click it twice to get it to shut.)

        2) Drag an item into the cart, and another into the wish list:
        Note that they are now deposited into the appropriate places.



Modified: openlaszlo/trunk/demos/amazon/amazon.lzx
===================================================================
--- openlaszlo/trunk/demos/amazon/amazon.lzx    2007-11-05 13:20:01 UTC (rev 
7128)
+++ openlaszlo/trunk/demos/amazon/amazon.lzx    2007-11-05 14:07:43 UTC (rev 
7129)
@@ -535,9 +535,9 @@
 
         <method name="droppedInView" args="theView">
             <![CDATA[
-            // var absX = theView.getAttributeRelative( "x", canvas );
+            //var absX = theView.getAttributeRelative( "x", canvas );
             var mouseY = 
canvas.getMouse('y')-theView.getAttributeRelative('y',canvas);
-            var mouseX = 
canvas.getMouse('x')-theView.getAttributeRelative('x',canvas);
+            var mouseX = canvas.getMouse('x') - 
theView.getAttributeRelative('x',canvas);
             return theView.containsPt(mouseX, mouseY);
             ]]>
         </method>

Modified: openlaszlo/trunk/demos/amazon/classlib.lzx
===================================================================
--- openlaszlo/trunk/demos/amazon/classlib.lzx  2007-11-05 13:20:01 UTC (rev 
7128)
+++ openlaszlo/trunk/demos/amazon/classlib.lzx  2007-11-05 14:07:43 UTC (rev 
7129)
@@ -81,13 +81,17 @@
                                                
-classroot.getAttributeRelative('x', canvas))
                                            -classroot.width );
                     classroot.panelDragger.apply();
+                    if(classroot.container.content.visible != true){
+                        classroot.container.content.setVisible(true);
+                    }
                 </method>
                 <method event="onmouseup">
-                    if ( !classroot.opened ) classroot.opened = 'true';
+                    if(classroot.opened != true) classroot.opened = 'true';
                     if ( classroot.width == parent.width ) {
                         // User has just closed the tab by dragging the panel
                         // manually.
-                        classroot.opened = 'false'
+                        classroot.opened = 'false';
+                        classroot.container.content.setVisible(false);
                     }
                     
parent.tabButton.setResourceNumber(classroot.opened=='true'?4:1);
                     classroot.panelDragger.remove();
@@ -107,8 +111,12 @@
         </method>
 
         <method name="close">
+            <![CDATA[
             var a = this.animate("width",tab.width,333,false);
-            if (! this.__closeDel) this.__closeDel = new LzDelegate(this, 
'hidecontent', a, 'onstop');
+            if (typeof this.__closeDel != 'undefined' && ! this.__closeDel){
+                this.__closeDel = new LzDelegate(this, 'hidecontent', a, 
'onstop');
+            }
+            ]]>
         </method>
 
         <method name="hidecontent">

Modified: openlaszlo/trunk/demos/amazon/recommendation.lzx
===================================================================
--- openlaszlo/trunk/demos/amazon/recommendation.lzx    2007-11-05 13:20:01 UTC 
(rev 7128)
+++ openlaszlo/trunk/demos/amazon/recommendation.lzx    2007-11-05 14:07:43 UTC 
(rev 7129)
@@ -11,9 +11,9 @@
             ondblclick="this.parent.getInfo()">
             <attribute name="source" value="${this.data}"/>
             <method name="itemDropped" args="dpath">
-                if (dragsmall.droppedInView(cart.parent)) {
+                if (dragsmall.droppedInView(cart.parent.parent)) {
                     cart.addItem(dpath);
-                } else if (dragsmall.droppedInView(wish.parent)) {
+                } else if (dragsmall.droppedInView(wish.parent.parent)) {
                     wish.addItem(dpath);
                 }
             </method>
@@ -102,7 +102,7 @@
 
 </library>
 <!-- * X_LZ_COPYRIGHT_BEGIN ***************************************************
-* Copyright 2001-2006 Laszlo Systems, Inc.  All Rights Reserved.              *
+* Copyright 2001-2007 Laszlo Systems, Inc.  All Rights Reserved.              *
 * Use is subject to license terms.                                            *
 * X_LZ_COPYRIGHT_END ****************************************************** -->
 <!-- @LZX_VERSION@                                                         -->


_______________________________________________
Laszlo-checkins mailing list
[email protected]
http://www.openlaszlo.org/mailman/listinfo/laszlo-checkins

Reply via email to