r21325: delete children in reverse order since the array is manipulated during the...
[Samba/gbeck.git] / webapps / qooxdoo-0.6.3-sdk / frontend / demo / source / html / test / ComboBox_3.html
blob7fe9f3ff7695100b8bcac60b54ee07cc00e6dd81
1 <html>
2 <head>
3 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
4 <title>qooxdoo &raquo; Demo</title>
5 <link type="text/css" rel="stylesheet" href="../../resource/css/layout.css"/>
6 <!--[if IE]>
7 <link type="text/css" rel="stylesheet" href="../../resource/css/layout_ie.css"/>
8 <![endif]-->
9 <script type="text/javascript" src="../../script/qx.js"></script>
10 </head>
11 <body>
12 <script type="text/javascript" src="../../script/layout.js"></script>
14 <div id="demoDescription">
15 <p>Testing qx.ui.form.ComboBox implementation.</p>
16 <p>Testing object creation (the list content will be filled then) on first open.</p>
17 <p>Added Color Theme Buttons</p>
18 <p>Now with image inside the popup.</p>
19 </div>
21 <select style="position:absolute; left:300px; top:48px; width: 120px;">
22 <option>Item No 1</option>
23 <option>Item No 2</option>
24 <option>Item No 3</option>
25 <option>Item No 4</option>
26 <option>Item No 5</option>
27 <option>Item No 6</option>
28 <option>Item No 7</option>
29 <option>Item No 8</option>
30 <option>Item No 9</option>
31 <option disabled="true">Item No 10</option>
32 <option>Item No 11</option>
33 <option>Item No 12</option>
34 <option>Item No 13</option>
35 <option>Item No 14</option>
36 <option>Item No 15</option>
37 <option>Item No 16</option>
38 <option>Item No 17</option>
39 <option>Item No 18</option>
40 <option>Item No 19</option>
41 <option disabled="true">Item No 20</option>
42 <option>Item No 21</option>
43 <option>Item No 22</option>
44 <option>Item No 23</option>
45 <option>Item No 24</option>
46 <option>Item No 23</option>
47 <option>Item No 24</option>
48 <option>Item No 25</option>
49 <option>Item No 26</option>
50 <option>Item No 27</option>
51 <option>Item No 28</option>
52 <option>Item No 29</option>
53 <option disabled="true">Item No 30</option>
54 </select>
56 <script type="text/javascript">
57 qx.core.Init.getInstance().defineMain(function()
59 var d = qx.ui.core.ClientDocument.getInstance();
61 var c1 = new qx.ui.form.ComboBox;
62 c1.setLocation(20, 48);
64 // this example seems to be buggy with auto-height
65 // c1.getPopup().setHeight(150);
67 c1.addEventListener("beforeInitialOpen", function(e)
69 var item;
70 var list = [ "archive", "binary", "card", "document", "html", "image", "manual", "multimedia", "pdf" ];
72 for(var i=0; i<list.length; i++)
74 item = new qx.ui.form.ListItem(list[i], "icon/48/mime-" + list[i] + ".png");
75 item.setShow("icon");
77 c1.add(item);
80 c1.setSelected(c1.getList().getFirstChild());
81 });
83 // this does not work here (if there is no content)
84 c1.setSelected(c1.getList().getFirstChild());
86 c1.addEventListener("changeValue", function(e) {
87 this.debug("New value: " + e.getData());
88 });
90 c1.addEventListener("changeSelected", function(e) {
91 this.debug("New selected: " + e.getData());
92 });
97 var b1 = new qx.ui.form.CheckBox("Editable");
99 b1.set({ top: 50, left: 150 });
101 b1.addEventListener("changeChecked", function(e) {
102 c1.setEditable(e.getData());
107 d.add(c1, b1);
115 // Color Themes
116 qx.manager.object.ColorManager.getInstance().createThemeList(d, 20, 248);
121 </script>
122 </body>
123 </html>