Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
A
antSword
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
HuangJunbo
antSword
Commits
03c0a0cd
Commit
03c0a0cd
authored
Jan 18, 2019
by
Medicean
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
(EnhanceMent: FileManager) 编辑文件菜单可选择「标签打开」和「窗口打开」
parent
a26f3603
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
38 additions
and
13 deletions
+38
-13
CHANGELOG.md
CHANGELOG.md
+2
-1
en.js
source/language/en.js
+5
-1
zh.js
source/language/zh.js
+5
-1
files.js
source/modules/filemanager/files.js
+8
-3
index.js
source/modules/filemanager/index.js
+18
-7
No files found.
CHANGELOG.md
View file @
03c0a0cd
...
...
@@ -12,7 +12,7 @@
*
编辑文件窗口将「编码」按钮替换为「用此编码打开」, 若打开文件之后乱码,不妨试试切换编码
*
新增「复制文件名」和「复制文件路径」功能,目标复制文件名或路径到剪贴板
*
修复 windows shell 盘符小写引起目录树错乱的 Bug
*
编辑文件菜单可选择「标签打开」和「窗口打开」
### Other
...
...
@@ -21,6 +21,7 @@
### BugFix
*
修复Linux中编码设置中找到不到路径的问题 (#117) thx @H1d3r
*
修复 Windows shell 盘符小写引起文件管理目录树错乱的 Bug
## 2018/12/25 `(v2.0.3)`
...
...
source/language/en.js
View file @
03c0a0cd
...
...
@@ -306,7 +306,11 @@ module.exports = {
}
},
preview
:
'Preview'
,
edit
:
'Edit'
,
edit
:
{
title
:
'Edit'
,
openwindow
:
'Open in Window'
,
opentab
:
'Open in Tab'
,
},
delete
:
'Delete'
,
rename
:
'Rename'
,
refresh
:
'Refresh'
,
...
...
source/language/zh.js
View file @
03c0a0cd
...
...
@@ -307,7 +307,11 @@ module.exports = {
}
},
preview
:
'预览文件'
,
edit
:
'编辑文件'
,
edit
:
{
title
:
'编辑文件'
,
openwindow
:
'窗口打开'
,
opentab
:
'标签打开'
,
},
delete
:
'删除文件'
,
rename
:
'重命名文件'
,
refresh
:
'刷新目录'
,
...
...
source/modules/filemanager/files.js
View file @
03c0a0cd
...
...
@@ -334,9 +334,14 @@ class Files {
manager
.
previewFile
(
id
,
this
.
getRowAttribute
(
_ids
[
0
],
'fsize'
));
}
},
{
divider
:
true
},
{
text
:
LANG
[
'grid'
][
'contextmenu'
][
'edit'
],
icon
:
'fa fa-edit'
,
disabled
:
/*!isEdited || */
!
id
||
ids
.
length
>
1
||
isFolder
,
action
:
()
=>
{
manager
.
editFile
(
id
);
{
text
:
LANG
[
'grid'
][
'contextmenu'
][
'edit'
][
'title'
],
icon
:
'fa fa-edit'
,
disabled
:
/*!isEdited || */
!
id
||
ids
.
length
>
1
||
isFolder
,
subMenu
:
[
{
text
:
LANG
[
'grid'
][
'contextmenu'
][
'edit'
][
'opentab'
],
icon
:
'fa fa-external-link'
,
action
:
()
=>
{
manager
.
editFile
(
id
,
true
);
}
},
{
text
:
LANG
[
'grid'
][
'contextmenu'
][
'edit'
][
'openwindow'
],
icon
:
'fa fa-arrows-alt'
,
action
:
()
=>
{
manager
.
editFile
(
id
,
false
);
}
},
]
},
{
text
:
LANG
[
'grid'
][
'contextmenu'
][
'delete'
],
icon
:
'fa fa-trash-o'
,
disabled
:
!
id
,
action
:
()
=>
{
manager
.
deleteFile
(
ids
);
}
},
...
...
source/modules/filemanager/index.js
View file @
03c0a0cd
...
...
@@ -798,17 +798,28 @@ class FileManager {
}
// 编辑文件
editFile(name) {
editFile(name
, openfileintab=false
) {
let self = this;
let path = this.path + name;
let editor = null;
let codes = '';
// 创建窗口
let win = this.createWin({
let win;
if (openfileintab == false){
win = this.createWin({
title: LANG['
editor
']['
title
'](path),
width: 800
});
win.maximize();
}else{
let _id = String(Math.random()).substr(5, 10);
antSword['
tabbar
'].addTab(
`tab_file_${_id}`,
`<i class="fa fa-file-o"></i> ${name}`,
null, null, true, true
);
win = antSword['
tabbar
'].cells(`tab_file_${_id}`);
}
win.progressOn();
// 检测文件后缀
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment