1 <patTemplate:tmpl name="_widget">
\r
2 <script type="text/javascript">
\r
5 document.main.task.value = 'detail';
\r
6 document.main.act.value = 'new';
\r
7 document.main.submit();
\r
10 function editItem(){
\r
11 if (document.main.seriallist.value){
\r
12 var items = document.main.seriallist.value.split(",");
\r
13 for (var i = 0; i < items.length; i++){
\r
14 var name = "document.main.item" + i + "_selected";
\r
15 var itemObj = eval(name);
\r
17 if (itemObj && itemObj.checked) break;
\r
19 if (i == items.length){
\r
20 window.alert('編集する項目を選択してください');
\r
22 document.main.task.value = 'detail';
\r
23 document.main.act.value = 'edit';
\r
24 document.main.serial.value = items[i];
\r
25 document.main.submit();
\r
30 function editItemBySerial(serial){
\r
31 document.main.task.value = 'detail';
\r
32 document.main.act.value = 'edit';
\r
33 document.main.serial.value = serial;
\r
34 document.main.submit();
\r
37 if (document.main.seriallist.value){
\r
38 var items = document.main.seriallist.value.split(",");
\r
39 for (var i = 0; i < items.length; i++){
\r
40 var name = "document.main.item" + i + "_selected";
\r
41 var itemObj = eval(name);
\r
43 if (itemObj && itemObj.checked) break;
\r
45 if (i == items.length){
\r
46 window.alert('削除する項目を選択してください');
\r
48 if (!window.confirm('選択項目を削除しますか?')) return false;
\r
49 document.main.act.value = 'delete';
\r
50 document.main.submit();
\r
56 function addToMenu(selId){
\r
57 if (!window.confirm('この項目をメインメニューに追加しますか?')) return false;
\r
58 document.main.act.value = 'addtomenu';
\r
59 document.main.contentid.value = selId;
\r
60 document.main.submit();
\r
64 // スクロールバー付きのテーブルを作成
\r
65 m3_tableWithScrollbar('contlist', 10, 0); // データは10行表示
\r
69 <div align="center">
\r
71 <!-- m3:ErrorMessage -->
\r
72 <form method="post" name="main">
\r
73 <input type="hidden" name="task" value="list" />
\r
74 <input type="hidden" name="act" />
\r
75 <input type="hidden" name="serial" />
\r
76 <input type="hidden" name="seriallist" value="{SERIAL_LIST}" />
\r
77 <input type="hidden" name="contentid" />
\r
80 <label>コンテンツ一覧</label>
\r
82 <td align="right"><input type="button" class="button" onclick="newItem();" value="新規" /><input type="button" class="button" onclick="editItem();" value="編集" /><input type="button" class="button" onclick="delItem();" value="削除" />
\r
84 <tr><td colspan="2">
\r
85 <table id="contlist" class="simple-table" width="100%">
\r
88 <th width="40">選択</th>
\r
89 <th width="30">ID</th>
\r
90 <th width="30%">名前</th>
\r
91 <th width="50">公開</th>
\r
92 <th width="70">デフォルト</th>
\r
93 <th width="100">更新者</th>
\r
94 <th width="120">更新日時</th>
\r
95 <th width="50">参照数</th>
\r
100 <patTemplate:tmpl name="itemlist">
\r
102 <td align="center"><input type="checkbox" name="item{INDEX}_selected" /></td>
\r
103 <td align="center">{ID}</td>
\r
104 <td><a href="#" onclick="editItemBySerial({SERIAL});">{NAME}</a></td>
\r
105 <td align="center"><input type="checkbox" disabled {VISIBLE} /></td>
\r
106 <td align="center"><input type="checkbox" disabled {DEFAULT} /></td>
\r
107 <td align="center">{UPDATE_USER}</td>
\r
108 <td align="center">{UPDATE_DT}</td>
\r
109 <td align="center">{VIEW_COUNT}</td>
\r
110 <td align="right"><input type="button" class="button" onclick="addToMenu('{ID}');" value="メインメニューに追加" /></td>
\r
112 </patTemplate:tmpl>
\r
119 </patTemplate:tmpl>
\r