r20445: add README file indicating that the swat directory is no longer relevant
[kai/samba.git] / swat.obsolete / apps / qooxdoo-examples / example / ListView_4.html
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>
13
14   <div id="demoDescription">
15     <p>Testing qx.ui.listview.ListView with text cells.</p>
16     <p>Added some sort handling stuff.</p>
17   </div>
18
19   <script type="text/javascript">
20     qx.core.Init.getInstance().defineMain(function()
21     {
22       var ld = [];
23       var lt = [ "Image", "Text", "PDF", "Illustration", "Document" ];
24
25       for (var i=0, t; i<1000; i++)
26       {
27         t=Math.round(Math.random()*4);
28         ld.push({ name : { text : "File " + i }, size : { text : Math.round(Math.random()*100) + "kb" }, type : { text : lt[t] }, modified : { text : "Nov " + Math.round(Math.random() * 30 + 1) + " 2005" }, rights: { text : "-rw-r--r--" }});
29       };
30
31       var lc =
32       {
33         name : { label : "Name", width : 100, type : "text", sortable : true, sortProp : "text" },
34         size: { label : "Size", width : 50, type : "text", sortable : true, sortProp : "text", sortMethod : qx.util.Compare.byIntegerString, align : "right" },
35         type : { label : "Type", width : 80, type : "text", sortable : true, sortProp : "text" },
36         modified : { label : "Last Modified", width : 150, type : "text" },
37         rights : { label : "Rights", width: 80, type : "text" }
38       };
39
40       var lv = new qx.ui.listview.ListView(ld, lc);
41
42       lv.setBorder(qx.renderer.border.BorderPresets.getInstance().shadow);
43       lv.setBackgroundColor("white");
44       lv.setWidth(600);
45       lv.setHeight(350);
46       lv.setLocation(20, 48);
47
48       qx.ui.core.ClientDocument.getInstance().add(lv);
49
50
51
52
53       // Color Themes
54       qx.manager.object.ColorManager.getInstance().createThemeList(qx.ui.core.ClientDocument.getInstance(), 20, 448);
55     });
56   </script>
57 </body>
58 </html>