OSDN Git Service

71f27ca0b5a4d3b83991ad2f6e1a10e4edf9330f
[rec10/rec10-git.git] / Rec10WEB / trunk / src / iepg_show.htm
1
2 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
3 <html>
4   <head>
5     <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
6     <meta http-equiv="Content-Style-Type" content="text/css">
7     <meta http-equiv="Content-Script-Type" content="text/javascript">
8     <title>Rec10 Simple Web Interface ver.0.7.0 iEPGデータ表示</title>
9     <script src="./dojo/dojo/dojo.js" djConfig="parseOnLoad:true">
10         </script>
11         <!-- テーマの読み込み -->
12         <style type="text/css">
13             @import "./dojo/dojo/resources/dojo.css";
14             @import "./dojo/dijit/themes/tundra/tundra.css";
15             @import "./dojo/dojox/grid/resources/Grid.css";
16             @import "./dojo/dojox/grid/resources/tundraGrid.css";
17         </style>
18         <script type="text/javascript">
19             dojo.require("dojo.parser");
20             // ※ ここで、使用するウィジェットの読み込みを行う
21             dojo.require('dojox.grid.DataGrid');
22             dojo.require("dijit.form.Form"); 
23             dojo.require("dijit.form.Button");
24             dojo.require("dijit.form.TextBox");
25             dojo.require("dojo.data.ItemFileWriteStore");
26             dojo.require("dijit.form.ValidationTextBox");
27             dojo.require("dojox.data.CsvStore");
28             dojo.require("dijit.form.TextBox");
29             dojo.require("dojox.grid.cells.dijit")
30             var iepgstore = new dojox.data.CsvStore({url:'./iepgdatum.csv'});
31             //var iepgStructure=[
32             //    {name:"ID",field:"id",width:"30px"},
33             //    {name:"チャンネル",field:"name",width:"200px"},
34             //    {name:"chtxt",field:"chtxt",width:"100px"}
35             //]
36             function changeGrid(grid){
37                 var s=dijit.byId("iepgGrid").store.getValue(dijit.byId("iepgGrid").getItem(grid.rowIndex),"id");
38                 var str=dijit.byId("iepg_delnum").value;
39                 str=str+","+s;
40                 dijit.byId("iepg_delnum").setValue(str);
41             };
42             dojo.addOnLoad(function(){
43                 dojo.connect(dijit.byId("iepgGrid"),"onRowClick",changeGrid);
44                 dojo.connect(dijit.byId("del"),"onClick",function(e){
45                     dijit.byId("MainForm").submit();
46                 });
47             });
48         </script>
49   </head>
50   <body class="tundra">
51     <div dojoType="dijit.form.Form" action="rec10web.py" onExecute="this.submit()" id="MainForm">
52         <h1>Rec10 Simple Web Interface ver.0.7.0 iEPGデータ表示</h1><br>
53         <table dojoType="dojox.grid.DataGrid"
54             id="iepgGrid"
55             jsid="iepgGrid"
56             store="iepgstore"
57             query="{id:'*'}"
58             autoHeight="true"
59             width="100%"
60             autoHeight="true"
61             autoWidth="true"
62             clientSort="true"
63             onRowClick="changeGrid"
64             >
65             <thead>
66                 <tr>
67                     <th field="id" width="30px">ID</th>
68                     <th field="name" width="200px">チャンネル</th>
69                     <th field="chtxt" width="100px">chtxt</th>
70                 </tr>
71             </thead>
72         </table>
73         </div>
74         <div dojoType="dijit.form.Button" type="submit" id="del">DEL</div>
75         <div name="exec"
76              dojoType="dijit.form.ValidationTextBox"
77              value="iepg-del"
78              style="display:none">
79         </div>
80         <div name="iepg_delnum:"
81              id="iepg_delnum"
82              dojoType="dijit.form.TextBox"
83              value=""
84              style="display:none">
85         </div>
86     </div>
87   </body>
88 </html>