1 | <!--{* |
---|
2 | /* |
---|
3 | * This file is part of EC-CUBE |
---|
4 | * |
---|
5 | * Copyright(c) 2000-2008 LOCKON CO.,LTD. All Rights Reserved. |
---|
6 | * |
---|
7 | * http://www.lockon.co.jp/ |
---|
8 | * |
---|
9 | * This program is free software; you can redistribute it and/or |
---|
10 | * modify it under the terms of the GNU General Public License |
---|
11 | * as published by the Free Software Foundation; either version 2 |
---|
12 | * of the License, or (at your option) any later version. |
---|
13 | * |
---|
14 | * This program is distributed in the hope that it will be useful, |
---|
15 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
---|
16 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
---|
17 | * GNU General Public License for more details. |
---|
18 | * |
---|
19 | * You should have received a copy of the GNU General Public License |
---|
20 | * along with this program; if not, write to the Free Software |
---|
21 | * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. |
---|
22 | */ |
---|
23 | *}--> |
---|
24 | <style type="text/css"> |
---|
25 | div.dragged_elm { |
---|
26 | position: absolute; |
---|
27 | border: 1px solid black; |
---|
28 | background: rgb(195,217,255); |
---|
29 | color: #333; |
---|
30 | cursor: move; |
---|
31 | PADDING-RIGHT: 2px; |
---|
32 | PADDING-LEFT: 2px; |
---|
33 | PADDING-BOTTOM: 5px; |
---|
34 | PADDING-TOP: 5px; |
---|
35 | FONT-SIZE: 10pt; |
---|
36 | } |
---|
37 | |
---|
38 | div.drop_target { |
---|
39 | border: 0px solid gray; |
---|
40 | position: relative; |
---|
41 | text-align: center; |
---|
42 | color: #333; |
---|
43 | } |
---|
44 | |
---|
45 | </style> |
---|
46 | <script type="text/javascript"> |
---|
47 | |
---|
48 | function doPreview(){ |
---|
49 | document.form1.mode.value="preview" |
---|
50 | document.form1.target = "_blank"; |
---|
51 | document.form1.submit(); |
---|
52 | } |
---|
53 | function fnTargetSelf(){ |
---|
54 | document.form1.target = "_self"; |
---|
55 | } |
---|
56 | |
---|
57 | // 初期処理 |
---|
58 | function init () { |
---|
59 | document.body.ondrag = function () { return false; }; |
---|
60 | document.body.onselectstart = function () { return false; }; |
---|
61 | |
---|
62 | // ウィンドウサイズを取得 |
---|
63 | scrX = GetWindowSize("width"); |
---|
64 | scrY = GetWindowSize("height"); |
---|
65 | |
---|
66 | // ウィンドウサイズ変更イベントに関連付け |
---|
67 | window.onresize = fnMoveObject; |
---|
68 | |
---|
69 | // divタグを取得 |
---|
70 | all_elms = document.getElementsByTagName ( 'div' ); |
---|
71 | |
---|
72 | // tdタグを取得 |
---|
73 | all_td = document.getElementsByTagName ( 'td' ); |
---|
74 | |
---|
75 | // 配列作成 |
---|
76 | fnCreateArr(0); |
---|
77 | |
---|
78 | // alerttest(0); |
---|
79 | |
---|
80 | // 並び替え |
---|
81 | fnMoveObject(); |
---|
82 | |
---|
83 | <!--{$complate_msg}--> |
---|
84 | } |
---|
85 | |
---|
86 | </script> |
---|
87 | |
---|
88 | <script type="text/javascript" src="<!--{$TPL_DIR}-->js/layout_design.js"></script> |
---|
89 | |
---|
90 | |
---|
91 | <form name="form1" id="form1" method="post" action="<!--{$smarty.server.PHP_SELF|escape}-->" > |
---|
92 | <input type="hidden" name="mode" value="" /> |
---|
93 | <input type="hidden" name="page_id" value="<!--{$page_id}-->" /> |
---|
94 | <input type="hidden" name="bloc_cnt" value="<!--{$bloc_cnt}-->" /> |
---|
95 | <div id="design" class="contents-main"> |
---|
96 | |
---|
97 | <!--{* ▼レイアウト編集ここから *}--> |
---|
98 | <table> |
---|
99 | <tr> |
---|
100 | <th align="center">レイアウト編集</th> |
---|
101 | <th align="center">未使用ブロック</th> |
---|
102 | </tr> |
---|
103 | <tr> |
---|
104 | <!--{* ▼レイアウトここから *}--> |
---|
105 | <td> |
---|
106 | <table id="layout-table"> |
---|
107 | <tr> |
---|
108 | <td colspan="3"> ヘッダー部 </td> |
---|
109 | </tr> |
---|
110 | <tr> |
---|
111 | <!--{* 左ナビテーブルここから *}--> |
---|
112 | <td rowspan="3"> |
---|
113 | <div tid="LeftNavi" class="drop_target" id="t1" style="width: 145px; height: 100px;"></div> |
---|
114 | </td> |
---|
115 | <!--{* 左ナビテーブルここまで *}--> |
---|
116 | <!--{* メイン上部テーブルここから *}--> |
---|
117 | <td> |
---|
118 | <div tid="MainHead" class="drop_target" id="t2" style="width: 145px; height: 100px;"></div> |
---|
119 | </td> |
---|
120 | <!--{* メイン上部テーブルここまで *}--> |
---|
121 | <!--{* 右ナビここから *}--> |
---|
122 | <td rowspan="3"> |
---|
123 | <div tid="RightNavi" class="drop_target" id="t3" style="width: 145px; height: 100px;"></div> |
---|
124 | </td> |
---|
125 | <!--{* 右ナビここまで *}--> |
---|
126 | </tr> |
---|
127 | <!--{* メインここから *}--> |
---|
128 | <tr> |
---|
129 | <td id='Main'>メイン</td> |
---|
130 | </tr> |
---|
131 | <!--{* メインここまで *}--> |
---|
132 | <!--{* メイン下部ここから *}--> |
---|
133 | <tr> |
---|
134 | <td name='MainFoot' id="layout"> |
---|
135 | <div tid="MainFoot" class="drop_target" id="t4" style="width: 145px; height: 100px;"></div> |
---|
136 | </td> |
---|
137 | </tr> |
---|
138 | <!--{* メイン下部ここまで *}--> |
---|
139 | </tr> |
---|
140 | <tr> |
---|
141 | <td colspan=3>フッター部</td> |
---|
142 | </tr> |
---|
143 | </table> |
---|
144 | </td> |
---|
145 | <!--{* ▲レイアウトここまで *}--> |
---|
146 | |
---|
147 | <!--{* ▼未使用ブロックここから *}--> |
---|
148 | <td> |
---|
149 | <div tid="Unused" class="drop_target" id="t5" style="width: 160px; height: 500px; border: 1px solid #cccccc;"></div> |
---|
150 | <div class="btn"><button type='button' onclick="fnTargetSelf(); fnFormModeSubmit('form1','new_bloc','','');"><span>新規ブロック作成</span></button></div> |
---|
151 | </td> |
---|
152 | <!--{* ▲未使用ブロックここまで *}--> |
---|
153 | </tr> |
---|
154 | </table> |
---|
155 | <div class="btn"> |
---|
156 | <button type='button' name='subm' onclick="fnTargetSelf(); fnFormModeSubmit('form1','confirm','','');"><span>保存</span></button> |
---|
157 | <button type='button' name='preview' onclick="doPreview();"<!--{if $page_id == "0" or $exists_page == "0" }--> DISABLED<!--{/if}-->><span>プレビュー</span></button> |
---|
158 | </div> |
---|
159 | <!--▲レイアウト編集 ここまで--> |
---|
160 | |
---|
161 | |
---|
162 | <!--▼ページ一覧 ここから--> |
---|
163 | <h2>編集可能ページ</h2> |
---|
164 | |
---|
165 | <table class="list center"> |
---|
166 | <!--{foreach item=item from=$arrEditPage}--> |
---|
167 | <tr style="background-color:<!--{if $item.page_id == $page_id}--><!--{$smarty.const.SELECT_RGB}--><!--{else}-->#ffffff<!--{/if}-->;"> |
---|
168 | <td> |
---|
169 | <a href="<!--{$smarty.server.PHP_SELF|escape}-->?page_id=<!--{$item.page_id}-->" ><!--{$item.page_name}--></a> |
---|
170 | </td> |
---|
171 | <td> |
---|
172 | <button type='button' onclick="location.href='./main_edit.php?page_id=<!--{$item.page_id}-->'"><span>メイン編集</span></button> |
---|
173 | </td> |
---|
174 | <td> |
---|
175 | <!--{if $item.edit_flg == 1}--> |
---|
176 | <button type='button' onclick="fnTargetSelf(); fnFormModeSubmit('form1','delete','','');"><span>削除</span></button> |
---|
177 | <!--{/if}--> |
---|
178 | </td> |
---|
179 | </tr> |
---|
180 | <!--{/foreach}--> |
---|
181 | </table> |
---|
182 | <div class="btn"> |
---|
183 | <button type='button' onclick="fnTargetSelf(); fnFormModeSubmit('form1','new_page','','');"><span>新規ページ作成</span></button> |
---|
184 | </div> |
---|
185 | <!--▲ページ一覧 ここまで--> |
---|
186 | |
---|
187 | |
---|
188 | |
---|
189 | <!--{foreach item=item from=$tpl_arrBloc name="bloc_loop"}--> |
---|
190 | <div align="center" target_id="<!--{$item.target_id}-->" did="<!--{$smarty.foreach.bloc_loop.iteration}-->" class="dragged_elm" id="<!--{$item.target_id}-->" |
---|
191 | style="left:350px; top:0px; filter: alpha(opacity=100); opacity: 1; width: 120px;"> |
---|
192 | <!--{$item.name}--> |
---|
193 | </div> |
---|
194 | |
---|
195 | <input type="hidden" name="name_<!--{$smarty.foreach.bloc_loop.iteration}-->" value="<!--{$item.name}-->" /> |
---|
196 | <input type="hidden" name="id_<!--{$smarty.foreach.bloc_loop.iteration}-->" value="<!--{$item.bloc_id}-->" /> |
---|
197 | <input type="hidden" name="target_id_<!--{$smarty.foreach.bloc_loop.iteration}-->" value="<!--{$item.target_id}-->" /> |
---|
198 | <input type="hidden" name="top_<!--{$smarty.foreach.bloc_loop.iteration}-->" value="<!--{$item.bloc_row}-->" /> |
---|
199 | <!--{/foreach}--> |
---|
200 | </form> |
---|