Commit 7244ab55 authored by Medicean's avatar Medicean

Add Edit Conf btn

添加编辑按钮
parent e9d70bda
...@@ -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 {
......
...@@ -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编辑框
......
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