[22629] | 1 | <!--{* |
---|
| 2 | /* |
---|
| 3 | * This file is part of EC-CUBE |
---|
| 4 | * |
---|
| 5 | * Copyright(c) 2000-2013 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 | |
---|
| 25 | <script type="text/javascript">//<![CDATA[ |
---|
| 26 | $(function() { |
---|
| 27 | |
---|
| 28 | /** |
---|
| 29 | * 「有効/有効にする」チェックボタン押下時 |
---|
| 30 | */ |
---|
| 31 | $('input[id^=plugin_enable]').change(function(event) { |
---|
| 32 | // モード(有効 or 無効) |
---|
| 33 | var mode = event.target.name; |
---|
| 34 | |
---|
| 35 | if(mode === 'disable') { |
---|
| 36 | result = window.confirm('プラグインを無効にしても宜しいですか?'); |
---|
| 37 | if(result === false) { |
---|
| 38 | $(event.target).attr("checked", "checked"); |
---|
| 39 | } |
---|
| 40 | } else if(mode === 'enable') { |
---|
| 41 | result = window.confirm('プラグインを有効にしても宜しいですか?'); |
---|
| 42 | if(result === false) { |
---|
| 43 | $(event.target).attr("checked", ""); |
---|
| 44 | } |
---|
| 45 | } |
---|
| 46 | if(result === true){ |
---|
| 47 | // プラグインID |
---|
| 48 | var plugin_id = event.target.value; |
---|
| 49 | fnModeSubmit(mode, 'plugin_id', plugin_id); |
---|
| 50 | } |
---|
| 51 | }); |
---|
| 52 | |
---|
| 53 | /** |
---|
| 54 | * アップデートリンク押下時の処理. |
---|
| 55 | */ |
---|
| 56 | $('.update_link').click(function(event) { |
---|
| 57 | var plugin_id = event.target.name; |
---|
| 58 | $('div[id="plugin_update_' + plugin_id + '"]').toggle("slow"); |
---|
| 59 | }); |
---|
| 60 | }); |
---|
| 61 | |
---|
| 62 | /** |
---|
| 63 | * アプデートボタン押下時の処理. |
---|
| 64 | * アップデート対象ファイル以外はPOSTされない様にdisabled属性を付与 |
---|
| 65 | */ |
---|
| 66 | function removeUpdateFile(select_id) { |
---|
| 67 | $('input[name="update_plugin_file"]').attr("disabled", "disabled"); |
---|
| 68 | $('input[id="' + select_id + '"]').removeAttr("disabled"); |
---|
| 69 | } |
---|
| 70 | |
---|
| 71 | /** |
---|
| 72 | * インストール |
---|
| 73 | */ |
---|
| 74 | function install() { |
---|
| 75 | if (window.confirm('プラグインをインストールしても宜しいでしょうか?')){ |
---|
| 76 | fnModeSubmit('install','',''); |
---|
| 77 | } |
---|
| 78 | } |
---|
| 79 | |
---|
| 80 | /** |
---|
| 81 | * アンインストール(削除) |
---|
| 82 | */ |
---|
| 83 | function uninstall(plugin_id, plugin_code) { |
---|
| 84 | if (window.confirm('一度削除したデータは元に戻せません。\nプラグインを削除しても宜しいですか?')){ |
---|
| 85 | fnSetFormValue('plugin_id', plugin_id); |
---|
| 86 | fnModeSubmit('uninstall', 'plugin_code', plugin_code); |
---|
| 87 | } |
---|
| 88 | } |
---|
| 89 | |
---|
| 90 | /** |
---|
| 91 | * アップデート処理 |
---|
| 92 | */ |
---|
| 93 | function update(plugin_id, plugin_code) { |
---|
| 94 | if (window.confirm('プラグインをアップデートしても宜しいですか?')){ |
---|
| 95 | removeUpdateFile('update_file_' + plugin_id); |
---|
| 96 | fnSetFormValue('plugin_id', plugin_id); |
---|
| 97 | fnModeSubmit('update','plugin_code', plugin_code); |
---|
| 98 | } |
---|
| 99 | } |
---|
| 100 | |
---|
| 101 | |
---|
| 102 | /** |
---|
| 103 | * 優先度変更. |
---|
| 104 | */ |
---|
| 105 | function update_priority(plugin_id, plugin_code) { |
---|
| 106 | var priority = $("*[name=priority_" + plugin_code +"]").val(); |
---|
| 107 | fnSetFormValue('priority', priority); |
---|
| 108 | fnModeSubmit('priority','plugin_id',plugin_id); |
---|
| 109 | } |
---|
| 110 | |
---|
| 111 | //]]></script> |
---|
| 112 | |
---|
| 113 | <!--<form name="form1" id="form1" method="post" action="?">--> |
---|
| 114 | <form name="form1" method="post" action="?" enctype="multipart/form-data"> |
---|
| 115 | <input type="hidden" name="<!--{$smarty.const.TRANSACTION_ID_NAME}-->" value="<!--{$transactionid}-->" /> |
---|
| 116 | <input type="hidden" name="mode" value="" /> |
---|
| 117 | <input type="hidden" name="plugin_id" value="" /> |
---|
| 118 | <input type="hidden" name="plugin_code" value="" /> |
---|
| 119 | <input type="hidden" name="priority" value="" /> |
---|
| 120 | <div id="system" class="contents-main"> |
---|
| 121 | <h2>プラグイン競合チェック</h2> |
---|
| 122 | |
---|
| 123 | <!--▼プラグイン一覧ここから--> |
---|
| 124 | <h2>フックポイント別プラグイン一覧</h2> |
---|
| 125 | <!--{if count($arrHookPoint) > 0}--> |
---|
| 126 | |
---|
| 127 | <span class="attention"><!--{$arrErr.plugin_error}--></span> |
---|
| 128 | <table class="system-plugin" width="900"> |
---|
| 129 | <col width="10%" /> |
---|
| 130 | <col width="77" /> |
---|
| 131 | <col width="13%" /> |
---|
| 132 | <tr> |
---|
| 133 | <th>フックポイント</th> |
---|
| 134 | <th>優先度</th> |
---|
| 135 | <th>プラグイン名</th> |
---|
| 136 | <th>利用ON/OFF</th> |
---|
| 137 | </tr> |
---|
| 138 | <!--{foreach from=$arrHookPoint item=hookpoint}--> |
---|
| 139 | <!--{foreach from=$hookpoint item=val}--> |
---|
| 140 | |
---|
| 141 | |
---|
| 142 | <tr> |
---|
| 143 | <td><!--{$val.hook_point}--></td> |
---|
| 144 | <td><!--{$val.priority}--></td> |
---|
| 145 | <td><!--{$val.plugin_name}--></td> |
---|
| 146 | <td> |
---|
| 147 | plugin_hookpoint_id:<!--{$val.plugin_id}-->, plugin_id:<!--{$val.plugin_id}--> |
---|
| 148 | use_flg:<!--{$val.use_flg}--><br /> |
---|
| 149 | </td> |
---|
| 150 | </tr> |
---|
| 151 | <!--{/foreach}--> |
---|
| 152 | <!--{/foreach}--> |
---|
| 153 | </table> |
---|
| 154 | <!--{else}--> |
---|
| 155 | <span>登録されているプラグインはありません。</span> |
---|
| 156 | <!--{/if}--> |
---|
| 157 | </div> |
---|
| 158 | </form> |
---|