1 | <!--{* |
---|
2 | /* |
---|
3 | * This file is part of EC-CUBE |
---|
4 | * |
---|
5 | * Copyright(c) 2000-2011 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 | <script type="text/javascript">//<![CDATA[ |
---|
25 | $(function() { |
---|
26 | |
---|
27 | $('input[id^=plugin_enable]').change(function(event) { |
---|
28 | var data = {}; |
---|
29 | // モード(有効 or 無効) |
---|
30 | data.mode = event.target.name; |
---|
31 | |
---|
32 | if(data.mode === 'disable') { |
---|
33 | result = window.confirm('プラグインを無効しても宜しいですか?'); |
---|
34 | } else if(data.mode === 'enable') { |
---|
35 | result = window.confirm('プラグインを有効にしても宜しいですか?'); |
---|
36 | } |
---|
37 | if(result){ |
---|
38 | // プラグインID |
---|
39 | data.plugin_id = event.target.value; |
---|
40 | data['<!--{$smarty.const.TRANSACTION_ID_NAME}-->'] = '<!--{$transactionid}-->'; |
---|
41 | $.ajax({ |
---|
42 | type : 'POST', |
---|
43 | url : location.pathname, |
---|
44 | dataType : "json", |
---|
45 | data: data, |
---|
46 | cache : false, |
---|
47 | error : remoteException, |
---|
48 | success : function(data, dataType) { |
---|
49 | window.location.reload(); |
---|
50 | alert(data.message); |
---|
51 | } |
---|
52 | }); |
---|
53 | } |
---|
54 | }); |
---|
55 | |
---|
56 | /** |
---|
57 | * 通信エラー表示. |
---|
58 | */ |
---|
59 | function remoteException(XMLHttpRequest, textStatus, errorThrown) { |
---|
60 | alert('通信中にエラーが発生しました。'); |
---|
61 | } |
---|
62 | |
---|
63 | $('.update_link').click(function(event) { |
---|
64 | var plugin_id = event.target.name; |
---|
65 | $('div[id="plugin_update_' + plugin_id + '"]').toggle("slow"); |
---|
66 | }); |
---|
67 | }); |
---|
68 | |
---|
69 | |
---|
70 | function removeUpdateFile(select_id) { |
---|
71 | $('input[name="update_plugin_file"]').attr("disabled", "disabled"); |
---|
72 | $('input[id="' + select_id + '"]').removeAttr("disabled"); |
---|
73 | } |
---|
74 | |
---|
75 | function install() { |
---|
76 | if (window.confirm('プラグインをインストールしても宜しいでしょうか?')){ |
---|
77 | fnModeSubmit('install', '', ''); |
---|
78 | } |
---|
79 | } |
---|
80 | |
---|
81 | function uninstall(plugin_id, plugin_code) { |
---|
82 | if (window.confirm('一度削除したデータは元に戻せません。\nプラグインを削除しても宜しいですか?')){ |
---|
83 | fnSetFormValue('plugin_id', plugin_id); |
---|
84 | fnModeSubmit('uninstall', 'plugin_code', plugin_code); |
---|
85 | } |
---|
86 | } |
---|
87 | |
---|
88 | function update(plugin_id, plugin_code) { |
---|
89 | if (window.confirm('プラグインをアップデートしても宜しいですか?')){ |
---|
90 | removeUpdateFile('update_file_' + plugin_id); |
---|
91 | fnSetFormValue('plugin_id', plugin_id); |
---|
92 | fnModeSubmit('update','plugin_code', plugin_code); |
---|
93 | } |
---|
94 | } |
---|
95 | |
---|
96 | function priority(plugin_id) { |
---|
97 | if (window.confirm('プラグインをアップデートしても宜しいですか?')){ |
---|
98 | fnModeSubmit('priority','plugin_id',plugin_id); |
---|
99 | } |
---|
100 | } |
---|
101 | |
---|
102 | |
---|
103 | //]]> |
---|
104 | </script> |
---|
105 | |
---|
106 | <!--<form name="form1" id="form1" method="post" action="?">--> |
---|
107 | <form name="form1" method="post" action="?" enctype="multipart/form-data"> |
---|
108 | <input type="hidden" name="<!--{$smarty.const.TRANSACTION_ID_NAME}-->" value="<!--{$transactionid}-->" /> |
---|
109 | <input type="hidden" name="mode" value="" /> |
---|
110 | <input type="hidden" name="plugin_id" value="" /> |
---|
111 | <input type="hidden" name="plugin_code" value="" /> |
---|
112 | <input type="hidden" name="priority" value="" /> |
---|
113 | <div id="system" class="contents-main"> |
---|
114 | <h2>プラグイン登録</h2> |
---|
115 | <table class="form"> |
---|
116 | <tr> |
---|
117 | <th>プラグイン<span class="attention"> *</span></th> |
---|
118 | <td> |
---|
119 | <!--{assign var=key value="plugin_file"}--> |
---|
120 | <span class="attention"><!--{$arrErr[$key]}--></span> |
---|
121 | <input type="file" name="<!--{ $key }-->" class="box45" size="43" style="<!--{$arrErr[$key]|sfGetErrorColor}--> <!--{if $arrErr[$key]}--> background-color:<!--{$smarty.const.ERR_COLOR|h}--><!--{/if}-->"> |
---|
122 | <a class="btn-action" href="javascript:;" onclick="install(); return false;"><span class="btn-next">インストール</span></a> |
---|
123 | </td> |
---|
124 | </tr> |
---|
125 | </table> |
---|
126 | |
---|
127 | <!--▼プラグイン一覧ここから--> |
---|
128 | <h2>プラグイン一覧</h2> |
---|
129 | <!--{if count($plugins) > 0}--> |
---|
130 | <span class="attention"><!--{$arrErr.plugin_error}--></span> |
---|
131 | <table class="system-plugin" width="900"> |
---|
132 | <col width="10%" /> |
---|
133 | <col width="77" /> |
---|
134 | <col width="13%" /> |
---|
135 | <tr> |
---|
136 | <th colspan="2">機能説明</th> |
---|
137 | <th>優先度</th> |
---|
138 | </tr> |
---|
139 | <!--{section name=data loop=$plugins}--> |
---|
140 | <!--{assign var=plugin value=$plugins[data]}--> |
---|
141 | <tr <!--{if $plugin.enable == $smarty.const.PLUGIN_ENABLE_FALSE}--> style="background:#C9C9C9;" <!--{/if}-->> |
---|
142 | <!--ロゴ--> |
---|
143 | <td class="center plugin_img"> |
---|
144 | <!--{if $plugin.plugin_site_url != '' }--> |
---|
145 | <a href="?" onclick="win03('<!--{$plugin.plugin_site_url|h}-->','plugin_site_url','620','760'); return false;"><img src="<!--{$smarty.const.ROOT_URLPATH}-->plugin/<!--{$plugin.plugin_code}-->/logo.png"width="65" height="65"/></a> |
---|
146 | <!--{else}--> |
---|
147 | <img src="<!--{$smarty.const.ROOT_URLPATH}-->plugin/<!--{$plugin.plugin_code}-->/logo.png"/> |
---|
148 | <!--{/if}--> |
---|
149 | |
---|
150 | </td> |
---|
151 | <!--機能説明--> |
---|
152 | <td class="plugin_info"> |
---|
153 | <!-- プラグイン名 --> |
---|
154 | <!-- ▼plugin_site_urlが設定されている場合はリンクとして表示 --> |
---|
155 | <span class="plugin_name"> |
---|
156 | <!--{if $plugin.plugin_site_url != '' }--> |
---|
157 | <a href="?" onclick="win03('<!--{$plugin.plugin_site_url|h}-->','plugin_site_url','620','760'); return false;"><!--{$plugin.plugin_name|default:$plugin.plugin_code|h}--></a> |
---|
158 | <!--{else}--> |
---|
159 | <sapn><!--{$plugin.plugin_name|default:$plugin.plugin_code|h}--> </sapn> |
---|
160 | <!--{/if}--> |
---|
161 | </span> |
---|
162 | <!-- プラグインバージョン --> |
---|
163 | <!--{if $plugin.plugin_version != ''}--><!--{$plugin.plugin_version|h}--><!--{/if}--> |
---|
164 | <!-- 作者 --> |
---|
165 | <!--{if $plugin.author != ''}--> |
---|
166 | <!-- ▼author_site_urlが設定されている場合はリンクとして表示 --> |
---|
167 | <!--{if $plugin.author_site_url != '' }--> |
---|
168 | <span>(by <a href="?" onclick="win03('<!--{$plugin.author_site_url|h}-->','author_site_url','620','760'); return false;"><!--{$plugin.author|default:'-'|h}--></a>)</span> |
---|
169 | <!--{else}--> |
---|
170 | <span>(by <!--{$plugin.author|default:'-'|h}-->)</span> |
---|
171 | <!--{/if}--> |
---|
172 | <!--{/if}--> |
---|
173 | <br /> |
---|
174 | <!-- 説明 --> |
---|
175 | <p class="description"><!--{$plugin.plugin_description|default:'-'|h}--></p> |
---|
176 | <div> |
---|
177 | <span class="ec_cube_version">対応EC-CUBEバージョン :<!--{$plugin.compliant_version|default:'-'|h}--></span><br/> |
---|
178 | <span class="attention"><!--{$arrErr[$plugin.plugin_code]}--></span> |
---|
179 | <!-- 設定 --> |
---|
180 | <!--{if $plugin.config_flg == true && $plugin.status != $smarty.const.PLUGIN_STATUS_UPLOADED}--> |
---|
181 | <a href="?" onclick="win03('<!--{$smarty.const.ROOT_URLPATH}-->plugin/<!--{$plugin.plugin_code}-->/config.php','plugin_setting','620','760'); return false;">プラグイン設定</a> | |
---|
182 | <!--{else}--> |
---|
183 | <span>プラグイン設定 | </span> |
---|
184 | <!--{/if}--> |
---|
185 | <!-- アップデート --> |
---|
186 | <a class="update_link" href="#" name="<!--{$plugin.plugin_id}-->">アップデート</a> | |
---|
187 | <!-- 削除 --> |
---|
188 | <a href="javascript:;" name="uninstall" onclick="uninstall(<!--{$plugin.plugin_id}-->, '<!--{$plugin.plugin_code}-->'); return false;">削除</a> | |
---|
189 | <!-- 有効/無効 --> |
---|
190 | <!--{if $plugin.enable == $smarty.const.PLUGIN_ENABLE_TRUE}--> |
---|
191 | <input id="plugin_enable" type="checkbox" name="disable" value="<!--{$plugin.plugin_id}-->" id="login_memory" checked="checked">有効</input><br/> |
---|
192 | <!--{else}--> |
---|
193 | <input id="plugin_enable" type="checkbox" name="enable" value="<!--{$plugin.plugin_id}-->" id="login_memory">有効にする</input><br/> |
---|
194 | <!--{/if}--> |
---|
195 | |
---|
196 | <!-- アップデートリンク押下時に表示する. --> |
---|
197 | <div id="plugin_update_<!--{$plugin.plugin_id}-->" style="display: none"> |
---|
198 | <input id="update_file_<!--{$plugin.plugin_id}-->" name="<!--{$plugin.plugin_code}-->" type="file" style="<!--{$arrErr[$key]|sfGetErrorColor}-->" class="box30" size="30" <!--{if $arrErr[$key]}-->style="background-color:<!--{$smarty.const.ERR_COLOR|h}-->"<!--{/if}--> /> |
---|
199 | <a class="btn-action" href="javascript:;" onclick="update(<!--{$plugin.plugin_id}-->, '<!--{$plugin.plugin_code}-->'); return false;"><span class="btn-next">アップデート</span></a> |
---|
200 | </div> |
---|
201 | </div> |
---|
202 | </td> |
---|
203 | <!--優先順位--> |
---|
204 | <!--{assign var=key value="rank"}--> |
---|
205 | <td class="center"> |
---|
206 | <span class="attention"><!--{$arrErr.priority[$plugin.plugin_id]}--></span> |
---|
207 | <input type="text" class="center" name="priority" value="<!--{$plugin.rank|h}-->" size="1" class="rank" /> |
---|
208 | <a class="btn-action" href="javascript:;" onclick="priority(<!--{$plugin.plugin_id}-->);return false;"><span class="btn-next">変更</span></a><br/> |
---|
209 | </td> |
---|
210 | </tr> |
---|
211 | <!--競合アラート--> |
---|
212 | <!--{if $plugin.conflict_message != ""}--> |
---|
213 | <tr> |
---|
214 | <td class="attention_fookpoint" colspan="3"> |
---|
215 | <p class="attention"><!--{$plugin.conflict_message}--></p> |
---|
216 | </td> |
---|
217 | </tr> |
---|
218 | <!--{/if}--> |
---|
219 | <!--{/section}--> |
---|
220 | </table> |
---|
221 | <!--{else}--> |
---|
222 | <span>登録されているプラグインはありません。</span> |
---|
223 | <!--{/if}--> |
---|
224 | </div> |
---|
225 | </form> |
---|