r20446: rename swat directory to swat.obsolete; keeping it around since there is...
[samba.git] / swat.obsolete / apps / qooxdoo-examples / example / ListView_3.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 iconHtml cells.</p>
16   </div>
17
18   <script type="text/javascript">
19     qx.core.Init.getInstance().defineMain(function()
20     {
21       var ld = [];
22       var lt = [ "Image", "Text", "PDF", "Illustration", "Document" ];
23       
24       for (var i=0, t; i<1000; i++) 
25       {
26         t=Math.round(Math.random()*4);
27         ld.push({ name : { html : "E-Mail " + i, icon : "icon/16/email.png", iconWidth : 16, iconHeight : 16 }, 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--" }, open : { uri : "http://www.google.com/search?q=" + i, html : "Open " + i }});
28       };
29       
30       var lc = 
31       {
32         name : { label : "Name", width : 120, type : "iconHtml" },
33         size: { label : "Size", width : 50, type : "text", align : "right" },
34         type : { label : "Type", width : 80, type : "text" },
35         modified : { label : "Last Modified", width : 150, type : "text" },
36         rights : { label : "Rights", width: 80, type : "text" }     
37       };
38       
39       var lv = new qx.ui.listview.ListView(ld, lc);
40
41       lv.setBorder(qx.renderer.border.BorderPresets.getInstance().shadow);
42       lv.setBackgroundColor("white");
43       lv.setWidth(600);
44       lv.setHeight(350);
45       lv.setLocation(20, 48);
46
47       qx.ui.core.ClientDocument.getInstance().add(lv);
48     });
49   </script>
50 </body>
51 </html>