[DE mobile] Disable reader mode for pdf/djvu/xps files.
This commit is contained in:
parent
c3848b3468
commit
13e636d814
|
@ -611,6 +611,7 @@ define([
|
|||
var type = /^(?:(pdf|djvu|xps))$/.exec(me.document.fileType);
|
||||
me.appOptions.canDownloadOrigin = me.permissions.download !== false && (type && typeof type[1] === 'string');
|
||||
me.appOptions.canDownload = me.permissions.download !== false && (!type || typeof type[1] !== 'string');
|
||||
me.appOptions.canReader = (!type || typeof type[1] !== 'string');
|
||||
|
||||
me._state.licenseWarning = (licType===Asc.c_oLicenseResult.Connections) && me.appOptions.canEdit && me.editorConfig.mode !== 'view';
|
||||
|
||||
|
|
|
@ -52,7 +52,8 @@ define([
|
|||
// private
|
||||
var _isEdit = false,
|
||||
_canEdit = false,
|
||||
_canDownload = false;
|
||||
_canDownload = false,
|
||||
_canReader = false;
|
||||
|
||||
return {
|
||||
// el: '.view-main',
|
||||
|
@ -91,6 +92,7 @@ define([
|
|||
_isEdit = mode.isEdit;
|
||||
_canEdit = !mode.isEdit && mode.canEdit && mode.canRequestEditRights;
|
||||
_canDownload = mode.canDownload || mode.canDownloadOrigin;
|
||||
_canReader = !mode.isEdit && mode.canReader;
|
||||
},
|
||||
|
||||
rootLayout: function () {
|
||||
|
@ -100,11 +102,14 @@ define([
|
|||
|
||||
if (_isEdit) {
|
||||
$layour.find('#settings-edit-document').hide();
|
||||
$layour.find('#settings-readermode').hide();
|
||||
$layour.find('#settings-search .item-title').text(this.textFindAndReplace)
|
||||
} else {
|
||||
if (!_canEdit) $layour.find('#settings-edit-document').hide();
|
||||
$layour.find('#settings-document').hide();
|
||||
}
|
||||
if (!_canReader)
|
||||
$layour.find('#settings-readermode').hide();
|
||||
else {
|
||||
$layour.find('#settings-readermode input:checkbox')
|
||||
.prop('checked', Common.SharedSettings.get('readerMode'));
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue