[DE mobile] Download pdf/djvu/xps files only in the original format.
This commit is contained in:
parent
13e636d814
commit
2af3bd56cd
|
@ -191,6 +191,7 @@ define([
|
||||||
$('#settings-readermode input:checkbox').single('change', _.bind(me.onReaderMode, me));
|
$('#settings-readermode input:checkbox').single('change', _.bind(me.onReaderMode, me));
|
||||||
$('#settings-edit-document').single('click', _.bind(me.onEditDocumet, me));
|
$('#settings-edit-document').single('click', _.bind(me.onEditDocumet, me));
|
||||||
$('#settings-help').single('click', _.bind(me.onShowHelp, me));
|
$('#settings-help').single('click', _.bind(me.onShowHelp, me));
|
||||||
|
$('#settings-download').single('click', _.bind(me.onDownloadOrigin, me));
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -285,6 +286,15 @@ define([
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
onDownloadOrigin: function(e) {
|
||||||
|
var me = this;
|
||||||
|
|
||||||
|
_.defer(function () {
|
||||||
|
me.api.asc_DownloadOrigin();
|
||||||
|
});
|
||||||
|
me.hideModal();
|
||||||
|
},
|
||||||
|
|
||||||
onFormatChange: function (e) {
|
onFormatChange: function (e) {
|
||||||
var me = this,
|
var me = this,
|
||||||
rawValue = $(e.currentTarget).val(),
|
rawValue = $(e.currentTarget).val(),
|
||||||
|
|
|
@ -66,7 +66,19 @@
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<a id="settings-download" class="item-link" data-page="#settings-download-view">
|
<a id="settings-download-as" class="item-link" data-page="#settings-download-view">
|
||||||
|
<div class="item-content">
|
||||||
|
<div class="item-media">
|
||||||
|
<i class="icon icon-download"></i>
|
||||||
|
</div>
|
||||||
|
<div class="item-inner">
|
||||||
|
<div class="item-title"><%= scope.textDownload %></div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</a>
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
<a id="settings-download" class="item-link no-indicator">
|
||||||
<div class="item-content">
|
<div class="item-content">
|
||||||
<div class="item-media">
|
<div class="item-media">
|
||||||
<i class="icon icon-download"></i>
|
<i class="icon icon-download"></i>
|
||||||
|
|
|
@ -53,6 +53,7 @@ define([
|
||||||
var _isEdit = false,
|
var _isEdit = false,
|
||||||
_canEdit = false,
|
_canEdit = false,
|
||||||
_canDownload = false,
|
_canDownload = false,
|
||||||
|
_canDownloadOrigin = false,
|
||||||
_canReader = false;
|
_canReader = false;
|
||||||
|
|
||||||
return {
|
return {
|
||||||
|
@ -91,7 +92,8 @@ define([
|
||||||
setMode: function (mode) {
|
setMode: function (mode) {
|
||||||
_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;
|
||||||
|
_canDownloadOrigin = mode.canDownloadOrigin;
|
||||||
_canReader = !mode.isEdit && mode.canReader;
|
_canReader = !mode.isEdit && mode.canReader;
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -113,7 +115,8 @@ define([
|
||||||
$layour.find('#settings-readermode input:checkbox')
|
$layour.find('#settings-readermode input:checkbox')
|
||||||
.prop('checked', Common.SharedSettings.get('readerMode'));
|
.prop('checked', Common.SharedSettings.get('readerMode'));
|
||||||
}
|
}
|
||||||
if (!_canDownload) $layour.find('#settings-download').hide();
|
if (!_canDownload) $layour.find('#settings-download-as').hide();
|
||||||
|
if (!_canDownloadOrigin) $layour.find('#settings-download').hide();
|
||||||
|
|
||||||
return $layour.html();
|
return $layour.html();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue