Merge branch 'release/1.0.0' of github.com:ONLYOFFICE/AppServer into bugfix/scrollbar

This commit is contained in:
Viktor Fomin 2021-10-21 12:24:16 +03:00
commit 30f8385466
4 changed files with 13 additions and 9 deletions

View File

@ -109,14 +109,14 @@ export default function withContent(WrappedContent) {
return this.completeAction(e); return this.completeAction(e);
}; };
onClickUpdateItem = (e) => { onClickUpdateItem = (e, open = true) => {
const { fileActionType } = this.props; const { fileActionType } = this.props;
fileActionType === FileAction.Create fileActionType === FileAction.Create
? this.createItem(e) ? this.createItem(e, open)
: this.updateItem(e); : this.updateItem(e);
}; };
createItem = (e) => { createItem = (e, open) => {
const { const {
createFile, createFile,
item, item,
@ -141,7 +141,7 @@ export default function withContent(WrappedContent) {
} }
let tab = let tab =
!isDesktop && item.fileExst !isDesktop && item.fileExst && open
? window.open( ? window.open(
combineUrl( combineUrl(
AppServerConfig.proxyURL, AppServerConfig.proxyURL,
@ -170,10 +170,12 @@ export default function withContent(WrappedContent) {
encryptedFile, encryptedFile,
true, true,
false false
).then(() => openDocEditor(file.id, file.providerKey, tab)); ).then(
() => open && openDocEditor(file.id, file.providerKey, tab)
);
}); });
} }
return openDocEditor(file.id, file.providerKey, tab); return open && openDocEditor(file.id, file.providerKey, tab);
}) })
.then(() => this.completeAction(itemId)) .then(() => this.completeAction(itemId))
.catch((e) => toastr.error(e)) .catch((e) => toastr.error(e))

View File

@ -149,6 +149,7 @@ const EditingWrapperComponent = (props) => {
}; };
const onFocus = (e) => e.target.select(); const onFocus = (e) => e.target.select();
const onBlur = (e) => onClickUpdateItem(e, false);
return ( return (
<EditingWrapper viewAs={viewAs}> <EditingWrapper viewAs={viewAs}>
@ -164,6 +165,7 @@ const EditingWrapperComponent = (props) => {
onKeyUp={onKeyUpUpdateItem} onKeyUp={onKeyUpUpdateItem}
onKeyDown={onEscapeKeyPress} onKeyDown={onEscapeKeyPress}
onFocus={onFocus} onFocus={onFocus}
onBlur={onBlur}
isDisabled={isLoading} isDisabled={isLoading}
data-itemid={itemId} data-itemid={itemId}
withBorder={!isTable} withBorder={!isTable}

View File

@ -92,11 +92,11 @@ const StyledVersionHistoryPanel = styled.div`
${PanelStyles} ${PanelStyles}
.version-history-modal-dialog { .version-history-modal-dialog {
transform: translateX(${(props) => (props.visible ? "0" : "720px")}); transform: translateX(${(props) => (props.visible ? "0" : "720px")});
width: 720px; width: 500px;
} }
.version-history-aside-panel { .version-history-aside-panel {
transform: translateX(${(props) => (props.visible ? "0" : "720px")}); transform: translateX(${(props) => (props.visible ? "0" : "720px")});
width: 720px; width: 500px;
} }
.version-history-panel-header { .version-history-panel-header {
height: 53px; height: 53px;

View File

@ -389,7 +389,7 @@ class UploadDataStore {
this.uploadToFolder = null; this.uploadToFolder = null;
this.percent = 0; this.percent = 0;
} }
if (this.converted) { if (this.uploaded && this.converted) {
this.files = []; this.files = [];
this.filesToConversion = []; this.filesToConversion = [];
} }