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
7244ab55
Commit
7244ab55
authored
May 11, 2016
by
Medicean
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add Edit Conf btn
添加编辑按钮
parent
e9d70bda
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
18 additions
and
5 deletions
+18
-5
index.js
source/modules/database/index.js
+5
-5
index.js
source/modules/database/php/index.js
+13
-0
No files found.
source/modules/database/index.js
View file @
7244ab55
...
@@ -65,8 +65,8 @@ class Database {
...
@@ -65,8 +65,8 @@ class Database {
const
toolbar
=
layout
.
attachToolbar
();
const
toolbar
=
layout
.
attachToolbar
();
toolbar
.
loadStruct
([
toolbar
.
loadStruct
([
{
id
:
'add'
,
text
:
LANG
[
'list'
][
'add'
],
icon
:
'plus-circle'
,
type
:
'button'
},
{
id
:
'add'
,
text
:
LANG
[
'list'
][
'add'
],
icon
:
'plus-circle'
,
type
:
'button'
},
//
{ type: 'separator' },
{
type
:
'separator'
},
// { id: 'edit', text: '编辑'
, icon: 'edit', type: 'button', disabled: true },
{
id
:
'edit'
,
text
:
LANG
[
'list'
][
'edit'
]
,
icon
:
'edit'
,
type
:
'button'
,
disabled
:
true
},
{
type
:
'separator'
},
{
type
:
'separator'
},
{
id
:
'del'
,
text
:
LANG
[
'list'
][
'del'
],
icon
:
'trash-o'
,
type
:
'button'
,
disabled
:
true
}
{
id
:
'del'
,
text
:
LANG
[
'list'
][
'del'
],
icon
:
'trash-o'
,
type
:
'button'
,
disabled
:
true
}
]);
]);
...
@@ -78,9 +78,9 @@ class Database {
...
@@ -78,9 +78,9 @@ class Database {
case
'del'
:
case
'del'
:
this
.
drive
.
delConf
();
this
.
drive
.
delConf
();
break
;
break
;
//
case 'edit':
case
'edit'
:
//
this.drive.editConf();
this
.
drive
.
editConf
();
//
break;
break
;
}
}
});
});
return
{
return
{
...
...
source/modules/database/php/index.js
View file @
7244ab55
...
@@ -87,6 +87,12 @@ class PHP {
...
@@ -87,6 +87,12 @@ class PHP {
action
:
this
.
addConf
.
bind
(
this
)
action
:
this
.
addConf
.
bind
(
this
)
},
{
},
{
divider
:
true
divider
:
true
},
{
text
:
LANG
[
'list'
][
'menu'
][
'edit'
],
icon
:
'fa fa-edit'
,
action
:
this
.
editConf
.
bind
(
this
)
},
{
divider
:
true
},
{
},
{
text
:
LANG
[
'list'
][
'menu'
][
'del'
],
text
:
LANG
[
'list'
][
'menu'
][
'del'
],
icon
:
'fa fa-remove'
,
icon
:
'fa fa-remove'
,
...
@@ -254,6 +260,11 @@ class PHP {
...
@@ -254,6 +260,11 @@ class PHP {
});
});
}
}
// 编辑配置
editConf
(){
}
// 删除配置
// 删除配置
delConf
()
{
delConf
()
{
const
id
=
this
.
tree
.
getSelected
().
split
(
'::'
)[
1
];
const
id
=
this
.
tree
.
getSelected
().
split
(
'::'
)[
1
];
...
@@ -488,11 +499,13 @@ class PHP {
...
@@ -488,11 +499,13 @@ class PHP {
// 禁用toolbar按钮
// 禁用toolbar按钮
disableToolbar
()
{
disableToolbar
()
{
this
.
manager
.
list
.
toolbar
.
disableItem
(
'del'
);
this
.
manager
.
list
.
toolbar
.
disableItem
(
'del'
);
this
.
manager
.
list
.
toolbar
.
disableItem
(
'edit'
);
}
}
// 启用toolbar按钮
// 启用toolbar按钮
enableToolbar
()
{
enableToolbar
()
{
this
.
manager
.
list
.
toolbar
.
enableItem
(
'del'
);
this
.
manager
.
list
.
toolbar
.
enableItem
(
'del'
);
this
.
manager
.
list
.
toolbar
.
enableItem
(
'edit'
);
}
}
// 禁用SQL编辑框
// 禁用SQL编辑框
...
...
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