Merge pull request #1920 from ONLYOFFICE/feature/fix-bugs
Feature/fix bugs
This commit is contained in:
commit
694d83bc64
|
@ -265,12 +265,13 @@ class ContextMenu extends ContextMenuController {
|
|||
} else {
|
||||
const { t } = this.props;
|
||||
const _t = t("ContextMenu", {returnObjects: true});
|
||||
const { canViewComments, canCoAuthoring, canComments } = this.props;
|
||||
const { canViewComments, canCoAuthoring, canComments, dataDoc } = this.props;
|
||||
|
||||
const api = Common.EditorApi.get();
|
||||
const inToc = api.asc_GetTableOfContentsPr(true);
|
||||
const stack = api.getSelectedElements();
|
||||
const canCopy = api.can_CopyCut();
|
||||
const docExt = dataDoc ? dataDoc.fileType : '';
|
||||
|
||||
let isText = false,
|
||||
isObject = false,
|
||||
|
@ -306,14 +307,14 @@ class ContextMenu extends ContextMenuController {
|
|||
}
|
||||
|
||||
if (!isDisconnected) {
|
||||
if (canFillForms && canCopy && !locked && !isViewer) {
|
||||
if (canFillForms && canCopy && !locked && (!isViewer || docExt === 'oform')) {
|
||||
itemsIcon.push({
|
||||
event: 'cut',
|
||||
icon: 'icon-cut'
|
||||
});
|
||||
}
|
||||
|
||||
if (canFillForms && canCopy && !locked && !isViewer) {
|
||||
if (canFillForms && canCopy && !locked && (!isViewer || docExt === 'oform')) {
|
||||
itemsIcon.push({
|
||||
event: 'paste',
|
||||
icon: 'icon-paste'
|
||||
|
|
|
@ -257,6 +257,14 @@ class MainController extends Component {
|
|||
appSettings.changeShowTableEmptyLine(value);
|
||||
this.api.put_ShowTableEmptyLine(value);
|
||||
|
||||
value = LocalStorage.getBool('mobile-view', true);
|
||||
|
||||
if(value) {
|
||||
this.api.ChangeReaderMode();
|
||||
} else {
|
||||
appOptions.changeMobileView();
|
||||
}
|
||||
|
||||
if (appOptions.isEdit && this.needToUpdateVersion) {
|
||||
Common.Notifications.trigger('api:disconnect');
|
||||
}
|
||||
|
@ -273,7 +281,6 @@ class MainController extends Component {
|
|||
this.api.Resize();
|
||||
this.api.zoomFitToWidth();
|
||||
this.api.asc_GetDefaultTableStyles && setTimeout(() => {this.api.asc_GetDefaultTableStyles()}, 1);
|
||||
this.api.ChangeReaderMode();
|
||||
this.applyLicense();
|
||||
|
||||
Common.Notifications.trigger('document:ready');
|
||||
|
|
|
@ -4,6 +4,7 @@ import { f7 } from 'framework7-react';
|
|||
import { useTranslation } from 'react-i18next';
|
||||
import ToolbarView from "../view/Toolbar";
|
||||
import {storeAppOptions} from "../store/appOptions";
|
||||
import {LocalStorage} from "../../../../common/mobile/utils/LocalStorage";
|
||||
|
||||
const ToolbarController = inject('storeAppOptions', 'users', 'storeReview', 'storeFocusObjects', 'storeToolbarSettings','storeDocumentInfo')(observer(props => {
|
||||
const {t} = useTranslation();
|
||||
|
@ -145,7 +146,9 @@ const ToolbarController = inject('storeAppOptions', 'users', 'storeReview', 'sto
|
|||
|
||||
const changeMobileView = () => {
|
||||
const api = Common.EditorApi.get();
|
||||
const isMobileView = appOptions.isMobileView;
|
||||
|
||||
LocalStorage.setBool('mobile-view', !isMobileView);
|
||||
appOptions.changeMobileView();
|
||||
api.ChangeReaderMode();
|
||||
}
|
||||
|
|
|
@ -5,6 +5,7 @@ import { observer, inject } from "mobx-react";
|
|||
import {Device} from '../../../../../common/mobile/utils/device';
|
||||
|
||||
import SettingsView from "../../view/settings/Settings";
|
||||
import {LocalStorage} from "../../../../../common/mobile/utils/LocalStorage";
|
||||
|
||||
const Settings = props => {
|
||||
useEffect(() => {
|
||||
|
@ -84,7 +85,9 @@ const Settings = props => {
|
|||
const onChangeMobileView = async () => {
|
||||
const api = Common.EditorApi.get();
|
||||
const appOptions = props.storeAppOptions;
|
||||
const isMobileView = appOptions.isMobileView;
|
||||
|
||||
await LocalStorage.setBool('mobile-view', !isMobileView);
|
||||
await appOptions.changeMobileView();
|
||||
await api.ChangeReaderMode();
|
||||
|
||||
|
|
|
@ -68,7 +68,7 @@ const EditTableContents = props => {
|
|||
return (
|
||||
<Fragment>
|
||||
<List>
|
||||
<ListItem title={t('Edit.textStyle')} link="/edit-style-table-contents/" after={activeStyle.displayValue} routeProps={{
|
||||
<ListItem title={t('Edit.textStyle')} link="/edit-style-table-contents/" after={activeStyle ? activeStyle.displayValue : ''} routeProps={{
|
||||
onStyle: props.onStyle,
|
||||
arrStyles,
|
||||
setStyleValue,
|
||||
|
|
Loading…
Reference in a new issue