Merge branch 'hotfix/v0.0.4' of https://github.com/ONLYOFFICE/CommunityServer-AspNetCore into hotfix/v0.0.4
This commit is contained in:
commit
10094f459d
@ -266,11 +266,15 @@ class SectionBodyContent extends React.Component {
|
||||
}
|
||||
|
||||
onOpenLocation = () => {
|
||||
const item = this.props.selection[0];
|
||||
const { folderId, checked } = this.props.selection[0];
|
||||
const { filter, selection } = this.props;
|
||||
const { folderId, checked, id, isFolder } = selection[0];
|
||||
const item = selection[0];
|
||||
const locationId = isFolder ? id : folderId;
|
||||
const locationFilter = isFolder ? filter : null;
|
||||
|
||||
return this.props
|
||||
.fetchFiles(folderId)
|
||||
.then(() => this.onContentRowSelect(!checked, item));
|
||||
.fetchFiles(locationId, locationFilter)
|
||||
.then(() => (isFolder ? null : this.onContentRowSelect(!checked, item)));
|
||||
};
|
||||
|
||||
onClickFavorite = (e) => {
|
||||
@ -638,6 +642,14 @@ class SectionBodyContent extends React.Component {
|
||||
|
||||
return options.map((option) => {
|
||||
switch (option) {
|
||||
case "open":
|
||||
return {
|
||||
key: option,
|
||||
label: t("Open"),
|
||||
icon: "CatalogFolderIcon",
|
||||
onClick: this.onOpenLocation,
|
||||
disabled: false,
|
||||
};
|
||||
case "show-version-history":
|
||||
return {
|
||||
key: option,
|
||||
@ -660,6 +672,7 @@ class SectionBodyContent extends React.Component {
|
||||
case "separator0":
|
||||
case "separator1":
|
||||
case "separator2":
|
||||
case "separator3":
|
||||
return { key: option, isSeparator: true };
|
||||
case "open-location":
|
||||
return {
|
||||
|
@ -13,6 +13,7 @@
|
||||
"MarkedAsFavorite": "Added to favorites",
|
||||
"RemoveFromFavorites": "Remove from favorites",
|
||||
"RemovedFromFavorites": "Removed from favorites",
|
||||
"Open": "Open",
|
||||
"Edit": "Edit",
|
||||
"Preview": "Preview",
|
||||
"View": "View",
|
||||
|
@ -13,6 +13,7 @@
|
||||
"MarkedAsFavorite": "Добавлено в избранное",
|
||||
"RemoveFromFavorites": "Удалить из избранного",
|
||||
"RemovedFromFavorites": "Удалено из избранного",
|
||||
"Open": "Открыть",
|
||||
"Edit": "Редактировать",
|
||||
"Preview": "Просмотр",
|
||||
"View": "Просмотр",
|
||||
|
@ -663,29 +663,34 @@ const getFilesContextOptions = (
|
||||
options.push("download");
|
||||
options.push("download-as");
|
||||
options.push("restore");
|
||||
options.push("separator2");
|
||||
options.push("separator0");
|
||||
options.push("delete");
|
||||
} else {
|
||||
if (!isFile) {
|
||||
options.push("open");
|
||||
options.push("separator0");
|
||||
}
|
||||
|
||||
if (!(isRecent || isFavorites || isVisitor)) {
|
||||
options.push("sharing-settings");
|
||||
}
|
||||
|
||||
if (isFile) {
|
||||
if (isFile && !isVisitor) {
|
||||
options.push("send-by-email");
|
||||
}
|
||||
|
||||
options.push("link-for-portal-users");
|
||||
|
||||
if (!isVisitor) {
|
||||
options.push("separator0");
|
||||
options.push("separator1");
|
||||
}
|
||||
|
||||
if (isFile) {
|
||||
options.push("show-version-history");
|
||||
if (!isVisitor) {
|
||||
options.push("show-version-history");
|
||||
options.push("finalize-version");
|
||||
options.push("block-unblock-version");
|
||||
options.push("separator1");
|
||||
options.push("separator2");
|
||||
|
||||
if (isRecent) {
|
||||
options.push("open-location");
|
||||
@ -693,6 +698,8 @@ const getFilesContextOptions = (
|
||||
if (!isFavorite) {
|
||||
options.push("mark-as-favorite");
|
||||
}
|
||||
} else {
|
||||
options.push("separator3");
|
||||
}
|
||||
|
||||
if (canOpenPlayer) {
|
||||
@ -715,6 +722,8 @@ const getFilesContextOptions = (
|
||||
|
||||
options.push("rename");
|
||||
options.push("delete");
|
||||
} else {
|
||||
options.push("copy");
|
||||
}
|
||||
}
|
||||
if (isFavorite && !isRecycleBin) {
|
||||
|
Loading…
Reference in New Issue
Block a user