allow batch editing one document

This commit is contained in:
j 2023-06-22 14:35:35 +05:30
parent f664927b5f
commit 3c73ef8999

View file

@ -729,11 +729,11 @@ pandora.uploadDroppedFiles = function(files) {
pandora.enableBatchEdit = function(section) {
var ui = pandora.user.ui;
if (section == 'documents') {
return !ui.document && ui.collectionSelection.length > 1 && ui.collectionSelection.some(function(item) {
return !ui.document && ui.collectionSelection.length > 0 && ui.collectionSelection.some(function(item) {
return pandora.$ui.list && pandora.$ui.list.value(item, 'editable');
})
} else {
return !ui.item && ui.listSelection.length > 1 && ui.listSelection.some(function(item) {
return !ui.item && ui.listSelection.length > 0 && ui.listSelection.some(function(item) {
return pandora.$ui.list && pandora.$ui.list.value(item, 'editable');
})
}