Merge pull request #1521 from ONLYOFFICE/feature/bug-fixes
[PE SSE mobile] Fix Bug 55043
This commit is contained in:
commit
696fee1cbe
|
@ -152,9 +152,9 @@ const SettingsList = inject("storeAppOptions", "storeReview")(observer(props =>
|
|||
</ListItem>
|
||||
}
|
||||
{_canDownloadOrigin &&
|
||||
<ListItem title={_t.textDownload} link="#" onClick={props.onDownloadOrigin} className='no-indicator'>
|
||||
<Icon slot="media" icon="icon-download"></Icon>
|
||||
</ListItem>
|
||||
<ListItem title={_t.textDownload} link="#" onClick={props.onDownloadOrigin} className='no-indicator'>
|
||||
<Icon slot="media" icon="icon-download"></Icon>
|
||||
</ListItem>
|
||||
}
|
||||
{_canPrint &&
|
||||
<ListItem title={_t.textPrint} onClick={props.onPrint} link='#' className='no-indicator'>
|
||||
|
|
|
@ -112,11 +112,36 @@ const SettingsList = inject("storeAppOptions", "storeToolbarSettings")(observer(
|
|||
};
|
||||
|
||||
const appOptions = props.storeAppOptions;
|
||||
let _isEdit = false;
|
||||
let _isEdit = false,
|
||||
_canDownload = false,
|
||||
_canDownloadOrigin = false,
|
||||
_canAbout = true,
|
||||
_canHelp = true,
|
||||
_canPrint = false;
|
||||
|
||||
if (!appOptions.isDisconnected) {
|
||||
if (appOptions.isDisconnected) {
|
||||
_isEdit = false;
|
||||
if (!appOptions.enableDownload)
|
||||
_canPrint = _canDownload = _canDownloadOrigin = false;
|
||||
} else {
|
||||
_isEdit = appOptions.isEdit;
|
||||
}
|
||||
_canDownload = appOptions.canDownload;
|
||||
_canDownloadOrigin = appOptions.canDownloadOrigin;
|
||||
_canPrint = appOptions.canPrint;
|
||||
if (appOptions.customization && appOptions.canBrandingExt) {
|
||||
_canAbout = (appOptions.customization.about!==false);
|
||||
}
|
||||
if (appOptions.customization) {
|
||||
_canHelp = (appOptions.customization.help!==false);
|
||||
}
|
||||
}
|
||||
|
||||
const onDownloadOrigin = () => {
|
||||
closeModal();
|
||||
setTimeout(() => {
|
||||
Common.EditorApi.get().asc_DownloadOrigin();
|
||||
}, 0);
|
||||
};
|
||||
|
||||
return (
|
||||
<View style={props.style} stackPages={true} routes={routes}>
|
||||
|
@ -141,12 +166,21 @@ const SettingsList = inject("storeAppOptions", "storeToolbarSettings")(observer(
|
|||
<ListItem title={_t.textApplicationSettings} link="#" onClick={onoptionclick.bind(this, '/application-settings/')}>
|
||||
<Icon slot="media" icon="icon-app-settings"></Icon>
|
||||
</ListItem>
|
||||
<ListItem title={_t.textDownload} link="#" onClick={onoptionclick.bind(this, '/download/')}>
|
||||
<Icon slot="media" icon="icon-download"></Icon>
|
||||
</ListItem>
|
||||
<ListItem className={disabledPreview && 'disabled'} title={_t.textPrint} onClick={onPrint}>
|
||||
<Icon slot="media" icon="icon-print"></Icon>
|
||||
</ListItem>
|
||||
{_canDownload &&
|
||||
<ListItem title={_t.textDownload} link="#" onClick={onoptionclick.bind(this, '/download/')}>
|
||||
<Icon slot="media" icon="icon-download"></Icon>
|
||||
</ListItem>
|
||||
}
|
||||
{_canDownloadOrigin &&
|
||||
<ListItem title={_t.textDownload} link="#" onClick={onDownloadOrigin} className='no-indicator'>
|
||||
<Icon slot="media" icon="icon-download"></Icon>
|
||||
</ListItem>
|
||||
}
|
||||
{_canPrint &&
|
||||
<ListItem className={disabledPreview && 'disabled'} title={_t.textPrint} onClick={onPrint}>
|
||||
<Icon slot="media" icon="icon-print"></Icon>
|
||||
</ListItem>
|
||||
}
|
||||
<ListItem title={_t.textPresentationInfo} link="#" onClick={onoptionclick.bind(this, "/presentation-info/")}>
|
||||
<Icon slot="media" icon="icon-info"></Icon>
|
||||
</ListItem>
|
||||
|
|
|
@ -100,8 +100,10 @@ export class storeAppOptions {
|
|||
this.canPrint = (permissions.print !== false);
|
||||
this.isRestrictedEdit = !this.isEdit && this.canComments;
|
||||
this.trialMode = params.asc_getLicenseMode();
|
||||
this.canDownloadOrigin = permissions.download !== false;
|
||||
this.canDownload = permissions.download !== false;
|
||||
|
||||
const type = /^(?:(pdf|djvu|xps|oxps))$/.exec(document.fileType);
|
||||
this.canDownloadOrigin = permissions.download !== false && (type && typeof type[1] === 'string');
|
||||
this.canDownload = permissions.download !== false && (!type || typeof type[1] !== 'string');
|
||||
this.canUseReviewPermissions = this.canLicense && (!!permissions.reviewGroups || this.customization
|
||||
&& this.customization.reviewPermissions && (typeof (this.customization.reviewPermissions) == 'object'));
|
||||
this.canUseCommentPermissions = this.canLicense && !!permissions.commentGroups;
|
||||
|
|
|
@ -117,11 +117,36 @@ const SettingsList = inject("storeAppOptions")(observer(props => {
|
|||
};
|
||||
|
||||
const appOptions = props.storeAppOptions;
|
||||
let _isEdit = false;
|
||||
|
||||
if (!appOptions.isDisconnected) {
|
||||
let _isEdit = false,
|
||||
_canDownload = false,
|
||||
_canDownloadOrigin = false,
|
||||
_canAbout = true,
|
||||
_canHelp = true,
|
||||
_canPrint = false;
|
||||
|
||||
if (appOptions.isDisconnected) {
|
||||
_isEdit = false;
|
||||
if (!appOptions.enableDownload)
|
||||
_canPrint = _canDownload = _canDownloadOrigin = false;
|
||||
} else {
|
||||
_isEdit = appOptions.isEdit;
|
||||
}
|
||||
_canDownload = appOptions.canDownload;
|
||||
_canDownloadOrigin = appOptions.canDownloadOrigin;
|
||||
_canPrint = appOptions.canPrint;
|
||||
if (appOptions.customization && appOptions.canBrandingExt) {
|
||||
_canAbout = (appOptions.customization.about!==false);
|
||||
}
|
||||
if (appOptions.customization) {
|
||||
_canHelp = (appOptions.customization.help!==false);
|
||||
}
|
||||
}
|
||||
|
||||
const onDownloadOrigin = () => {
|
||||
closeModal();
|
||||
setTimeout(() => {
|
||||
Common.EditorApi.get().asc_DownloadOrigin();
|
||||
}, 0);
|
||||
};
|
||||
|
||||
return (
|
||||
<View style={props.style} stackPages={true} routes={routes}>
|
||||
|
@ -146,12 +171,21 @@ const SettingsList = inject("storeAppOptions")(observer(props => {
|
|||
<ListItem title={_t.textApplicationSettings} link="#" onClick={onoptionclick.bind(this, '/application-settings/')}>
|
||||
<Icon slot="media" icon="icon-app-settings"></Icon>
|
||||
</ListItem>
|
||||
<ListItem title={_t.textDownload} link="#" onClick={onoptionclick.bind(this, '/download/')}>
|
||||
<Icon slot="media" icon="icon-download"></Icon>
|
||||
</ListItem>
|
||||
<ListItem title={_t.textPrint} onClick={onPrint}>
|
||||
<Icon slot="media" icon="icon-print"></Icon>
|
||||
</ListItem>
|
||||
{_canDownload &&
|
||||
<ListItem title={_t.textDownload} link="#" onClick={onoptionclick.bind(this, '/download/')}>
|
||||
<Icon slot="media" icon="icon-download"></Icon>
|
||||
</ListItem>
|
||||
}
|
||||
{_canDownloadOrigin &&
|
||||
<ListItem title={_t.textDownload} link="#" onClick={onDownloadOrigin} className='no-indicator'>
|
||||
<Icon slot="media" icon="icon-download"></Icon>
|
||||
</ListItem>
|
||||
}
|
||||
{_canPrint &&
|
||||
<ListItem title={_t.textPrint} onClick={onPrint}>
|
||||
<Icon slot="media" icon="icon-print"></Icon>
|
||||
</ListItem>
|
||||
}
|
||||
<ListItem title={_t.textSpreadsheetInfo} link="#" onClick={onoptionclick.bind(this, "/spreadsheet-info/")}>
|
||||
<Icon slot="media" icon="icon-info"></Icon>
|
||||
</ListItem>
|
||||
|
|
Loading…
Reference in a new issue