Changeset 177 for trunk/popups


Ignore:
Timestamp:
05/19/05 15:28:30 (14 years ago)
Author:
gogo
Message:
  • Minor comment changes.
  • Refactor events for form submit, reset and window unload
  • Fix reset handler to properly use the original textarea content
  • Minor changes to setHTML etc
  • Use onload for iframe to determine when to initIframe, instead of a timeout
  • Remove overlooked debugging statement in loadPlugins
  • Change some event registrations to use addDom0Event rather than element.onxxx = something
  • Add HTMLArea.flushEvents() as an implementation of #30 - sadly, doesn't work. This is not enabled in the full_example, use examples/testbed.html to test it out.
  • Added methods HTMLArea.addDom0Event and HTMLArea.prependDom0Event which are to be used instead of element.onxxxxx = something;
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/popups/popup.js

    r76 r177  
    1111// 
    1212// $Id$ 
     13HTMLArea = window.opener.HTMLArea; 
    1314 
    1415function getAbsolutePos(el) { 
     
    7374                window.moveTo(x, y); 
    7475        } 
    75         document.body.onkeypress = __dlg_close_on_esc; 
     76        HTMLArea.addDom0Event(document.body, 'keypress', __dlg_close_on_esc); 
    7677}; 
    7778 
    7879function __dlg_translate(context) { 
    79     HTMLArea = window.opener.HTMLArea; 
    8080        var types = ["input", "select", "legend", "span", "option", "td", "button", "div", "label"]; 
    8181        for (var type = 0; type < types.length; ++type) { 
Note: See TracChangeset for help on using the changeset viewer.