add files to current list if it is editable

This commit is contained in:
j 2020-05-15 20:47:09 +02:00
parent 71a0a82aee
commit 545e1ba57d

View file

@ -425,6 +425,13 @@ pandora.uploadDroppedFiles = function(files) {
Ox.Request.clearCache('findDocuments'); Ox.Request.clearCache('findDocuments');
if (pandora.user.ui.document || pandora.user.ui.section != 'documents') { if (pandora.user.ui.document || pandora.user.ui.section != 'documents') {
pandora.UI.set({section: 'documents', document: ''}); pandora.UI.set({section: 'documents', document: ''});
} else if (pandora.user.ui._collection && pandora.getListData().editable) {
pandora.api.addCollectionItems({
items: files.ids,
collection: pandora.user.ui._collection
}, function(results) {
pandora.$ui.list && pandora.$ui.list.reloadList();
})
} else { } else {
pandora.$ui.list && pandora.$ui.list.reloadList(); pandora.$ui.list && pandora.$ui.list.reloadList();
} }