Merge pull request #1063 from ONLYOFFICE/feature/bug-fixes
[DE PE SSE mobile] Fix Bug 51869
This commit is contained in:
commit
811977cb48
|
@ -6,13 +6,16 @@ class DocumentInfoController extends Component {
|
|||
constructor(props) {
|
||||
super(props);
|
||||
this.docProps = this.getDocProps();
|
||||
this.getModified = this.getModified();
|
||||
this.getModifiedBy = this.getModifiedBy();
|
||||
this.getCreators = this.getCreators();
|
||||
this.title = this.getTitle();
|
||||
this.subject = this.getSubject();
|
||||
this.description = this.getDescription();
|
||||
this.getCreated = this.getCreated();
|
||||
|
||||
if(this.docProps) {
|
||||
this.modified = this.getModified();
|
||||
this.modifiedBy = this.getModifiedBy();
|
||||
this.creators = this.getCreators();
|
||||
this.title = this.getTitle();
|
||||
this.subject = this.getSubject();
|
||||
this.description = this.getDescription();
|
||||
this.created = this.getCreated();
|
||||
}
|
||||
}
|
||||
|
||||
getDocProps() {
|
||||
|
@ -76,6 +79,7 @@ class DocumentInfoController extends Component {
|
|||
|
||||
getCreated() {
|
||||
let value = this.docProps.asc_getCreated();
|
||||
const _lang = this.props.storeAppOptions.lang;
|
||||
|
||||
if(value) {
|
||||
return value.toLocaleString(_lang, {year: 'numeric', month: '2-digit', day: '2-digit'}) + ' ' + value.toLocaleTimeString(_lang, {timeStyle: 'short'});
|
||||
|
@ -91,10 +95,10 @@ class DocumentInfoController extends Component {
|
|||
return (
|
||||
<DocumentInfo
|
||||
getAppProps={this.getAppProps}
|
||||
getModified={this.getModified}
|
||||
getModifiedBy={this.getModifiedBy}
|
||||
getCreators={this.getCreators}
|
||||
getCreated={this.getCreated}
|
||||
modified={this.modified}
|
||||
modifiedBy={this.modifiedBy}
|
||||
creators={this.creators}
|
||||
created={this.created}
|
||||
title={this.title}
|
||||
subject={this.subject}
|
||||
description={this.description}
|
||||
|
|
|
@ -8,10 +8,7 @@ const PageDocumentInfo = (props) => {
|
|||
const _t = t("Settings", { returnObjects: true });
|
||||
const storeInfo = props.storeDocumentInfo;
|
||||
const dataApp = props.getAppProps();
|
||||
const dataModified = props.getModified;
|
||||
const dataModifiedBy = props.getModifiedBy;
|
||||
const creators = props.getCreators;
|
||||
// console.log(creators);
|
||||
|
||||
const {
|
||||
pageCount,
|
||||
paragraphCount,
|
||||
|
@ -19,10 +16,9 @@ const PageDocumentInfo = (props) => {
|
|||
symbolsWSCount,
|
||||
wordsCount,
|
||||
} = storeInfo.infoObj;
|
||||
|
||||
const dataDoc = JSON.parse(JSON.stringify(storeInfo.dataDoc));
|
||||
// console.log(dataDoc);
|
||||
const isLoaded = storeInfo.isLoaded;
|
||||
// console.log(pageCount, paragraphCount, symbolsCount, symbolsWSCount, wordsCount);
|
||||
|
||||
return (
|
||||
<Page>
|
||||
|
@ -91,27 +87,27 @@ const PageDocumentInfo = (props) => {
|
|||
</List>
|
||||
</Fragment>
|
||||
) : null}
|
||||
{dataModified ? (
|
||||
{props.modified ? (
|
||||
<Fragment>
|
||||
<BlockTitle>{_t.textLastModified}</BlockTitle>
|
||||
<List>
|
||||
<ListItem title={dataModified}></ListItem>
|
||||
<ListItem title={props.modified}></ListItem>
|
||||
</List>
|
||||
</Fragment>
|
||||
) : null}
|
||||
{dataModifiedBy ? (
|
||||
{props.modifiedBy ? (
|
||||
<Fragment>
|
||||
<BlockTitle>{_t.textLastModifiedBy}</BlockTitle>
|
||||
<List>
|
||||
<ListItem title={dataModifiedBy}></ListItem>
|
||||
<ListItem title={props.modifiedBy}></ListItem>
|
||||
</List>
|
||||
</Fragment>
|
||||
) : null}
|
||||
{props.getCreated ? (
|
||||
{props.created ? (
|
||||
<Fragment>
|
||||
<BlockTitle>{_t.textCreated}</BlockTitle>
|
||||
<List>
|
||||
<ListItem title={props.getCreated}></ListItem>
|
||||
<ListItem title={props.created}></ListItem>
|
||||
</List>
|
||||
</Fragment>
|
||||
) : null}
|
||||
|
@ -123,12 +119,12 @@ const PageDocumentInfo = (props) => {
|
|||
</List>
|
||||
</Fragment>
|
||||
) : null}
|
||||
{creators ? (
|
||||
{props.creators ? (
|
||||
<Fragment>
|
||||
<BlockTitle>{_t.textAuthor}</BlockTitle>
|
||||
<List>
|
||||
{
|
||||
creators.split(/\s*[,;]\s*/).map(item => {
|
||||
props.creators.split(/\s*[,;]\s*/).map(item => {
|
||||
return <ListItem title={item}></ListItem>
|
||||
})
|
||||
}
|
||||
|
|
|
@ -1,17 +1,21 @@
|
|||
import React, { Component } from "react";
|
||||
import PresentationInfo from "../../view/settings/PresentationInfo";
|
||||
import { observer, inject } from "mobx-react";
|
||||
|
||||
class PresentationInfoController extends Component {
|
||||
constructor(props) {
|
||||
super(props);
|
||||
this.docProps = this.getDocProps();
|
||||
this.getModified = this.getModified();
|
||||
this.getModifiedBy = this.getModifiedBy();
|
||||
this.getCreators = this.getCreators();
|
||||
this.title = this.getTitle();
|
||||
this.subject = this.getSubject();
|
||||
this.description = this.getDescription();
|
||||
this.getCreated = this.getCreated();
|
||||
|
||||
if(this.docProps) {
|
||||
this.modified = this.getModified();
|
||||
this.modifiedBy = this.getModifiedBy();
|
||||
this.creators = this.getCreators();
|
||||
this.title = this.getTitle();
|
||||
this.subject = this.getSubject();
|
||||
this.description = this.getDescription();
|
||||
this.created = this.getCreated();
|
||||
}
|
||||
}
|
||||
|
||||
getDocProps() {
|
||||
|
@ -30,17 +34,17 @@ class PresentationInfoController extends Component {
|
|||
|
||||
getModified() {
|
||||
let valueModified = this.docProps.asc_getModified();
|
||||
// const _lang = this.props.storeAppOptions.lang;
|
||||
const _lang = this.props.storeAppOptions.lang;
|
||||
|
||||
if (valueModified) {
|
||||
return (
|
||||
valueModified.toLocaleString("en", {
|
||||
valueModified.toLocaleString(_lang, {
|
||||
year: "numeric",
|
||||
month: "2-digit",
|
||||
day: "2-digit",
|
||||
}) +
|
||||
" " +
|
||||
valueModified.toLocaleTimeString("en", { timeStyle: "short" })
|
||||
valueModified.toLocaleTimeString(_lang, { timeStyle: "short" })
|
||||
);
|
||||
}
|
||||
}
|
||||
|
@ -71,9 +75,10 @@ class PresentationInfoController extends Component {
|
|||
|
||||
getCreated() {
|
||||
let value = this.docProps.asc_getCreated();
|
||||
const _lang = this.props.storeAppOptions.lang;
|
||||
|
||||
if(value) {
|
||||
return value.toLocaleString("en", {year: 'numeric', month: '2-digit', day: '2-digit'}) + ' ' + value.toLocaleTimeString("en", {timeStyle: 'short'});
|
||||
return value.toLocaleString(_lang, {year: 'numeric', month: '2-digit', day: '2-digit'}) + ' ' + value.toLocaleTimeString(_lang, {timeStyle: 'short'});
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -81,10 +86,10 @@ class PresentationInfoController extends Component {
|
|||
return (
|
||||
<PresentationInfo
|
||||
getAppProps={this.getAppProps}
|
||||
getModified={this.getModified}
|
||||
getModifiedBy={this.getModifiedBy}
|
||||
getCreators={this.getCreators}
|
||||
getCreated={this.getCreated}
|
||||
modified={this.modified}
|
||||
modifiedBy={this.modifiedBy}
|
||||
creators={this.creators}
|
||||
created={this.created}
|
||||
title={this.title}
|
||||
subject={this.subject}
|
||||
description={this.description}
|
||||
|
@ -94,4 +99,4 @@ class PresentationInfoController extends Component {
|
|||
}
|
||||
|
||||
|
||||
export default PresentationInfoController;
|
||||
export default inject("storeAppOptions")(observer(PresentationInfoController));
|
|
@ -8,9 +8,6 @@ const PagePresentationInfo = (props) => {
|
|||
const _t = t("View.Settings", { returnObjects: true });
|
||||
const storeInfo = props.storePresentationInfo;
|
||||
const dataApp = props.getAppProps();
|
||||
const dataModified = props.getModified;
|
||||
const dataModifiedBy = props.getModifiedBy;
|
||||
const creators = props.getCreators;
|
||||
const dataDoc = JSON.parse(JSON.stringify(storeInfo.dataDoc));
|
||||
|
||||
return (
|
||||
|
@ -72,27 +69,27 @@ const PagePresentationInfo = (props) => {
|
|||
</List>
|
||||
</Fragment>
|
||||
) : null}
|
||||
{dataModified ? (
|
||||
{props.modified ? (
|
||||
<Fragment>
|
||||
<BlockTitle>{_t.textLastModified}</BlockTitle>
|
||||
<List>
|
||||
<ListItem title={dataModified}></ListItem>
|
||||
<ListItem title={props.modified}></ListItem>
|
||||
</List>
|
||||
</Fragment>
|
||||
) : null}
|
||||
{dataModifiedBy ? (
|
||||
{props.modifiedBy ? (
|
||||
<Fragment>
|
||||
<BlockTitle>{_t.textLastModifiedBy}</BlockTitle>
|
||||
<List>
|
||||
<ListItem title={dataModifiedBy}></ListItem>
|
||||
<ListItem title={props.modifiedBy}></ListItem>
|
||||
</List>
|
||||
</Fragment>
|
||||
) : null}
|
||||
{props.getCreated ? (
|
||||
{props.created ? (
|
||||
<Fragment>
|
||||
<BlockTitle>{_t.textCreated}</BlockTitle>
|
||||
<List>
|
||||
<ListItem title={props.getCreated}></ListItem>
|
||||
<ListItem title={props.created}></ListItem>
|
||||
</List>
|
||||
</Fragment>
|
||||
) : null}
|
||||
|
@ -104,12 +101,12 @@ const PagePresentationInfo = (props) => {
|
|||
</List>
|
||||
</Fragment>
|
||||
) : null}
|
||||
{creators ? (
|
||||
{props.creators ? (
|
||||
<Fragment>
|
||||
<BlockTitle>{_t.textAuthor}</BlockTitle>
|
||||
<List>
|
||||
{
|
||||
creators.split(/\s*[,;]\s*/).map(item => {
|
||||
props.creators.split(/\s*[,;]\s*/).map(item => {
|
||||
return <ListItem title={item}></ListItem>
|
||||
})
|
||||
}
|
||||
|
|
|
@ -6,8 +6,8 @@ class SpreadsheetInfoController extends Component {
|
|||
constructor(props) {
|
||||
super(props);
|
||||
this.docProps = this.getDocProps();
|
||||
|
||||
if (this.docProps) {
|
||||
this.dataApp = this.getAppProps();
|
||||
this.modified = this.getModified();
|
||||
this.modifiedBy = this.getModifiedBy();
|
||||
this.creators = this.getCreators();
|
||||
|
@ -15,7 +15,6 @@ class SpreadsheetInfoController extends Component {
|
|||
this.subject = this.getSubject();
|
||||
this.description = this.getDescription();
|
||||
this.created = this.getCreated();
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -40,6 +39,7 @@ class SpreadsheetInfoController extends Component {
|
|||
getModified() {
|
||||
let valueModified = this.docProps.asc_getModified();
|
||||
const _lang = this.props.storeAppOptions.lang;
|
||||
|
||||
if (valueModified) {
|
||||
return (
|
||||
valueModified.toLocaleString(_lang, {
|
||||
|
@ -81,16 +81,18 @@ class SpreadsheetInfoController extends Component {
|
|||
getCreated() {
|
||||
let value = this.docProps.asc_getCreated();
|
||||
const _lang = this.props.storeAppOptions.lang;
|
||||
|
||||
if(value) {
|
||||
return value.toLocaleString(_lang, {year: 'numeric', month: '2-digit', day: '2-digit'}) + ' ' + value.toLocaleTimeString(_lang, {timeStyle: 'short'});
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
render() {
|
||||
return (
|
||||
<SpreadsheetInfo
|
||||
dataApp={this.dataApp}
|
||||
getAppProps={this.getAppProps}
|
||||
modified={this.modified}
|
||||
modifiedBy={this.modifiedBy}
|
||||
creators={this.creators}
|
||||
|
|
|
@ -8,7 +8,7 @@ const PageSpreadsheetInfo = (props) => {
|
|||
const _t = t("View.Settings", { returnObjects: true });
|
||||
const storeSpreadsheetInfo = props.storeSpreadsheetInfo;
|
||||
const dataDoc = storeSpreadsheetInfo.dataDoc;
|
||||
const dataApp = props.dataApp;
|
||||
const dataApp = props.getAppProps();
|
||||
const dataModified = props.modified;
|
||||
const dataModifiedBy = props.modifiedBy;
|
||||
const creators = props.creators;
|
||||
|
@ -88,11 +88,11 @@ const PageSpreadsheetInfo = (props) => {
|
|||
</List>
|
||||
</Fragment>
|
||||
) : null}
|
||||
{props.getCreated ? (
|
||||
{props.created ? (
|
||||
<Fragment>
|
||||
<BlockTitle>{_t.textCreated}</BlockTitle>
|
||||
<List>
|
||||
<ListItem title={props.getCreated}></ListItem>
|
||||
<ListItem title={props.created}></ListItem>
|
||||
</List>
|
||||
</Fragment>
|
||||
) : null}
|
||||
|
|
Loading…
Reference in a new issue