[Qooxdoo-commit] qooxdoo/source/html/test Window_6.html,NONE,1.1.2.1
Brought to you by:
ecker,
martinwittemann
|
From: Sebastian W. <wp...@us...> - 2006-02-02 09:11:28
|
Update of /cvsroot/qooxdoo/qooxdoo/source/html/test In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv11755/source/html/test Added Files: Tag: renderer Window_6.html Log Message: Added blur/focus methods to all QxWidgets and new test for these --- NEW FILE: Window_6.html --- <?xml version="1.0" encoding="iso-8859-1"?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="de"> <head> <script type="text/javascript">window._htmlstart=(new Date).valueOf()</script> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-15" /> <meta http-equiv="MsThemeCompatible" content="yes" /> <meta http-equiv="ImageToolBar" content="no" /> <meta name="MSSmartTagsPreventParsing" content="yes" /> <title>qooxdoo demo dev</title> <link type="text/css" rel="stylesheet" href="../../style/demolayout.css"/> <script type="text/javascript" src="../../../tools/script/includer.js"></script> </head> <body> <script type="text/javascript" src="../../../tools/script/demolayout.js"></script> <div id="testDescription"> <p>Dialog with QxForm and QxTextArea</p> <p>Testing initial focus handling.</p> </div> <script type="text/javascript" language="JavaScript"> window.application.main = function() { var d = this.getClientWindow().getClientDocument(); var txtfld; var dialogEditFrage = new QxWindow("Edit", "icons/16/editor.png"); with(dialogEditFrage) { setSpace(300, 400, 100, 300); setShowClose(false); var qx = new QxAtom('Question'); with(qx) { setHorizontalChildrenAlign('right'); set({top:10,left:10,width:'20%'}); }; add(qx); qx = txtfld = new QxTextArea(); with (qx) { set({top:10,right:10,width:'70%'}) } add(qx); txtfld.addEventListener("appear", function(e) { this.focus(); }); qx = new QxAtom('Type'); with(qx) { setHorizontalChildrenAlign('right'); set({top:70,left:10,width:'20%'}); }; add(qx); qx = new QxTextField(); with (qx) { set({top:70,right:10,width:'70%'}) } add(qx); var btnOK = new QxButton("OK", "icons/16/buttonok.png"); var btnCancel = new QxButton("Cancel", "icons/16/buttoncancel.png"); var btnSetFocus = new QxButton("Set Focus To First Field", "icons/16/reload.png"); btnOK.set({ bottom : 10, right : 10 }); btnCancel.set({ bottom : 10, left : 10 }); btnSetFocus.set({ bottom : 10, left : 100 }); btnCancel.addEventListener("execute", function(e) { dialogEditFrage.close(); }); btnOK.addEventListener("execute", function(e) { dialogEditFrage.close(); }); btnSetFocus.addEventListener("execute", function(e) { txtfld.focus(); }); add(btnOK, btnCancel, btnSetFocus); } var btnOpen = new QxButton("Open the dialog"); btnOpen.set({ top : 50, left : 20 }); btnOpen.addEventListener("click", function(e) { dialogEditFrage.open(); }); var btnRestore = new QxButton("Restore the dialog"); btnRestore.set({ top : 80, left : 20 }); btnRestore.addEventListener("click", function(e) { dialogEditFrage.restore(); }); d.add(btnOpen,btnRestore,dialogEditFrage); } </script> </body> </html> |