3 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
4 <title>qooxdoo » Demo</title>
5 <link type="text/css" rel="stylesheet" href="../../resource/css/layout.css"/>
7 <link type="text/css" rel="stylesheet" href="../../resource/css/layout_ie.css"/>
9 <script type="text/javascript" src="../../script/qx.js"></script>
12 <script type="text/javascript" src="../../script/layout.js"></script>
14 <div id="demoDescription">
15 <p>Dialog with qx.ui.form.TextField and qx.ui.form.TextArea</p>
16 <p>Testing initial focus handling.</p>
20 <script type="text/javascript" language="JavaScript">
23 qx.core.Init.getInstance().defineMain(function() {
25 var d = qx.ui.core.ClientDocument.getInstance();
28 var dialogEditFrage = new qx.ui.window.Window("Edit", "icon/16/editor.png");
31 with(dialogEditFrage) {
32 setSpace(300, 400, 100, 300);
36 var qxObj = new qx.ui.basic.Atom('Question');
39 setHorizontalChildrenAlign('right');
40 set({top:10,left:10,width:'20%'});
44 qxObj = txtfld = new qx.ui.form.TextArea();
46 set({top:10,right:10,width:'70%'})
50 txtfld.addEventListener("appear", function(e) {
54 qxObj = new qx.ui.basic.Atom('Type');
57 setHorizontalChildrenAlign('right');
58 set({top:70,left:10,width:'20%'});
62 qxObj = new qx.ui.form.TextField();
64 set({top:70,right:10,width:'70%'})
69 var btnOK = new qx.ui.form.Button("OK", "icon/16/button-ok.png");
70 var btnCancel = new qx.ui.form.Button("Cancel", "icon/16/button-cancel.png");
71 var btnSetFocus = new qx.ui.form.Button("Set Focus To First Field", "icon/16/reload.png");
73 btnOK.set({ bottom : 10, right : 10 });
74 btnCancel.set({ bottom : 10, left : 10 });
75 btnSetFocus.set({ bottom : 10, left : 100 });
77 btnCancel.addEventListener("execute", function(e) {
78 dialogEditFrage.close();
80 btnOK.addEventListener("execute", function(e) {
81 dialogEditFrage.close();
84 btnSetFocus.addEventListener("execute", function(e) {
88 add(btnOK, btnCancel, btnSetFocus);
91 var btnOpen = new qx.ui.form.Button("Open the dialog");
92 btnOpen.set({ top : 50, left : 20 });
93 btnOpen.addEventListener("click", function(e) {
94 dialogEditFrage.open();
97 var btnRestore = new qx.ui.form.Button("Restore the dialog");
98 btnRestore.set({ top : 80, left : 20 });
99 btnRestore.addEventListener("click", function(e) {
100 dialogEditFrage.restore();
103 d.add(btnOpen,btnRestore,dialogEditFrage);