Merge pull request #1046 from ONLYOFFICE/feature/bug-fixes
Feature/bug fixes
This commit is contained in:
commit
7211050c0d
|
@ -1,24 +1,24 @@
|
|||
import {action, observable, makeObservable} from 'mobx';
|
||||
|
||||
export class storeReview {
|
||||
constructor() {
|
||||
makeObservable(this, {
|
||||
displayMode: observable,
|
||||
dataChanges: observable,
|
||||
changeDisplayMode: action,
|
||||
changeArrReview: action
|
||||
});
|
||||
}
|
||||
|
||||
displayMode = 'markup';
|
||||
|
||||
changeDisplayMode (mode) {
|
||||
this.displayMode = mode;
|
||||
}
|
||||
|
||||
dataChanges = [];
|
||||
|
||||
changeArrReview (data) {
|
||||
this.dataChanges = data && data.length > 0 ? data : [];
|
||||
}
|
||||
import {action, observable, makeObservable} from 'mobx';
|
||||
|
||||
export class storeReview {
|
||||
constructor() {
|
||||
makeObservable(this, {
|
||||
displayMode: observable,
|
||||
dataChanges: observable,
|
||||
changeDisplayMode: action,
|
||||
changeArrReview: action
|
||||
});
|
||||
}
|
||||
|
||||
displayMode = 'markup';
|
||||
|
||||
changeDisplayMode (mode) {
|
||||
this.displayMode = mode;
|
||||
}
|
||||
|
||||
dataChanges = [];
|
||||
|
||||
changeArrReview (data) {
|
||||
this.dataChanges = data && data.length > 0 ? data : [];
|
||||
}
|
||||
}
|
|
@ -628,10 +628,11 @@ const pickLink = (message) => {
|
|||
}
|
||||
|
||||
// View comments
|
||||
const ViewComments = ({storeComments, storeAppOptions, onCommentMenuClick, onResolveComment, showComment}) => {
|
||||
const ViewComments = ({storeComments, storeAppOptions, onCommentMenuClick, onResolveComment, showComment, storeReview}) => {
|
||||
const { t } = useTranslation();
|
||||
const _t = t('Common.Collaboration', {returnObjects: true});
|
||||
const isAndroid = Device.android;
|
||||
const displayMode = storeReview.displayMode;
|
||||
|
||||
const viewMode = !storeAppOptions.canComments;
|
||||
const comments = storeComments.groupCollectionFilter || storeComments.collectionComments;
|
||||
|
@ -672,10 +673,13 @@ const ViewComments = ({storeComments, storeAppOptions, onCommentMenuClick, onRes
|
|||
</div>
|
||||
{!viewMode &&
|
||||
<div className='right'>
|
||||
{comment.editable && <div className='comment-resolve' onClick={() => {onResolveComment(comment);}}><Icon icon={comment.resolved ? 'icon-resolve-comment check' : 'icon-resolve-comment'} /></div> }
|
||||
<div className='comment-menu'
|
||||
onClick={() => {setComment(comment); openActionComment(true);}}
|
||||
><Icon icon='icon-menu-comment'/></div>
|
||||
{(comment.editable && displayMode === 'markup') && <div className='comment-resolve' onClick={() => {onResolveComment(comment);}}><Icon icon={comment.resolved ? 'icon-resolve-comment check' : 'icon-resolve-comment'} /></div> }
|
||||
{displayMode === 'markup' &&
|
||||
<div className='comment-menu'
|
||||
onClick={() => {setComment(comment); openActionComment(true);}}>
|
||||
<Icon icon='icon-menu-comment'/>
|
||||
</div>
|
||||
}
|
||||
</div>
|
||||
}
|
||||
</div>
|
||||
|
@ -734,13 +738,14 @@ const ViewComments = ({storeComments, storeAppOptions, onCommentMenuClick, onRes
|
|||
)
|
||||
};
|
||||
|
||||
const _ViewComments = inject('storeComments', 'storeAppOptions')(observer(ViewComments));
|
||||
const _ViewComments = inject('storeComments', 'storeAppOptions', "storeReview")(observer(ViewComments));
|
||||
|
||||
|
||||
const CommentList = inject("storeComments", "storeAppOptions")(observer(({storeComments, storeAppOptions, onCommentMenuClick, onResolveComment}) => {
|
||||
const CommentList = inject("storeComments", "storeAppOptions", "storeReview")(observer(({storeComments, storeAppOptions, onCommentMenuClick, onResolveComment, storeReview}) => {
|
||||
const { t } = useTranslation();
|
||||
const _t = t('Common.Collaboration', {returnObjects: true});
|
||||
const isAndroid = Device.android;
|
||||
const displayMode = storeReview.displayMode;
|
||||
|
||||
const viewMode = !storeAppOptions.canComments;
|
||||
const comments = storeComments.showComments;
|
||||
|
@ -801,10 +806,13 @@ const CommentList = inject("storeComments", "storeAppOptions")(observer(({storeC
|
|||
</div>
|
||||
{!viewMode &&
|
||||
<div className='right'>
|
||||
{comment.editable && <div className='comment-resolve' onClick={() => {onResolveComment(comment);}}><Icon icon={comment.resolved ? 'icon-resolve-comment check' : 'icon-resolve-comment'}/></div>}
|
||||
<div className='comment-menu'
|
||||
onClick={() => {openActionComment(true);}}
|
||||
><Icon icon='icon-menu-comment'/></div>
|
||||
{(comment.editable && displayMode === 'markup') && <div className='comment-resolve' onClick={() => {onResolveComment(comment);}}><Icon icon={comment.resolved ? 'icon-resolve-comment check' : 'icon-resolve-comment'}/></div>}
|
||||
{displayMode === 'markup' &&
|
||||
<div className='comment-menu'
|
||||
onClick={() => {openActionComment(true);}}>
|
||||
<Icon icon='icon-menu-comment'/>
|
||||
</div>
|
||||
}
|
||||
</div>
|
||||
}
|
||||
</div>
|
||||
|
|
|
@ -252,7 +252,7 @@
|
|||
"textNoStyles": "Для этого типа диаграмм нет стилей.",
|
||||
"textNotUrl": "Это поле должно быть URL-адресом в формате \"http://www.example.com\"",
|
||||
"textNumbers": "Нумерация",
|
||||
"textOpacity": "Прозрачность",
|
||||
"textOpacity": "Непрозрачность",
|
||||
"textOptions": "Параметры",
|
||||
"textOrphanControl": "Запрет висячих строк",
|
||||
"textPageBreakBefore": "С новой страницы",
|
||||
|
|
|
@ -16,7 +16,8 @@ import EditorUIController from '../lib/patch';
|
|||
canCoAuthoring: stores.storeAppOptions.canCoAuthoring,
|
||||
canReview: stores.storeAppOptions.canReview,
|
||||
users: stores.users,
|
||||
isDisconnected: stores.users.isDisconnected
|
||||
isDisconnected: stores.users.isDisconnected,
|
||||
displayMode: stores.storeReview.displayMode
|
||||
}))
|
||||
class ContextMenu extends ContextMenuController {
|
||||
constructor(props) {
|
||||
|
|
|
@ -13,7 +13,7 @@ import {storeLinkSettings} from './linkSettings';
|
|||
import {storeApplicationSettings} from './applicationSettings';
|
||||
import {storeAppOptions} from "./appOptions";
|
||||
import {storePalette} from "./palette";
|
||||
import {storeReview} from "./review";
|
||||
import {storeReview} from '../../../../common/mobile/lib/store/review';
|
||||
import {storeComments} from "../../../../common/mobile/lib/store/comments";
|
||||
import {storeToolbarSettings} from "./toolbar";
|
||||
|
||||
|
|
|
@ -202,7 +202,7 @@ class AddView extends Component {
|
|||
const show_popover = this.props.usePopover;
|
||||
return (
|
||||
show_popover ?
|
||||
<Popover id="add-popover" className="popover__titled" onPopoverClosed={() => this.props.onclosed()}>
|
||||
<Popover id="add-popover" className="popover__titled" closeByOutsideClick={false} onPopoverClosed={() => this.props.onclosed()}>
|
||||
<AddTabs inPopover={true} onOptionClick={this.onoptionclick} style={{height: '410px'}} showPanels={this.props.showPanels} />
|
||||
</Popover> :
|
||||
<Popup className="add-popup" onPopupClosed={() => this.props.onclosed()}>
|
||||
|
|
|
@ -6,6 +6,7 @@ import { useTranslation } from "react-i18next";
|
|||
const PageApplicationSettings = props => {
|
||||
const { t } = useTranslation();
|
||||
const _t = t("Settings", { returnObjects: true });
|
||||
const displayMode = props.storeReview.displayMode;
|
||||
const store = props.storeApplicationSettings;
|
||||
const unitMeasurement = store.unitMeasurement;
|
||||
const isSpellChecking = store.isSpellChecking;
|
||||
|
@ -49,7 +50,7 @@ const PageApplicationSettings = props => {
|
|||
</ListItem>
|
||||
</List>
|
||||
<List>
|
||||
<ListItem title={_t.textNoCharacters}>{/*ToDo: if (DisplayMode == "final" || DisplayMode == "original") {disabled} */}
|
||||
<ListItem title={_t.textNoCharacters} disabled={displayMode !== 'markup'}>{/*ToDo: if (DisplayMode == "final" || DisplayMode == "original") {disabled} */}
|
||||
<Toggle checked={isNonprintingCharacters}
|
||||
onChange={() => {
|
||||
store.changeNoCharacters(!isNonprintingCharacters);
|
||||
|
@ -57,7 +58,7 @@ const PageApplicationSettings = props => {
|
|||
}}
|
||||
/>
|
||||
</ListItem>
|
||||
<ListItem title={_t.textHiddenTableBorders}>{/*ToDo: if (DisplayMode == "final" || DisplayMode == "original") {disabled} */}
|
||||
<ListItem title={_t.textHiddenTableBorders} disabled={displayMode !== 'markup'}>{/*ToDo: if (DisplayMode == "final" || DisplayMode == "original") {disabled} */}
|
||||
<Toggle checked={isHiddenTableBorders}
|
||||
onChange={() => {
|
||||
store.changeShowTableEmptyLine(!isHiddenTableBorders);
|
||||
|
@ -124,7 +125,7 @@ const PageMacrosSettings = props => {
|
|||
);
|
||||
};
|
||||
|
||||
const ApplicationSettings = inject("storeApplicationSettings", "storeAppOptions")(observer(PageApplicationSettings));
|
||||
const ApplicationSettings = inject("storeApplicationSettings", "storeAppOptions", "storeReview")(observer(PageApplicationSettings));
|
||||
const MacrosSettings = inject("storeApplicationSettings")(observer(PageMacrosSettings));
|
||||
|
||||
export {ApplicationSettings, MacrosSettings};
|
|
@ -57,9 +57,11 @@ const routes = [
|
|||
];
|
||||
|
||||
|
||||
const SettingsList = inject("storeAppOptions")(observer(props => {
|
||||
const SettingsList = inject("storeAppOptions", "storeReview")(observer(props => {
|
||||
const { t } = useTranslation();
|
||||
const _t = t('Settings', {returnObjects: true});
|
||||
const storeReview = props.storeReview;
|
||||
const displayMode = storeReview.displayMode;
|
||||
const navbar = <Navbar title={_t.textSettings}>
|
||||
{!props.inPopover && <NavRight><Link popupClose=".settings-popup">{_t.textDone}</Link></NavRight>}
|
||||
</Navbar>;
|
||||
|
@ -139,7 +141,8 @@ const SettingsList = inject("storeAppOptions")(observer(props => {
|
|||
</ListItem>
|
||||
}
|
||||
{_isEdit &&
|
||||
<ListItem link="#" title={_t.textDocumentSettings} onClick={onoptionclick.bind(this, '/document-settings/')}>
|
||||
<ListItem link="#" title={_t.textDocumentSettings} disabled={displayMode !== 'markup'}
|
||||
onClick={onoptionclick.bind(this, '/document-settings/')}>
|
||||
<Icon slot="media" icon="icon-doc-setup"></Icon>
|
||||
</ListItem>
|
||||
}
|
||||
|
|
|
@ -327,7 +327,7 @@
|
|||
"textNoTextFound": "Текст не найден",
|
||||
"textNotUrl": "Это поле должно быть URL-адресом в формате \"http://www.example.com\"",
|
||||
"textNumbers": "Нумерация",
|
||||
"textOpacity": "Прозрачность",
|
||||
"textOpacity": "Непрозрачность",
|
||||
"textOptions": "Параметры",
|
||||
"textPictureFromLibrary": "Рисунок из библиотеки",
|
||||
"textPictureFromURL": "Рисунок по URL",
|
||||
|
|
|
@ -16,6 +16,7 @@ import { storeLinkSettings } from "./linkSettings";
|
|||
// import {storeParagraphSettings} from "./paragraphSettings";
|
||||
// import {storeShapeSettings} from "./shapeSettings";
|
||||
// import {storeImageSettings} from "./imageSettings";
|
||||
import {storeReview} from '../../../../common/mobile/lib/store/review';
|
||||
import {storeComments} from "../../../../common/mobile/lib/store/comments";
|
||||
import {storeToolbarSettings} from "./toolbar";
|
||||
|
||||
|
@ -34,6 +35,7 @@ export const stores = {
|
|||
storeTableSettings: new storeTableSettings(),
|
||||
storeChartSettings: new storeChartSettings(),
|
||||
storeLinkSettings: new storeLinkSettings(),
|
||||
storeReview: new storeReview(),
|
||||
// storeTextSettings: new storeTextSettings(),
|
||||
// storeParagraphSettings: new storeParagraphSettings(),
|
||||
// storeShapeSettings: new storeShapeSettings(),
|
||||
|
|
|
@ -141,7 +141,7 @@ class AddView extends Component {
|
|||
const show_popover = this.props.usePopover;
|
||||
return (
|
||||
show_popover ?
|
||||
<Popover id="add-popover" className="popover__titled" onPopoverClosed={() => this.props.onclosed()}>
|
||||
<Popover id="add-popover" className="popover__titled" closeByOutsideClick={false} onPopoverClosed={() => this.props.onclosed()}>
|
||||
<AddTabs inPopover={true} onOptionClick={this.onoptionclick} style={{height: '410px'}} showPanels={this.props.showPanels} />
|
||||
</Popover> :
|
||||
<Popup className="add-popup" onPopupClosed={() => this.props.onclosed()}>
|
||||
|
|
|
@ -453,7 +453,7 @@
|
|||
"textNotUrl": "Это поле должно быть URL-адресом в формате \"http://www.example.com\"",
|
||||
"textNumber": "Числовой",
|
||||
"textOnTickMarks": "Деления",
|
||||
"textOpacity": "Прозрачность",
|
||||
"textOpacity": "Непрозрачность",
|
||||
"textOut": "Снаружи",
|
||||
"textOuterTop": "Снаружи сверху",
|
||||
"textOutsideBorders": "Внешние границы",
|
||||
|
|
|
@ -15,6 +15,7 @@ import {storeAppOptions} from "./appOptions";
|
|||
// import {storeTableSettings} from "./tableSettings";
|
||||
import {storeChartSettings} from "./chartSettings";
|
||||
import {storeSpreadsheetSettings} from "./spreadsheetSettings";
|
||||
import {storeReview} from '../../../../common/mobile/lib/store/review';
|
||||
import {storeComments} from "../../../../common/mobile/lib/store/comments";
|
||||
import {storeToolbarSettings} from "./toolbar";
|
||||
|
||||
|
@ -33,6 +34,7 @@ export const stores = {
|
|||
storeChartSettings: new storeChartSettings(),
|
||||
storePalette: new storePalette(),
|
||||
storeCellSettings: new storeCellSettings(),
|
||||
storeReview: new storeReview(),
|
||||
// storeImageSettings: new storeImageSettings(),
|
||||
// storeTableSettings: new storeTableSettings()
|
||||
storeComments: new storeComments(),
|
||||
|
|
|
@ -161,7 +161,7 @@ class AddView extends Component {
|
|||
const show_popover = this.props.usePopover;
|
||||
return (
|
||||
show_popover ?
|
||||
<Popover id="add-popover" className="popover__titled" onPopoverClosed={() => this.props.onclosed()}>
|
||||
<Popover id="add-popover" className="popover__titled" closeByOutsideClick={false} onPopoverClosed={() => this.props.onclosed()}>
|
||||
<AddTabs inPopover={true} onOptionClick={this.onoptionclick} style={{height: '410px'}} showPanels={this.props.showPanels}/>
|
||||
</Popover> :
|
||||
<Popup className="add-popup" onPopupClosed={() => this.props.onclosed()}>
|
||||
|
|
Loading…
Reference in a new issue