source: branches/version-2_13-dev/data/Smarty/templates/admin/contents/file_manager.tpl @ 23066

Revision 23066, 8.2 KB checked in by pineray, 11 years ago (diff)

#2342 JavaScript?のグローバルな宣言を減らす
eccubeオブジェクト内の階層を減らす.

  • Property svn:eol-style set to LF
  • Property svn:keywords set to Id
  • Property svn:mime-type set to text/x-smarty-template; charset=UTF-8
Line 
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        var bread_crumbs = <!--{$tpl_now_dir}-->;
28        var file_path = '<!--{$tpl_file_path}-->';
29        var $delimiter = '<span>&nbsp;&gt;&nbsp;</span>';
30        var $node = $('h2');
31        var total = bread_crumbs.length;
32        for (var i in bread_crumbs) {
33            file_path += bread_crumbs[i] + '/';
34            $('<a href="javascript:;" onclick="fnFolderOpen(\'' + file_path + '\'); return false;" />')
35                .text(bread_crumbs[i])
36                .appendTo($node);
37            if (i < total - 1) $node.append($delimiter);
38        }
39    });
40
41    var IMG_FOLDER_CLOSE   = "<!--{$TPL_URLPATH}-->img/contents/folder_close.gif";  // フォルダクローズ時画像
42    var IMG_FOLDER_OPEN    = "<!--{$TPL_URLPATH}-->img/contents/folder_open.gif";   // フォルダオープン時画像
43    var IMG_PLUS           = "<!--{$TPL_URLPATH}-->img/contents/plus.gif";          // プラスライン
44    var IMG_MINUS          = "<!--{$TPL_URLPATH}-->img/contents/minus.gif";         // マイナスライン
45    var IMG_NORMAL         = "<!--{$TPL_URLPATH}-->img/contents/space.gif";         // スペース
46//]]></script>
47<form name="form1" method="post" action="?"  enctype="multipart/form-data">
48    <input type="hidden" name="<!--{$smarty.const.TRANSACTION_ID_NAME}-->" value="<!--{$transactionid}-->" />
49    <input type="hidden" name="mode" value="" />
50    <input type="hidden" name="now_file" value="<!--{$tpl_now_dir|h}-->" />
51    <input type="hidden" name="now_dir" value="<!--{$tpl_now_file|h}-->" />
52    <input type="hidden" name="tree_select_file" value="" />
53    <input type="hidden" name="tree_status" value="" />
54    <input type="hidden" name="select_file" value="" />
55    <div id="admin-contents" class="contents-main">
56        <div id="contents-filemanager-tree">
57            <div id="tree"></div>
58        </div>
59        <div id="contents-filemanager-right">
60            <table class="now_dir">
61                <tr>
62                    <th>ファイルのアップロード</th>
63                    <td>
64                        <!--{if $arrErr.upload_file}--><span class="attention"><!--{$arrErr.upload_file}--></span><!--{/if}-->
65                        <input type="file" name="upload_file" size="40" <!--{if $arrErr.upload_file}-->style="background-color:<!--{$smarty.const.ERR_COLOR|h}-->"<!--{/if}--> /><a class="btn-normal" href="javascript:;" onclick="setTreeStatus('tree_status');eccube.setModeAndSubmit('upload','',''); return false;">アップロード</a>
66                    </td>
67                </tr>
68                <tr>
69                    <th>フォルダ作成</th>
70                    <td>
71                        <!--{if $arrErr.create_file}--><span class="attention"><!--{$arrErr.create_file}--></span><!--{/if}-->
72                        <input type="text" name="create_file" value="" style="width:336px;<!--{if $arrErr.create_file}--> background-color:<!--{$smarty.const.ERR_COLOR|h}--><!--{/if}-->" /><a class="btn-normal" href="javascript:;" onclick="setTreeStatus('tree_status');eccube.setModeAndSubmit('create','',''); return false;">作成</a>
73                    </td>
74                </tr>
75            </table>
76            <h2><!--{* jQuery で挿入される *}--></h2>
77            <table class="list">
78                <tr>
79                    <th>ファイル名</th>
80                    <th>サイズ</th>
81                    <th>更新日付</th>
82                    <th class="edit">表示</th>
83                    <th>ダウンロード</th>
84                    <th class="delete">削除</th>
85                </tr>
86                <!--{if !$tpl_is_top_dir}-->
87                    <tr id="parent_dir" onclick="eccube.setValue('select_file', '<!--{$tpl_parent_dir|h}-->', 'form1');fnSelectFile('parent_dir', '#808080');" onDblClick="setTreeStatus('tree_status');fnDbClick(arrTree, '<!--{$tpl_parent_dir|h}-->', true, '<!--{$tpl_now_dir|h}-->', true)" style="">
88                        <td>
89                            <img src="<!--{$TPL_URLPATH}-->img/contents/folder_parent.gif" alt="フォルダ">&nbsp;..
90                        </td>
91                        <td>&nbsp;</td>
92                        <td>&nbsp;</td>
93                        <td>&nbsp;</td>
94                        <td>&nbsp;</td>
95                        <td>&nbsp;</td>
96                    </tr>
97                <!--{/if}-->
98                <!--{section name=cnt loop=$arrFileList}-->
99                    <!--{assign var="id" value="select_file`$smarty.section.cnt.index`"}-->
100                    <tr id="<!--{$id}-->" style="">
101                        <td class="file-name" onDblClick="setTreeStatus('tree_status');fnDbClick(arrTree, '<!--{$arrFileList[cnt].file_path|h}-->', <!--{if $arrFileList[cnt].is_dir|h}-->true<!--{else}-->false<!--{/if}-->, '<!--{$tpl_now_dir|h}-->', false)">
102                            <!--{if $arrFileList[cnt].is_dir}-->
103                                <img src="<!--{$TPL_URLPATH}-->img/contents/folder_close.gif" alt="フォルダ" />
104                            <!--{else}-->
105                                <img src="<!--{$TPL_URLPATH}-->img/contents/file.gif" />
106                            <!--{/if}-->
107                            <!--{$arrFileList[cnt].file_name|h}-->
108                        </td>
109                        <td class="right">
110                            <!--{$arrFileList[cnt].file_size|number_format}-->
111                        </td>
112                        <td class="center">
113                            <!--{$arrFileList[cnt].file_time|h}-->
114                        </td>
115                        <!--{if $arrFileList[cnt].is_dir}-->
116                            <td class="center">
117                                <a href="javascript:;" onclick="eccube.setValue('tree_select_file', '<!--{$arrFileList[cnt].file_path}-->', 'form1');fnSelectFile('<!--{$id}-->', '#808080');eccube.setModeAndSubmit('move','',''); return false;">表示</a>
118                            </td>
119                        <!--{else}-->
120                            <td class="center">
121                                <a href="javascript:;" onclick="eccube.setValue('select_file', '<!--{$arrFileList[cnt].file_path|h}-->', 'form1');fnSelectFile('<!--{$id}-->', '#808080');eccube.setModeAndSubmit('view','',''); return false;">表示</a>
122                            </td>
123                        <!--{/if}-->
124                        <!--{if $arrFileList[cnt].is_dir}-->
125                            <!--{* ディレクトリはダウンロード不可 *}-->
126                            <td class="center">-</td>
127                        <!--{else}-->
128                            <td class="center">
129                                <a href="javascript:;" onclick="eccube.setValue('select_file', '<!--{$arrFileList[cnt].file_path|h}-->', 'form1');fnSelectFile('<!--{$id}-->', '#808080');setTreeStatus('tree_status');eccube.setModeAndSubmit('download','',''); return false;">ダウンロード</a>
130                            </td>
131                        <!--{/if}-->
132                        <td class="center">
133                            <a href="javascript:;" onclick="eccube.setValue('select_file', '<!--{$arrFileList[cnt].file_path|h}-->', 'form1');fnSelectFile('<!--{$id}-->', '#808080');setTreeStatus('tree_status');eccube.setModeAndSubmit('delete','',''); return false;">削除</a>
134                        </td>
135                    </tr>
136                <!--{/section}-->
137            </table>
138        </div>
139    </div>
140</form>
Note: See TracBrowser for help on using the repository browser.