📄 file_list.ftl
字号:
<#macro file_list width="98%" cellspacing="0" cellpadding="0" bgcolor="#eee" border="0" type=1 align="center">
<#if type==1>
<input type="hidden" id="path" name="path" value="${path!}" />
<table width="${width}" border="${border}" align="${align}" cellpadding="${cellpadding}" cellspacing="${cellspacing}" bgcolor="${bgcolor}">
<thead>
<tr>
<th>名 称 </th>
<th>大 小</th>
<th>类 型</th>
<th>修改日期</th>
<th>操 作</th>
</tr>
</thead>
<tbody id="list-body">
<#list list as file>
<tr onMouseOver="this.style.backgroundColor='#F5F5F5'" onMouseOut="this.style.backgroundColor=''" bgColor="#ffffff" id="tr${file_index+1}" oncontextmenu="self.event.returnValue=false">
<td height="25">
<span style="cursor:pointer;" id="span${file_index+1}"<#if file.directory> ondblclick="window.location='${base}/admin/cms/res/Com_list.do?path=${path!}${file.name}/'"</#if>>
<img src="${base}/cms_res/img/${file.ico}"/>
<input name="${file.name}" id="${file_index+1}" type="text" value="${file.name}" onchange="if(!this.readOnly){rename('${file_index+1}','old${file_index+1}');}" onkeypress="if(event.keyCode==13){rename('${file_index+1}','old${file_index+1}');}" readOnly="true" class="input_1" size="35">
<input name="old${file.name}" id="old${file_index+1}" type="hidden" value="${file.name}" class="input_1"></span></td>
<td align="center">${file.size} KB</td>
<td align="center">${file.type?upper_case}</td>
<td align="center">${file.lastModified}</td>
<td align="center"><a id="rename${file.name}" href="javascript:renamefile('${file_index+1}');">重命名</a> | <a id="${file.name}href" href="javascript:deletefile('${file_index+1}');" onclick="return confirm('你确定要删除吗')">删除</a></td>
</tr>
</#list>
</tbody>
</table>
<#else>
<table id="list">
<#list list as list>
<div class="item">
<a ondblclick="window.location='${base}/admin/cms/res/Com_list.do?path=${path!}${list.name}/'">
<img src="${base}/cms_res/img/${list.ico}"/>
<input name="${list.name}" id="${list_index+1}" type="text" value="${list.name}" onchange="rename('${list_index+1}','old${list_index+1}')" readonly="true" class="input_1" size="8">
</a><input name="old${list.name}" id="old${list_index+1}" type="hidden" value="${list.name}" class="input_1"></div>
<div class="item-msg" style="cursor:hand;"><a onclick="renamefile('${list_index+1}')">重命名</a></div>
<div class="item-msg"><a href="${base}/admin/cms/res/Com_delete.do?id=${list.id!}" onclick="return confirm('你确定要删除吗')">删除</a>
</div>
</#list>
</table>
<input type="hidden" id="path" name="path" value="${path!}" />
</#if>
</#macro>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -