Commit 7244ab55 authored by Medicean's avatar Medicean

Add Edit Conf btn

添加编辑按钮
parent e9d70bda
......@@ -65,8 +65,8 @@ class Database {
const toolbar = layout.attachToolbar();
toolbar.loadStruct([
{ id: 'add', text: LANG['list']['add'], icon: 'plus-circle', type: 'button' },
// { type: 'separator' },
// { id: 'edit', text: '编辑', icon: 'edit', type: 'button', disabled: true },
{ type: 'separator' },
{ id: 'edit', text: LANG['list']['edit'], icon: 'edit', type: 'button', disabled: true },
{ type: 'separator' },
{ id: 'del', text: LANG['list']['del'], icon: 'trash-o', type: 'button', disabled: true }
]);
......@@ -78,9 +78,9 @@ class Database {
case 'del':
this.drive.delConf();
break;
// case 'edit':
// this.drive.editConf();
// break;
case 'edit':
this.drive.editConf();
break;
}
});
return {
......
......@@ -87,6 +87,12 @@ class PHP {
action: this.addConf.bind(this)
}, {
divider: true
}, {
text: LANG['list']['menu']['edit'],
icon: 'fa fa-edit',
action: this.editConf.bind(this)
}, {
divider: true
}, {
text: LANG['list']['menu']['del'],
icon: 'fa fa-remove',
......@@ -254,6 +260,11 @@ class PHP {
});
}
// 编辑配置
editConf(){
}
// 删除配置
delConf() {
const id = this.tree.getSelected().split('::')[1];
......@@ -488,11 +499,13 @@ class PHP {
// 禁用toolbar按钮
disableToolbar() {
this.manager.list.toolbar.disableItem('del');
this.manager.list.toolbar.disableItem('edit');
}
// 启用toolbar按钮
enableToolbar() {
this.manager.list.toolbar.enableItem('del');
this.manager.list.toolbar.enableItem('edit');
}
// 禁用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