Change philip-20110723-sB2 by philip@PHILIP-I7 on 2011-07-23 15:21:10 EDT
    in /cygdrive/c/clients/laszlo/svn/openlaszlo/trunk
    for http://svn.openlaszlo.org/openlaszlo/trunk

Summary: Improve focusing on RTE components and HTML components

New Features:

Bugs Fixed: LPP-10013

Technical Reviewer: (pending)
QA Reviewer: hwei
Doc Reviewer: (pending)

Documentation:

Release Notes:

Overview:
An rte wrapper now knows how focus was moved to the rte component. When it is by mouse, no steps are taken to move the cursor to the end.

Note to anyone using a customer rtewrapper file:

1. rtemanager.js now contains some functionality that used to be in rtewrapper.html. Update your custom wrapper by removing the startfocus() method that is defined.

2. To customize what happens when an html component (or rte component) loads, you can define the method called startfocus() in your wrapper file. This method is called when the iframe received focus;

  startfocus (focusmethod, browser)

focusmethod identifies how the component was focused. If you are customizing an rte component, constants are defined inside rtemanager.js. If you are customizing an html component, you will have to define your own constants:

     -2  (FOCUS_KEYBOARD_PREV) keyboard focus via shift-tab
     -1  (FOCUS_KEYBOARD)      keyboard focus via tab
0 (FOCUS_MANUAL) manual (or unknown) reason why component is focused
      1  (FOCUS_MOUSE)         mouse focus

browser is an object that contains information about the browser that is running. The complete list of values can be found in /lps/includes/source/embednew.js

      browser      browser name (ex: Firefox)
      version      browser version (ex: 3.6)
      subversion   browser subversion (ex: 18)
      OS           OS (ex: Windows)


Details:

LzGlobalMouse.lzs
- Change for dhtml when receiving mouse events

LzFocus.lzx
- Changed meaning of second parameter to setFocus(). This parameter now specifies how focus is moving (mouse, keyboard, manual)

LzInputTest.lzs
- Fixed second parameter to setFocus()

html.lzx
- Track focus reason and transmit it to iframemanager.js

rte.lzx
- Specify second parameter to setFocus()

rtewrapper.html
- startfocus() method moved inside rtemanager.js. You can still specify your own startfocus() if you want to override the default behavior.

rtemanager.js
- moved startfocus() method from rtewrapper.html. Fixed the case for Safari and Chrome to move focus to the rte content.

iframemanager.js
- Calling startfocus() will pass the reason for focus, and information about the browser.

Tests:
See test in lpp-10013. Note: You will need to use the new rtewrapper.html file I uploaded in jira.


Files:
M       WEB-INF/lps/lfc/services/LzGlobalMouse.lzs
M       WEB-INF/lps/lfc/services/LzFocus.lzs
M       WEB-INF/lps/lfc/views/LzInputText.lzs
M       lps/components/extensions/html.lzx
M       lps/components/extensions/rte.lzx
M       lps/includes/rtewrapper.html
M       lps/includes/source/rtemanager.js
M       lps/includes/source/iframemanager.js

Changeset: http://svn.openlaszlo.org/openlaszlo/patches/philip-20110723-sB2.tar

Reply via email to