[SSE mobile] Fix bug 50824
This commit is contained in:
parent
bafa7f9688
commit
0b2cb9f13d
|
@ -6,13 +6,17 @@ class SpreadsheetInfoController extends Component {
|
||||||
constructor(props) {
|
constructor(props) {
|
||||||
super(props);
|
super(props);
|
||||||
this.docProps = this.getDocProps();
|
this.docProps = this.getDocProps();
|
||||||
this.getModified = this.getModified();
|
if (this.docProps) {
|
||||||
this.getModifiedBy = this.getModifiedBy();
|
this.dataApp = this.getAppProps();
|
||||||
this.getCreators = this.getCreators();
|
this.modified = this.getModified();
|
||||||
this.title = this.getTitle();
|
this.modifiedBy = this.getModifiedBy();
|
||||||
this.subject = this.getSubject();
|
this.creators = this.getCreators();
|
||||||
this.description = this.getDescription();
|
this.title = this.getTitle();
|
||||||
this.getCreated = this.getCreated();
|
this.subject = this.getSubject();
|
||||||
|
this.description = this.getDescription();
|
||||||
|
this.created = this.getCreated();
|
||||||
|
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
getDocProps() {
|
getDocProps() {
|
||||||
|
@ -23,7 +27,6 @@ class SpreadsheetInfoController extends Component {
|
||||||
getAppProps() {
|
getAppProps() {
|
||||||
const api = Common.EditorApi.get();
|
const api = Common.EditorApi.get();
|
||||||
const appProps = api.asc_getAppProps();
|
const appProps = api.asc_getAppProps();
|
||||||
|
|
||||||
if (appProps) {
|
if (appProps) {
|
||||||
let appName =
|
let appName =
|
||||||
(appProps.asc_getApplication() || "") +
|
(appProps.asc_getApplication() || "") +
|
||||||
|
@ -31,12 +34,12 @@ class SpreadsheetInfoController extends Component {
|
||||||
(appProps.asc_getAppVersion() || "");
|
(appProps.asc_getAppVersion() || "");
|
||||||
return appName;
|
return appName;
|
||||||
}
|
}
|
||||||
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
getModified() {
|
getModified() {
|
||||||
let valueModified = this.docProps.asc_getModified();
|
let valueModified = this.docProps.asc_getModified();
|
||||||
const _lang = this.props.storeAppOptions.lang;
|
const _lang = this.props.storeAppOptions.lang;
|
||||||
|
|
||||||
if (valueModified) {
|
if (valueModified) {
|
||||||
return (
|
return (
|
||||||
valueModified.toLocaleString(_lang, {
|
valueModified.toLocaleString(_lang, {
|
||||||
|
@ -48,14 +51,15 @@ class SpreadsheetInfoController extends Component {
|
||||||
valueModified.toLocaleTimeString(_lang, { timeStyle: "short" })
|
valueModified.toLocaleTimeString(_lang, { timeStyle: "short" })
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
getModifiedBy() {
|
getModifiedBy() {
|
||||||
let valueModifiedBy = this.docProps.asc_getLastModifiedBy();
|
let valueModifiedBy = this.docProps.asc_getLastModifiedBy();
|
||||||
|
|
||||||
if (valueModifiedBy) {
|
if (valueModifiedBy) {
|
||||||
return Common.Utils.UserInfoParser.getParsedName(valueModifiedBy);
|
return Common.Utils.UserInfoParser.getParsedName(valueModifiedBy);
|
||||||
}
|
}
|
||||||
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
getCreators() {
|
getCreators() {
|
||||||
|
@ -77,20 +81,20 @@ class SpreadsheetInfoController extends Component {
|
||||||
getCreated() {
|
getCreated() {
|
||||||
let value = this.docProps.asc_getCreated();
|
let value = this.docProps.asc_getCreated();
|
||||||
const _lang = this.props.storeAppOptions.lang;
|
const _lang = this.props.storeAppOptions.lang;
|
||||||
|
|
||||||
if(value) {
|
if(value) {
|
||||||
return value.toLocaleString(_lang, {year: 'numeric', month: '2-digit', day: '2-digit'}) + ' ' + value.toLocaleTimeString(_lang, {timeStyle: 'short'});
|
return value.toLocaleString(_lang, {year: 'numeric', month: '2-digit', day: '2-digit'}) + ' ' + value.toLocaleTimeString(_lang, {timeStyle: 'short'});
|
||||||
}
|
}
|
||||||
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
render() {
|
render() {
|
||||||
return (
|
return (
|
||||||
<SpreadsheetInfo
|
<SpreadsheetInfo
|
||||||
getAppProps={this.getAppProps}
|
dataApp={this.dataApp}
|
||||||
getModified={this.getModified}
|
modified={this.modified}
|
||||||
getModifiedBy={this.getModifiedBy}
|
modifiedBy={this.modifiedBy}
|
||||||
getCreators={this.getCreators}
|
creators={this.creators}
|
||||||
getCreated={this.getCreated}
|
created={this.created}
|
||||||
title={this.title}
|
title={this.title}
|
||||||
subject={this.subject}
|
subject={this.subject}
|
||||||
description={this.description}
|
description={this.description}
|
||||||
|
|
|
@ -7,11 +7,11 @@ const PageSpreadsheetInfo = (props) => {
|
||||||
const { t } = useTranslation();
|
const { t } = useTranslation();
|
||||||
const _t = t("View.Settings", { returnObjects: true });
|
const _t = t("View.Settings", { returnObjects: true });
|
||||||
const storeSpreadsheetInfo = props.storeSpreadsheetInfo;
|
const storeSpreadsheetInfo = props.storeSpreadsheetInfo;
|
||||||
const dataApp = props.getAppProps();
|
|
||||||
const dataModified = props.getModified;
|
|
||||||
const dataModifiedBy = props.getModifiedBy;
|
|
||||||
const creators = props.getCreators;
|
|
||||||
const dataDoc = storeSpreadsheetInfo.dataDoc;
|
const dataDoc = storeSpreadsheetInfo.dataDoc;
|
||||||
|
const dataApp = props.dataApp;
|
||||||
|
const dataModified = props.modified;
|
||||||
|
const dataModifiedBy = props.modifiedBy;
|
||||||
|
const creators = props.creators;
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Page>
|
<Page>
|
||||||
|
|
Loading…
Reference in a new issue