[Laszlo-checkins] r9481 - in openlaszlo/trunk/lps/components/incubator/rich-text: . test

max@openlaszlo.org max at openlaszlo.org
Thu Jun 5 12:43:59 PDT 2008


Author: max
Date: 2008-06-05 12:43:53 -0700 (Thu, 05 Jun 2008)
New Revision: 9481

Modified:
   openlaszlo/trunk/lps/components/incubator/rich-text/formatbtn.lzx
   openlaszlo/trunk/lps/components/incubator/rich-text/richtexteditarea.lzx
   openlaszlo/trunk/lps/components/incubator/rich-text/test/linkdialog-test.lzx
Log:
Change 20080605-maxcarlson-7 by maxcarlson at Roboto on 2008-06-05 11:58:05 PDT
    in /Users/maxcarlson/openlaszlo/trunk-clean
    for http://svn.openlaszlo.org/openlaszlo/trunk

Summary: Make rich-text testcases pass in swf

Bugs Fixed: LPP-5401 - rich-text files in lps/components/incubator/rich-text/ fail

Technical Reviewer: promanik
QA Reviewer: hminsky
Doc Reviewer: (pending)

Details: linkdialog-test.lzx - Rename test to a valid JS identifier.

formatbtn.lzx - Clean up event handling.

richtexteditarea.lzx - Remove LFC hacks.

    
Tests: See LPP-5401



Modified: openlaszlo/trunk/lps/components/incubator/rich-text/formatbtn.lzx
===================================================================
--- openlaszlo/trunk/lps/components/incubator/rich-text/formatbtn.lzx	2008-06-05 19:00:56 UTC (rev 9480)
+++ openlaszlo/trunk/lps/components/incubator/rich-text/formatbtn.lzx	2008-06-05 19:43:53 UTC (rev 9481)
@@ -62,8 +62,10 @@
             Called when the user clicks the button. Asks the editor to apply the 
             format.
             @keywords private -->
-        <handler name="onclick" name="doClick">
 
+        <handler name="onclick" method="doClick"/>
+        <method name="doClick">
+
             // toggle it
             this.setActive(!this.isactive);
             if (this.toolbar._passthruchanges) {
@@ -74,7 +76,7 @@
         // Unlike the combo boxes, buttons aren't focusable, so we can just 
         // restore the selection in the same frame. No need for a delegate [ben 9.21.05]
            this.editor._restoreSelection();
-        </handler>
+        </method>
 
         <!--- @keywords private -->
         <handler name="onmouseover">          

Modified: openlaszlo/trunk/lps/components/incubator/rich-text/richtexteditarea.lzx
===================================================================
--- openlaszlo/trunk/lps/components/incubator/rich-text/richtexteditarea.lzx	2008-06-05 19:00:56 UTC (rev 9480)
+++ openlaszlo/trunk/lps/components/incubator/rich-text/richtexteditarea.lzx	2008-06-05 19:43:53 UTC (rev 9481)
@@ -5,53 +5,6 @@
 <library>
     <include href="scrollrichedittext.lzx"/>
         
-        
-        
-  <!-- 
-      This is a fix for EM-1129 and LPP-4396: clicking bold moves the insertion
-      point. We need to store the selection before losing the selection to 
-      another view. [bshine 2007.08.13]
-    -->
-    <script><![CDATA[
-        LzModeManager.rawMouseEvent = function ( eName ) {
-            //Debug.warn("rawmouseevent %w", eName);
-            //assume this happens before handleMouseEvent though order is
-            //not guaranteed
-            
-            // Store the selection in the currently focused text editor
-            // (if any). Useful for restoring a text field's selection
-            // after a click event.
-            var focus = Selection.getFocus();
-            if (focus) {
-                // Debug.info("got focus: %w", focus);             
-                // focus is a path string - we have to eval() it to get
-                // an actual movieclip
-                var textclip = eval(focus); // apologies - dstowell
-                // [NB dstowell] __LZrte is a field I created to
-                // store a reference to a rich text editor view
-                // in the textclip itself. This field is _not_ part
-                // of the LFC.
-                if ("__LZrte" in textclip) {
-                    // if we get here, it means that the focus is 
-                    // currently the rich text editor. Before
-                    // we handle the mouse event, store the selection. 
-                    var beginIndex = Selection.getBeginIndex();
-                    var endIndex   = Selection.getEndIndex();
-                    if (-1 != beginIndex && -1 != endIndex) {
-                        // Debug.warn("rawMouseEvent is changing the ssel and esel to %d-%d", beginIndex, endIndex); 
-                        textclip.__LZrte._ssel = beginIndex;
-                        textclip.__LZrte._esel = endIndex;
-                    }
-                }
-            }
-
-            this.clickStream.push( this.clstDict[ eName ] );
-            //call the cleanup delegate
-
-            this.callNext();
-        }
-    ]]></script>
-            
     <!--- 
     A view which contains the text area for a rich text editor. Combine with a 
     richtexttoolbar to make an actual editor. 

Modified: openlaszlo/trunk/lps/components/incubator/rich-text/test/linkdialog-test.lzx
===================================================================
--- openlaszlo/trunk/lps/components/incubator/rich-text/test/linkdialog-test.lzx	2008-06-05 19:00:56 UTC (rev 9480)
+++ openlaszlo/trunk/lps/components/incubator/rich-text/test/linkdialog-test.lzx	2008-06-05 19:43:53 UTC (rev 9481)
@@ -49,7 +49,7 @@
     </view> 
 </view>
 
-<TestSuite name="linkdialog-test">
+<TestSuite name="linkdialog_test">
     <TestCase>
         <method name="testTextIsPresent">
             assertNotNull(grte.getText()); 



More information about the Laszlo-checkins mailing list