[DE mobile] Added one more event and loading counters
This commit is contained in:
parent
b5058e24ec
commit
3e706114eb
|
@ -27,7 +27,8 @@
|
||||||
"textStatistic": "Statistic",
|
"textStatistic": "Statistic",
|
||||||
"textLastModifiedBy": "Last Modified By",
|
"textLastModifiedBy": "Last Modified By",
|
||||||
"textLastModified": "Last Modified",
|
"textLastModified": "Last Modified",
|
||||||
"textApplication": "Application"
|
"textApplication": "Application",
|
||||||
|
"textLoading": "Loading..."
|
||||||
},
|
},
|
||||||
"Collaboration": {
|
"Collaboration": {
|
||||||
"textEditUser": "Users who are editing the file:"
|
"textEditUser": "Users who are editing the file:"
|
||||||
|
|
|
@ -254,7 +254,7 @@ class MainController extends Component {
|
||||||
});
|
});
|
||||||
|
|
||||||
this.api.asc_registerCallback("asc_onGetDocInfoStop", () => {
|
this.api.asc_registerCallback("asc_onGetDocInfoStop", () => {
|
||||||
console.log("End");
|
console.log("Stop");
|
||||||
storeDocumentInfo.switchIsLoaded(true);
|
storeDocumentInfo.switchIsLoaded(true);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -262,7 +262,11 @@ class MainController extends Component {
|
||||||
storeDocumentInfo.changeCount(obj);
|
storeDocumentInfo.changeCount(obj);
|
||||||
});
|
});
|
||||||
|
|
||||||
// me.api.asc_registerCallback('asc_onGetDocInfoEnd', _.bind(me.onApiGetDocInfoEnd, me));
|
this.api.asc_registerCallback('asc_onGetDocInfoEnd', () => {
|
||||||
|
console.log('End');
|
||||||
|
storeDocumentInfo.switchIsLoaded(true);
|
||||||
|
});
|
||||||
|
|
||||||
// me.api.asc_registerCallback('asc_onDocumentName', _.bind(me.onApiDocumentName, me));
|
// me.api.asc_registerCallback('asc_onDocumentName', _.bind(me.onApiDocumentName, me));
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -19,15 +19,8 @@ const PageDocumentInfo = (props) => {
|
||||||
} = storeInfo.infoObj;
|
} = storeInfo.infoObj;
|
||||||
const dataDoc = JSON.parse(JSON.stringify(storeInfo.dataDoc));
|
const dataDoc = JSON.parse(JSON.stringify(storeInfo.dataDoc));
|
||||||
const isLoaded = storeInfo.isLoaded;
|
const isLoaded = storeInfo.isLoaded;
|
||||||
|
console.log(pageCount, paragraphCount, symbolsCount, symbolsWSCount, wordsCount);
|
||||||
|
|
||||||
if (!isLoaded) {
|
|
||||||
console.log(
|
|
||||||
pageCount,
|
|
||||||
paragraphCount,
|
|
||||||
symbolsCount,
|
|
||||||
symbolsWSCount,
|
|
||||||
wordsCount
|
|
||||||
);
|
|
||||||
return (
|
return (
|
||||||
<Page>
|
<Page>
|
||||||
<Navbar title={_t.textDocumentInfo} backLink={_t.textBack} />
|
<Navbar title={_t.textDocumentInfo} backLink={_t.textBack} />
|
||||||
|
@ -45,11 +38,11 @@ const PageDocumentInfo = (props) => {
|
||||||
</List>
|
</List>
|
||||||
<BlockTitle>{_t.textStatistic}</BlockTitle>
|
<BlockTitle>{_t.textStatistic}</BlockTitle>
|
||||||
<List>
|
<List>
|
||||||
<ListItem title="Pages" after={pageCount}></ListItem>
|
<ListItem title="Pages" after={isLoaded ? pageCount : _t.textLoading}></ListItem>
|
||||||
<ListItem title="Paragraphs" after={paragraphCount}></ListItem>
|
<ListItem title="Paragraphs" after={isLoaded ? paragraphCount : _t.textLoading}></ListItem>
|
||||||
<ListItem title="Words" after={wordsCount}></ListItem>
|
<ListItem title="Words" after={isLoaded ? wordsCount : _t.textLoading}></ListItem>
|
||||||
<ListItem title="Symbols" after={symbolsCount}></ListItem>
|
<ListItem title="Symbols" after={isLoaded ? symbolsCount : _t.textLoading}></ListItem>
|
||||||
<ListItem title="Spaces" after={symbolsWSCount}></ListItem>
|
<ListItem title="Spaces" after={isLoaded ? symbolsWSCount : _t.textLoading}></ListItem>
|
||||||
</List>
|
</List>
|
||||||
{dataModified && dataModifiedBy ? (
|
{dataModified && dataModifiedBy ? (
|
||||||
<Fragment>
|
<Fragment>
|
||||||
|
@ -73,7 +66,6 @@ const PageDocumentInfo = (props) => {
|
||||||
) : null}
|
) : null}
|
||||||
</Page>
|
</Page>
|
||||||
);
|
);
|
||||||
}
|
|
||||||
};
|
};
|
||||||
|
|
||||||
const DocumentInfo = inject("storeDocumentInfo")(observer(PageDocumentInfo));
|
const DocumentInfo = inject("storeDocumentInfo")(observer(PageDocumentInfo));
|
||||||
|
|
Loading…
Reference in a new issue