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