Commit 3acc7441 authored by Y.H's avatar Y.H

Add the executable style in the file management module

增加文件管理模块中可执行文件的样式
parent 5a078ba6
// //
// 文件管理 模块 // 文件管理 模块
// //
const LANG_T = antSword['language']['toastr']; const LANG_T = antSword['language']['toastr'];
const LANG = antSword['language']['filemanager']['files']; const LANG = antSword['language']['filemanager']['files'];
...@@ -189,7 +189,7 @@ class Files { ...@@ -189,7 +189,7 @@ class Files {
${LANG['grid']['header']['size']}, ${LANG['grid']['header']['size']},
${LANG['grid']['header']['attr']} ${LANG['grid']['header']['attr']}
`); `);
grid.setColTypes("ro,ro,ro,ro,ro"); grid.setColTypes("ro,ro,ro,ro,ro");
grid.setColSorting('str,str,str,str,str'); grid.setColSorting('str,str,str,str,str');
grid.setInitWidths("40,*,150,100,100"); grid.setInitWidths("40,*,150,100,100");
grid.setColAlign("center,left,left,right,center"); grid.setColAlign("center,left,left,right,center");
...@@ -413,6 +413,8 @@ class Files { ...@@ -413,6 +413,8 @@ class Files {
id: _id, id: _id,
fname: file['name'], fname: file['name'],
fsize: parseInt(file['size']), fsize: parseInt(file['size']),
// 如果是可执行文件(exe、dll..),则设置为红色字体
style: /.exe$|.dll$|.bat$|.sh$|.com$/.test(file['name']) ? 'color:red' : '',
data: [ data: [
self.fileIcon(file['name']), self.fileIcon(file['name']),
antSword.noxss(file['name'].replace(/\/$/, '')), antSword.noxss(file['name'].replace(/\/$/, '')),
...@@ -484,4 +486,4 @@ class Files { ...@@ -484,4 +486,4 @@ class Files {
} }
export default Files; export default Files;
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment