Commit 7a043df3 authored by Julia Radzhabova's avatar Julia Radzhabova

[DE mobile] Disable reader mode for pdf/djvu/xps files.

parent 46456fea
...@@ -613,6 +613,7 @@ define([ ...@@ -613,6 +613,7 @@ define([
var type = /^(?:(pdf|djvu|xps))$/.exec(me.document.fileType); var type = /^(?:(pdf|djvu|xps))$/.exec(me.document.fileType);
me.appOptions.canDownloadOrigin = !me.appOptions.nativeApp && me.permissions.download !== false && (type && typeof type[1] === 'string'); me.appOptions.canDownloadOrigin = !me.appOptions.nativeApp && me.permissions.download !== false && (type && typeof type[1] === 'string');
me.appOptions.canDownload = !me.appOptions.nativeApp && me.permissions.download !== false && (!type || typeof type[1] !== 'string'); me.appOptions.canDownload = !me.appOptions.nativeApp && 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'; me._state.licenseWarning = (licType===Asc.c_oLicenseResult.Connections) && me.appOptions.canEdit && me.editorConfig.mode !== 'view';
......
...@@ -52,7 +52,8 @@ define([ ...@@ -52,7 +52,8 @@ define([
// private // private
var _isEdit = false, var _isEdit = false,
_canEdit = false, _canEdit = false,
_canDownload = false; _canDownload = false,
_canReader = false;
return { return {
// el: '.view-main', // el: '.view-main',
...@@ -91,6 +92,7 @@ define([ ...@@ -91,6 +92,7 @@ define([
_isEdit = mode.isEdit; _isEdit = mode.isEdit;
_canEdit = !mode.isEdit && mode.canEdit && mode.canRequestEditRights; _canEdit = !mode.isEdit && mode.canEdit && mode.canRequestEditRights;
_canDownload = mode.canDownload || mode.canDownloadOrigin; _canDownload = mode.canDownload || mode.canDownloadOrigin;
_canReader = !mode.isEdit && mode.canReader;
}, },
rootLayout: function () { rootLayout: function () {
...@@ -100,11 +102,14 @@ define([ ...@@ -100,11 +102,14 @@ define([
if (_isEdit) { if (_isEdit) {
$layour.find('#settings-edit-document').hide(); $layour.find('#settings-edit-document').hide();
$layour.find('#settings-readermode').hide();
$layour.find('#settings-search .item-title').text(this.textFindAndReplace) $layour.find('#settings-search .item-title').text(this.textFindAndReplace)
} else { } else {
if (!_canEdit) $layour.find('#settings-edit-document').hide(); if (!_canEdit) $layour.find('#settings-edit-document').hide();
$layour.find('#settings-document').hide(); $layour.find('#settings-document').hide();
}
if (!_canReader)
$layour.find('#settings-readermode').hide();
else {
$layour.find('#settings-readermode input:checkbox') $layour.find('#settings-readermode input:checkbox')
.prop('checked', Common.SharedSettings.get('readerMode')); .prop('checked', Common.SharedSettings.get('readerMode'));
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment