Commit aa20261d authored by antoor's avatar antoor

更新文件管理双击操作

parent 5c875c95
......@@ -4,6 +4,9 @@
## 2016/03
### /26
1. 文件管理双击:size < 100kb ? 编辑 : 下载
### /24
1. 文件管理双击文件进行编辑 //size < 100kb
......@@ -37,7 +40,6 @@
# 待做事项
* 数据高级搜索功能
* 数据库配置编辑功能
* 数据发包代理功能
* 在线检测/下载/安装更新
* 虚拟终端复制粘贴tab补全
* 插件模块 //实时编写插件执行、UI以及各种操作API设计
......
......@@ -346,14 +346,14 @@ class Files {
bmenu.hide();
});
// 双击::列出数据&&查看/编辑/下载文件(支持查看程序(png|jpg|gif..)则查看
//支持编辑文件(php,js,txt..)则启动编辑器,如果是二进制或压缩等文件(exe,dll,zip,rar..)则下载)
// 双击文件
// :如果size < 100kb,则进行编辑,否则进行下载
grid.attachEvent('onRowDblClicked', (id, lid, event) => {
const fname = grid.getRowAttribute(id, 'fname');
const fsize = grid.getRowAttribute(id, 'fsize');
if (!fname.endsWith('/')) {
// 双击编辑size < 100kb 文件
fsize <= 100 * 1024 ? manager.editFile(fname) : null;
fsize <= 100 * 1024 ? manager.editFile(fname) : manager.downloadFile(fname, fsize);
}else{
self.gotoPath(fname);
}
......
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