fix list dialog

This commit is contained in:
j 2019-01-19 18:07:39 +05:30
parent 76aba5d581
commit 61fff0a8d7

View file

@ -468,7 +468,7 @@ oml.ui.mainMenu = function() {
} else if (id == 'deletefromlibrary') {
oml.ui.deleteItemsDialog().open();
} else if (id == 'editlist') {
oml.ui.listDialog.open();
oml.ui.listDialog().open()
} else if (id == 'deletelist') {
oml.ui.deleteListDialog().open();
} else if (id == 'import') {
@ -940,7 +940,8 @@ oml.ui.mainMenu = function() {
var isLibraries = !ui._list,
isLibrary = Ox.endsWith(ui._list, ':'),
isList = !isLibraries && !isLibrary,
isOwnList = ui._list[0] == ':';
isOwnList = ui._list[0] == ':',
isPublic = ui._list == ':Public';
if (oml.readOnly) {
return {
@ -1004,13 +1005,13 @@ oml.ui.mainMenu = function() {
id: 'editlist',
title: Ox._('Edit List...'),
keyboard: 'return',
disabled: !isList || !isOwnList
disabled: !isList || !isOwnList || isPublic
},
{
id: 'deletelist',
title: Ox._('Delete List...'),
keyboard: 'delete',
disabled: !isList || !isOwnList
disabled: !isList || !isOwnList || isPublic
}
])
};