Merge pull request #1353 from ONLYOFFICE/feature/bug-fixes
Feature/bug fixes
This commit is contained in:
commit
02f141629b
|
@ -111,6 +111,8 @@ class ContextMenuController extends Component {
|
||||||
});
|
});
|
||||||
|
|
||||||
if ( this.state.items.length > 0 ) {
|
if ( this.state.items.length > 0 ) {
|
||||||
|
const api = Common.EditorApi.get();
|
||||||
|
|
||||||
this.$targetEl.css({left: `${x}px`, top: `${y}px`});
|
this.$targetEl.css({left: `${x}px`, top: `${y}px`});
|
||||||
const popover = f7.popover.open(idContextMenuElement, idCntextMenuTargetElement);
|
const popover = f7.popover.open(idContextMenuElement, idCntextMenuTargetElement);
|
||||||
|
|
||||||
|
@ -120,6 +122,8 @@ class ContextMenuController extends Component {
|
||||||
this.setState(state => {
|
this.setState(state => {
|
||||||
return {opened: true}
|
return {opened: true}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
api.asc_enableKeyEvents(true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,11 +1,13 @@
|
||||||
import React from 'react';
|
import React from 'react';
|
||||||
// import { observer } from "mobx-react";
|
import { observer, inject } from "mobx-react";
|
||||||
import { Page, Navbar, List, ListItem, BlockTitle, Icon } from "framework7-react";
|
import { Page, Navbar, List, ListItem, BlockTitle, Icon } from "framework7-react";
|
||||||
import { useTranslation } from "react-i18next";
|
import { useTranslation } from "react-i18next";
|
||||||
|
|
||||||
const Download = props => {
|
const Download = props => {
|
||||||
const { t } = useTranslation();
|
const { t } = useTranslation();
|
||||||
const _t = t("Settings", { returnObjects: true });
|
const _t = t("Settings", { returnObjects: true });
|
||||||
|
const storeDocumentInfo = props.storeDocumentInfo;
|
||||||
|
const dataDoc = storeDocumentInfo.dataDoc;
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Page>
|
<Page>
|
||||||
|
@ -18,30 +20,33 @@ const Download = props => {
|
||||||
<ListItem title="PDF" onClick={() => props.onSaveFormat(Asc.c_oAscFileType.PDF)}>
|
<ListItem title="PDF" onClick={() => props.onSaveFormat(Asc.c_oAscFileType.PDF)}>
|
||||||
<Icon slot="media" icon="icon-format-pdf"></Icon>
|
<Icon slot="media" icon="icon-format-pdf"></Icon>
|
||||||
</ListItem>
|
</ListItem>
|
||||||
<ListItem title="PDF/A" onClick={() => props.onSaveFormat(Asc.c_oAscFileType.PDFA)}>
|
{dataDoc.fileType !== 'oform' ? [
|
||||||
<Icon slot="media" icon="icon-format-pdfa"></Icon>
|
<ListItem title="PDF/A" key="PDF/A" onClick={() => props.onSaveFormat(Asc.c_oAscFileType.PDFA)}>
|
||||||
</ListItem>
|
<Icon slot="media" icon="icon-format-pdfa"></Icon>
|
||||||
<ListItem title="TXT" onClick={() => props.onSaveFormat(Asc.c_oAscFileType.TXT)}>
|
</ListItem>,
|
||||||
<Icon slot="media" icon="icon-format-txt"></Icon>
|
<ListItem title="TXT" key="TXT" onClick={() => props.onSaveFormat(Asc.c_oAscFileType.TXT)}>
|
||||||
</ListItem>
|
<Icon slot="media" icon="icon-format-txt"></Icon>
|
||||||
<ListItem title="RTF" onClick={() => props.onSaveFormat(Asc.c_oAscFileType.RTF)}>
|
</ListItem>,
|
||||||
<Icon slot="media" icon="icon-format-rtf"></Icon>
|
<ListItem title="RTF" key="RTF" onClick={() => props.onSaveFormat(Asc.c_oAscFileType.RTF)}>
|
||||||
</ListItem>
|
<Icon slot="media" icon="icon-format-rtf"></Icon>
|
||||||
<ListItem title="ODT" onClick={() => props.onSaveFormat(Asc.c_oAscFileType.ODT)}>
|
</ListItem>,
|
||||||
<Icon slot="media" icon="icon-format-odt"></Icon>
|
<ListItem title="ODT" key="ODT" onClick={() => props.onSaveFormat(Asc.c_oAscFileType.ODT)}>
|
||||||
</ListItem>
|
<Icon slot="media" icon="icon-format-odt"></Icon>
|
||||||
<ListItem title="HTML" onClick={() => props.onSaveFormat(Asc.c_oAscFileType.HTML)}>
|
</ListItem>,
|
||||||
<Icon slot="media" icon="icon-format-html"></Icon>
|
<ListItem title="HTML" key="HTML" onClick={() => props.onSaveFormat(Asc.c_oAscFileType.HTML)}>
|
||||||
</ListItem>
|
<Icon slot="media" icon="icon-format-html"></Icon>
|
||||||
<ListItem title="DOTX" onClick={() => props.onSaveFormat(Asc.c_oAscFileType.DOTX)}>
|
</ListItem>,
|
||||||
<Icon slot="media" icon="icon-format-dotx"></Icon>
|
<ListItem title="DOTX" key="DOTX" onClick={() => props.onSaveFormat(Asc.c_oAscFileType.DOTX)}>
|
||||||
</ListItem>
|
<Icon slot="media" icon="icon-format-dotx"></Icon>
|
||||||
<ListItem title="OTT" onClick={() => props.onSaveFormat(Asc.c_oAscFileType.OTT)}>
|
</ListItem>,
|
||||||
<Icon slot="media" icon="icon-format-ott"></Icon>
|
<ListItem title="OTT" key="OTT" onClick={() => props.onSaveFormat(Asc.c_oAscFileType.OTT)}>
|
||||||
</ListItem>
|
<Icon slot="media" icon="icon-format-ott"></Icon>
|
||||||
|
</ListItem>
|
||||||
|
]
|
||||||
|
: null}
|
||||||
</List>
|
</List>
|
||||||
</Page>
|
</Page>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
export default Download;
|
export default inject('storeDocumentInfo')(observer(Download));
|
Loading…
Reference in a new issue